java to c#

O

Oliver Wong

kiran1785 said:
how do i convert my java code to C#.net?

With great difficulty.

My company specializes in porting and migration, so you could try
contacting them to try and get a price quote: http://www.castortech.com/

I was actually working on a Java-to-C# project for a while, and while
it's not as bas as, for example, COBOL-to-Java, it's still pretty
non-trivial.

Note that if all you want is to run Java code on the .NET platform, and
the "C#" part is not actually a requirement, take a look at Mono.NET. You
can use it to compile Java source code to MSIL binaries.

- Oliver
 
H

Homer

I don't think there is such a thing. In term of programming syntax they
are pretty similar (I found out after wasting $70 for C# book). Just
open Visual Studio and start coding and you will see there is nothing
to learn if you know Java.


But in term of everything else (AWT/SWing/WindowsAPI and Other class
libraries) are totaly too different animals.
 
R

Roedy Green

how do i convert my java code to C#.net?
That is a bit like saying "How do i take up a life of prostitution?.
You more likely to get an answer from the prostitutes that those
wanting you to avoid such a terrible life destroying error." :)
 
B

Bjorn Abelli

...
how do i convert my java code to C#.net?

That depends.

There are some tools for it, e.g. the plug-in to Visual Studio:

http://msdn.microsoft.com/vstudio/downloads/tools/jlca/

The previous version was really lousy IMHO, as it couldn't resolve some
basic classes, when I tried. Even those it could convert was confined to
being either old J++ or Java 1.1.

I haven't tried the latest plugin, which says it can handle conversions up
to 1.3, and even J2EE 1.3.

But I wouldn't rely on tools alone, as there are some differences where it
probably would be better to find a solution better suited wit the new
language.

IMHO, one of the best ways to convert from one language to another, is to do
it "manually", looking for new possibilities in the new language.

// Bjorn A
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,042
Members
48,769
Latest member
Clifft

Latest Threads

Top