Re Is this possible
Y2K Bug
opus@aracnet.com
Mon Apr 16 19:01:00 GMT 2001
>On 2001年4月16日, Martin, David S wrote: >>
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. >That's not supported, and doesn't work
(yet). >> gcj -o JavaTest ReportsFrame.o libGenCAM.a
JavaTest.o >> when I execute the resulting binary I get a core
dump. >> Any Ideas? >It crashes because the gcj runtime isn't
initialized.ÃÂ (If you look at the >output of jvgenmain sometime,
you'll see it calls JvRunMain instead of >invoking the main class
directly.ÃÂ This function does a bit of >housekeeping, such as
creating the main thread.ÃÂ It isn't documented, and >is likely to
change.) >> Is possible to have a c++ class instantiate a java
class and call methods >> from it? >Yes.ÃÂ But you cannot
replace main(). >A c++ class can make callbacks into the java runtime,
provided there is >a java class somewhere up the call stack.ÃÂ That
is, c++ cannot come first. >Jeff
ÃÂ
Jeff and Others,
ÃÂ
Ok so I can call the java from a c++ function that gets called
from a java class via a native call. But how can I remove the second Java layer
so I can just call the java class from a c++ class??
ÃÂ
ÃÂ
ÃÂ
Dave
ÃÂ
More information about the Java
mailing list