C to Java translation

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

Naveen
Posts: 1
Joined: Wed Feb 09, 2011 4:47 pm UTC

C to Java translation

Postby Naveen » Wed Feb 09, 2011 4:57 pm UTC

Is there a website or any forums where in I post my C code and get Java code for the same?
I need to convert my program to Java. Not that I don't know. But I really don't have time to sit and write the code. So please help!

qbg
Posts: 586
Joined: Tue Dec 18, 2007 3:37 pm UTC

Re: C to Java translation

Postby qbg » Thu Feb 10, 2011 6:06 am UTC

Naveen wrote:Is there a website or any forums where in I post my C code and get Java code for the same?
I need to convert my program to Java. Not that I don't know. But I really don't have time to sit and write the code. So please help!

If you don't have the time, but have time in general, pay someone to do it.

Java and C are quite different languages, so don't expect an automated solution.

AndyG314
Posts: 99
Joined: Mon Feb 11, 2008 5:16 pm UTC
Location: Waltham MA
Contact:

Re: C to Java translation

Postby AndyG314 » Mon Feb 28, 2011 5:50 pm UTC

For what purpose do you need to do this, there are ways to call a c function from within a java program. That may be easier than converting it.
If it's dead, you killed it.

kmatzen
Posts: 214
Joined: Thu Nov 15, 2007 2:55 pm UTC
Location: Ithaca, NY

Re: C to Java translation

Postby kmatzen » Mon Feb 28, 2011 10:29 pm UTC

I don't know if this works, but this is what Google gave me. It's referenced in a few C to Java translational semantics papers from the late 90's.
http://www.novosoft-us.com/solutions/product_c2j.shtml

JNI is probably the way to go unless you are doing the conversion for the stronger type safety. The JNI will still allow you to segfault the JVM if you mess up.


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 9 guests