This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Is this possible
- To: "'java at gcc dot gnu dot org'" <java at gcc dot gnu dot org>
- Subject: Is this possible
- From: "Martin, David S" <david dot s dot martin at intel dot com>
- Date: Mon, 16 Apr 2001 14:34:29 -0700
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