Is this possible
Martin, David S
david.s.martin@intel.com
Mon Apr 16 15:25:00 GMT 2001
Here is the situation,
I have a library of java files that I compile and turn into a .a file.
Then I create a java source file that uses that .a file. The command
I use to link the .a file and java source file is
gcj ReportsFrame.java --main=ReportsFrame libGenCAM.a -o ReportsFrame
the binary gets created and I execute ReportsFrame and everything is fine.
Now the next step is to create a C++ equivalent of the ReportsFrame.java,
easy right? Well I thought it was until I actually tried.
After some tries I simplified my problem, just write a C++ program that
instantiates the ReportsFrame constructor. I got the whole monster to
compile with the command,
gcj -o JavaTest ReportsFrame.o libGenCAM.a JavaTest.o
when I execute the resulting binary I get a core dump.
Any Ideas?
Is possible to have a c++ class instantiate a java class and call methods
from it?
I can zip up all the code that I have been working with and send it out
to someone who wants to see it. It's all open source anyways.
Dave
More information about the Java
mailing list