all groups > vj# > january 2004 >
You're in the

vj#

group:

Converting C# to J#



Converting C# to J# MS Public
1/20/2004 2:04:29 PM
vj#: Can someone point me a a really good link to help me accomplish what I am
trying to do. Its driving me mad.

I cant even find a good list of syntax for it.

mad I tells ya !

Regards

RE: Converting C# to J# mikegreonline NO[at]SPAM microsoft.com
1/20/2004 9:03:13 PM
What is it that you are trying to do? We have a tool called JLCA (Java
Language Conversion Assistant) which will convert Java code to C# but we
don't have a tool to do the opposite. Why are you trying to convert from C#
to J#? I think you would be better off sticking with C#. If you would tell
me a little bit more about what you are trying accomplish I should be able
to offer some further advice.

Thanks,

Michael Green
Microsoft Developer Support

--------------------
| From: "MS Public" <me@me.com>
| Subject: Converting C# to J#
| Date: Tue, 20 Jan 2004 14:04:29 -0000
| Lines: 10
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Message-ID: <esvyT513DHA.1632@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.vjsharp
| NNTP-Posting-Host: 212.19.79.242
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.
phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.vjsharp:5213
| X-Tomcat-NG: microsoft.public.dotnet.vjsharp
|
| Can someone point me a a really good link to help me accomplish what I am
| trying to do. Its driving me mad.
|
| I cant even find a good list of syntax for it.
|
| mad I tells ya !
|
| Regards
|
|
|
Re: Converting C# to J# MS Public
1/21/2004 12:00:29 PM
Michael,
Thanx for your reply. To answer your question, I am
producing training material and need to convert the C# stuff to J# for the
Java community, so any help in doing this would be good.

Do you know if there is much of a J# community out there ?

Regards





[quoted text, click to view]

Re: Converting C# to J# mikegreonline NO[at]SPAM microsoft.com
1/21/2004 6:31:38 PM
From my perspective there are only a few people using J#. We get very few
phone calls about J# issues and the traffic in this newsgroup is slow when
compared to C# or C++.

Thanks,

Michael Green
Microsoft Developer Support

--------------------
| From: "MS Public" <me@me.com>
| References: <esvyT513DHA.1632@TK2MSFTNGP12.phx.gbl>
<jEz$Pj53DHA.132@cpmsftngxa07.phx.gbl>
| Subject: Re: Converting C# to J#
| Date: Wed, 21 Jan 2004 12:00:29 -0000
| Lines: 62
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Message-ID: <e$K7sYB4DHA.2136@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.vjsharp
| NNTP-Posting-Host: 212.19.79.242
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTNGP08.
phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.vjsharp:5225
| X-Tomcat-NG: microsoft.public.dotnet.vjsharp
|
| Michael,
| Thanx for your reply. To answer your question, I am
| producing training material and need to convert the C# stuff to J# for the
| Java community, so any help in doing this would be good.
|
| Do you know if there is much of a J# community out there ?
|
| Regards
|
|
|
|
|
[quoted text, click to view]
| > What is it that you are trying to do? We have a tool called JLCA (Java
| > Language Conversion Assistant) which will convert Java code to C# but we
| > don't have a tool to do the opposite. Why are you trying to convert from
| C#
| > to J#? I think you would be better off sticking with C#. If you would
tell
| > me a little bit more about what you are trying accomplish I should be
able
| > to offer some further advice.
| >
| > Thanks,
| >
| > Michael Green
| > Microsoft Developer Support
| >
| > --------------------
| > | From: "MS Public" <me@me.com>
| > | Subject: Converting C# to J#
| > | Date: Tue, 20 Jan 2004 14:04:29 -0000
| > | Lines: 10
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| > | Message-ID: <esvyT513DHA.1632@TK2MSFTNGP12.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.vjsharp
| > | NNTP-Posting-Host: 212.19.79.242
| > | Path:
| >
|
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.
| > phx.gbl
| > | Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.vjsharp:5213
| > | X-Tomcat-NG: microsoft.public.dotnet.vjsharp
| > |
| > | Can someone point me a a really good link to help me accomplish what I
| am
| > | trying to do. Its driving me mad.
| > |
| > | I cant even find a good list of syntax for it.
| > |
| > | mad I tells ya !
| > |
| > | Regards
| > |
| > |
| > |
| >
|
|
|
Re: Converting C# to J# Alexandre Kozlov
2/5/2004 12:27:48 PM
How can I report an issue with J#? Would I expect it to be fixed?
Can I communicate directly to your email?

I am working in a company, which created a huge UI project on J++ (using AWT
package only). The codebase is somewhat 40mb.
Currently I am exploring the way to use .NET, so I ported it to .NET.
Everything else is fine except EventQueue handling, which has a problem. And
that is a core part of our design.

Thanks.


[quoted text, click to view]

Re: Converting C# to J# mikegreonline NO[at]SPAM microsoft.com
2/9/2004 7:31:13 PM
Alexandre,

I'm sorry I wasn't able to respond to you sooner, I was out of the office
last week. J# is fully supported and we are able to fix bugs. You can post
questions here in the newsgroup for general assistance, but if you need a
bug to be fixed, or in-depth debugging help your best bet would be to call
in to developer support and open an incident with us. If the problem is a
bug, you will not be charged. You can find out more about the available
support options at:
http://support.microsoft.com/default.aspx?pr=cntactms&style=home

Or feel free to post any questions about support options here.

What types of problems are you running into? If your code conforms to the
JDK 1.1.4 it should convert cleanly.

Thanks,

Thanks,

Michael Green
Microsoft Developer Support
Re: Converting C# to J# Alexandre Kozlov
2/10/2004 11:08:10 AM
Thank you for your reply.

At the current point we only consider porting the product to J#. This would
be only possible if the core of the product is ported without major
problems.

The preliminary port project shown only one major problem described below.
The way we are handling the queue is critical for our application core.

About possible options:
I have already posted the question to the newsgroup, but only response
I've got from peers is that the problem is really there, indeed.

I have tried to follow, the link you have given, there unfortunately no
J# product or Visual Studio .NET to follow.

I would appreciate, if you could give me a clue on:
1. Is it really a bug?
2. Would it be fixed?
3. What is workaround for the current version of J#?


Here is the clear demonstration of the problem.

Correct behavior:
When Frame is opened, hovering the mouse over the frame should print mouse
move events trace.


Incorrect behavior:
When Frame is opened, hovering the mouse over the frame would produce only
one
mouse move event and no mouse move events thereafter, even if event pump
loop is terminated.

Tested in following environments:
MS JVM - 1.1.4 all builds, all Windows platforms
Sun JVM - 1.1.8, 1.2, 1.3.1, 1.4.1, 1.4.2, Windows 2000, Windows NT, Windows
XP.
J#, Framework 1.1 (FAILED)


With best regards,
Alexandre Kozlov


============================================================================
==
The sample given below works with any other JVM (including Microsoft JVM),
except when compiled with J#.
The problem, that the mouse move event does not propagate trough the AWT
event queue, when getNextEvent method is called at least once during event
processing.
The mouse move events are delivered mormally, when event pump block is not
used.

Further investigation showed that the getNextEvent cases blockage of
MOUSE_MOVE
events events if called outside message pump, but in event dispatching
thread.


import java.awt.*;
import java.awt.event.*;

public class Test extends Frame
{
private java.awt.EventQueue queue;

private boolean pumpActive = false;

private Test()
{
super();
enableEvents( MouseEvent.MOUSE_EVENT_MASK |
MouseEvent.MOUSE_MOTION_EVENT_MASK );
setBounds( 0, 0, 100, 100 );
}

protected void processEvent( AWTEvent e )
{
super.processEvent( e );

// MESSAGE PUMP BLOCK
if( !pumpActive ) {
System.out.println( "Starting Message pump" );
queue = getToolkit().getSystemEventQueue();
pumpActive = true;
while( pumpActive ) {
try {
AWTEvent ee = queue.getNextEvent();
System.out.println( "event: " + ee );
if( ee.getSource() instanceof Component ) {
( ( Component )ee.getSource() ).dispatchEvent( ee );
}
}
catch( InterruptedException ex ) {
}
}
}
// MESSAGE PUMP BLOCK
}

protected void processMouseEvent( MouseEvent e )
{
System.out.println( "processMouseEvent: " + e );
super.processMouseEvent( e );
}

protected void processMouseMotionEvent( MouseEvent e )
{
System.out.println( "processMouseMotionEvent: " + e );
super.processMouseMotionEvent( e );
}

public static void main( String[] s )
{
Frame f = new Test();
f.setVisible( true );
}
}


[quoted text, click to view]

Re: Converting C# to J# mikegreonline NO[at]SPAM microsoft.com
2/10/2004 9:40:17 PM
Alexandre,

This does appear to be a bug. I have submitted a bug report to our dev
team. They will verify that this is indeed a bug and suggest a workaround
if possible. If no workaround can be found, we can create a support
incident for this issue and submit a request for a hotfix. Submitting the
request does not guarentee a hotfix, but it doesn't hurt to ask. I will be
in touch with you as soon as possible.

Thanks,

Michael Green
Microsoft Developer Support



--------------------
| From: "Alexandre Kozlov" <apkbox1[at]hotmail[dot]com>
| References: <esvyT513DHA.1632@TK2MSFTNGP12.phx.gbl>
<jEz$Pj53DHA.132@cpmsftngxa07.phx.gbl>
<e$K7sYB4DHA.2136@TK2MSFTNGP12.phx.gbl>
<oN9gSzE4DHA.3648@cpmsftngxa07.phx.gbl>
<#XGhrZC7DHA.3028@TK2MSFTNGP09.phx.gbl>
<XLg1MN07DHA.1992@cpmsftngxa07.phx.gbl>
| Subject: Re: Converting C# to J#
| Date: Tue, 10 Feb 2004 11:08:10 -0800
| Lines: 151
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 5.50.4927.1200
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200
| Message-ID: <eWzRRkA8DHA.2560@TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.dotnet.vjsharp
| NNTP-Posting-Host: z-fastethernet1-0-0-55-s1.gw3.van1.sprint-canada.net
204.50.246.34
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.
phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.vjsharp:5371
| X-Tomcat-NG: microsoft.public.dotnet.vjsharp
|
| Thank you for your reply.
|
| At the current point we only consider porting the product to J#. This
would
| be only possible if the core of the product is ported without major
| problems.
|
| The preliminary port project shown only one major problem described below.
| The way we are handling the queue is critical for our application core.
|
| About possible options:
| I have already posted the question to the newsgroup, but only response
| I've got from peers is that the problem is really there, indeed.
|
| I have tried to follow, the link you have given, there unfortunately no
| J# product or Visual Studio .NET to follow.
|
| I would appreciate, if you could give me a clue on:
| 1. Is it really a bug?
| 2. Would it be fixed?
| 3. What is workaround for the current version of J#?
|
|
| Here is the clear demonstration of the problem.
|
| Correct behavior:
| When Frame is opened, hovering the mouse over the frame should print mouse
| move events trace.
|
|
| Incorrect behavior:
| When Frame is opened, hovering the mouse over the frame would produce only
| one
| mouse move event and no mouse move events thereafter, even if event pump
| loop is terminated.
|
| Tested in following environments:
| MS JVM - 1.1.4 all builds, all Windows platforms
| Sun JVM - 1.1.8, 1.2, 1.3.1, 1.4.1, 1.4.2, Windows 2000, Windows NT,
Windows
| XP.
| J#, Framework 1.1 (FAILED)
|
|
| With best regards,
| Alexandre Kozlov
|
|
|
============================================================================
| ==
| The sample given below works with any other JVM (including Microsoft JVM),
| except when compiled with J#.
| The problem, that the mouse move event does not propagate trough the AWT
| event queue, when getNextEvent method is called at least once during event
| processing.
| The mouse move events are delivered mormally, when event pump block is not
| used.
|
| Further investigation showed that the getNextEvent cases blockage of
| MOUSE_MOVE
| events events if called outside message pump, but in event dispatching
| thread.
|
|
| import java.awt.*;
| import java.awt.event.*;
|
| public class Test extends Frame
| {
| private java.awt.EventQueue queue;
|
| private boolean pumpActive = false;
|
| private Test()
| {
| super();
| enableEvents( MouseEvent.MOUSE_EVENT_MASK |
| MouseEvent.MOUSE_MOTION_EVENT_MASK );
| setBounds( 0, 0, 100, 100 );
| }
|
| protected void processEvent( AWTEvent e )
| {
| super.processEvent( e );
|
| // MESSAGE PUMP BLOCK
| if( !pumpActive ) {
| System.out.println( "Starting Message pump" );
| queue = getToolkit().getSystemEventQueue();
| pumpActive = true;
| while( pumpActive ) {
| try {
| AWTEvent ee = queue.getNextEvent();
| System.out.println( "event: " + ee );
| if( ee.getSource() instanceof Component ) {
| ( ( Component )ee.getSource() ).dispatchEvent( ee
);
| }
| }
| catch( InterruptedException ex ) {
| }
| }
| }
| // MESSAGE PUMP BLOCK
| }
|
| protected void processMouseEvent( MouseEvent e )
| {
| System.out.println( "processMouseEvent: " + e );
| super.processMouseEvent( e );
| }
|
| protected void processMouseMotionEvent( MouseEvent e )
| {
| System.out.println( "processMouseMotionEvent: " + e );
| super.processMouseMotionEvent( e );
| }
|
| public static void main( String[] s )
| {
| Frame f = new Test();
| f.setVisible( true );
| }
| }
|
|
[quoted text, click to view]
| > Alexandre,
| >
| > I'm sorry I wasn't able to respond to you sooner, I was out of the
office
| > last week. J# is fully supported and we are able to fix bugs. You can
| post
| > questions here in the newsgroup for general assistance, but if you need
a
| > bug to be fixed, or in-depth debugging help your best bet would be to
call
| > in to developer support and open an incident with us. If the problem is
a
| > bug, you will not be charged. You can find out more about the available
| > support options at:
| > http://support.microsoft.com/default.aspx?pr=cntactms&style=home
| >
| > Or feel free to post any questions about support options here.
| >
| > What types of problems are you running into? If your code conforms to
the
| > JDK 1.1.4 it should convert cleanly.
| >
| > Thanks,
| >
| > Thanks,
| >
| > Michael Green
| > Microsoft Developer Support
| >
|
|
|
Re: Converting C# to J# Alexandre Kozlov
2/11/2004 11:04:18 AM
Thank you.

Any other means to communicate except news, because the thread may be gone
by that time?

My email is apkcoder@hotmail.com. To: Alexandre Kozlov.


[quoted text, click to view]
Re: Converting C# to J# mikegreonline NO[at]SPAM microsoft.com
2/17/2004 9:45:10 PM
Alexandre,

If you would like more direct communication, I will have to ask you to call
in and open a support incident. Information about doing so can be found at:
http:\\support.microsoft.com

Thanks,

Michael Green
Microsoft Developer Support
AddThis Social Bookmark Button