java to native code and Sun JVM alternatives
wagde <[email protected]>
| Newsgroups | gmane.comp.gcc.java.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi I'm working on a project which have java code (and c++), and until ow I used javac to compile the code and java to run the classes and JNI to call java from c++ code. I don't want to use javac, javah, and java, ...(sun stuff) because of royalties issues... I'm looking for alternatives. What I see right now are two alternatives: 1. compile my java code to native code using gcj, and link it with the c++ code. 2. keep the classes and use the gij instead of java. I start working on the two approaches in parallel and I'm having too many problems in both them. So I need some REAL help here. Problem with 1. 1. I succeeded to compile my java code (after chaning the syntax) using gcj to linux "c" object files. But in the linkage to the binary, I got too many "undefined reference to", ... because I use external "jars" (like axis) which are not compiled to native. I try to compile the axis jar to c and get too many compilation errors. Problem with 2. I compiled all my classes with gcj. and the C code uses JNI to call it. But the JNI creates a JVM (JNI_CreateJavaVM)!!! which I don't want to use. I want to use gij instead. So I wanted to know if there is anyway to let my JNI code to ceate a gij VM and and java VM. is there anything like this ?! If not, how can I use the classes I compiled with gcj from the c code without using the JAVA VM? CNI? does that mean that I should convert my jni code to cni? Any idea/help/new approaches are welcome! Thanx Wagde -- View this message in context: http://old.nabble.com/java-to-native-code-and-Sun-JVM-alternatives-tp27862420p27862420.html Sent from the gcc - java mailing list archive at Nabble.com.