Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there any ubuntu program that converts the program written in C to Java. I know there's an utility that can convert awk script to perl script(a2p).

share|improve this question
add comment

closed as off topic by Mitch, Web-E, Anwar Shah, Scott Severance, Jorge Castro Sep 7 '12 at 2:02

Questions on Ask Ubuntu are expected to relate to Ubuntu within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

Forget it. Yes, it is possible (see for example here). No, it does not make much sense. C is low level, often system specific, often linked to a large number of specific libraries, not object oriented, with manual memory management.

What do you need it for? What kind of programs would you like to port to Java?

share|improve this answer
    
i want to port program written for kernel in C to Java –  Ankit Sep 6 '12 at 18:22
    
Program for kernel? Like, a module / driver? Or what? Why port such a thing to Java? I'm afraid this will not be doable. –  January Sep 6 '12 at 18:38
add comment

You can use JNI instead of converting your C code to Java and call your C code in java. You can also use JNA (an easier alternative for JNI).

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.