Re: [javaCompiler-users] Building a DLL with JavaCompiler?
Status: Beta
Brought to you by:
soapy
From: Marco T. <mt...@gm...> - 2006-09-17 18:31:24
|
Hey Jesper Sorry, I never created dlls myself. You should ask the gcj guys directly... Marco Jesper Juul / Soup Games wrote: > Hi > > I am having problems getting a DLL to work with JavaCompiler 0.7 and > 0.8, and I wonder if somebody has a suggestion for how to get it to work. > > I hope someone has an idea of whether this is a known gcj problem, or > I am missing some parameter to make it work. > > Thanks! > -Jesper > > **** The problem: ***** > > The actual program I am working on is too big to post here, but I > have made a very simple test case with two classes, Test and TestB: > > > public class Test > { > > public static void main(String args[]) > { > TestB t=new TestB(); > t.hi(); > } > } > > * > > public class TestB > { > > public void hi() > { > System.out.println("Yes!"); > } > } > > * > I compile them like this > gcj -shared -I. TestB.java -o TestB.dll > gcj -I. Test.java TestB.dll --main=Test -o Test.exe > > Compilation gives this info/warning: > Info: resolving TestB::class$ by linking to __imp___ZN5TestB6class$E (auto > import) > > If I run the Test.exe program, I get this error (JavaCompiler 0.7) > Exception in thread "main" java.lang.NoClassDefFoundError: TestB > at 0x562408(Unknown Source) > > For JavaCompiler 0.8: > Exception in thread "main" java.lang.NoClassDefFoundError: TestB > at java.lang.Class.initializeClass(Test.exe) > Caused by: java.lang.NullPointerException > <<No stacktrace available>> > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > javaCompiler-users mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/javacompiler-users > > |