Re: [jnc-users] JNC hangs
Status: Beta
Brought to you by:
soapy
From: Marco T. <mt...@gm...> - 2007-02-18 10:21:15
|
Harpal Grover wrote: > > > >> From: Marco Trudel <mt...@gm...> >> To: "A mailing list for general questions and discussions." >> <jav...@li...>, har...@ho... >> Subject: Re: [jnc-users] JNC hangs >> Date: Thu, 15 Feb 2007 08:01:50 +0100 >> >> Harpal Grover wrote: >>> I downloaded the latest JNC, 1.1, and attempted to compile my java >>> app to a native app. The compilation started, but after awhile >>> stopped working and JNC just hung, with the following log output: >> >> Did you mix .java and .class source files? >> Does it work with JNC 1.0? > > Yes the files were mixed. Eclipse defaults to this :( I know. I always manually changed the setup to use src and bin folders when I created projects until just this week that I discovered that it can be made as default :-) > I am not going to > try compiling with JNC 1.0, since I do not believe it supports Java 1.5 > features Depends. Compile from the eclipse generated class files. Bytecode will not contain Java 1.5 language features any more. The only exceptions are annotations. >> A "java_parse_file, at java/jcf-parse.c:1947" error was recently fixed >> in GCJ. It might be the one you run into (unless you're compiling >> .java and .class files at the same time). > > Yes this seems to have been the issue indeed. Thanks for the tip. I > cleaned my source of any class files before I ran JNC and this time it > worked! :-) >> BTW: Adding the custom "-w" flag would suppress all Java warnings >> you're seeing. > > Thanks again for the tip. It's even better to compile from the eclipse generated bytecode if you develop with eclipse anyway. This way you also save a couple of milliseconds because GCJ doesn't have to do the bytecode compilation and you can better invest this milliseconds into something cool like... hm... lifting a finger or look at the other corner of the room ;-) > Now I have another question for everyone. Has anyone attempted to > compile a java database with JNC 1.1? No. Please also try with JNC 1.0 and compile from the bytecode to be able to compile Java 1.5 language features. I'd be interested if this stuff works with GCJ 4.2 > I have successfully compiled both > HSQLDB 1.8.7 and H2 1.0. But when my native app loads with HSQLDB, I get > this error: > > Exception in thread "main" java.lang.NoClassDefFoundError: org.hsqldb.Trace > at org.hsqldb.Trace.error(App.exe) > at gnu.java.lang.MainThread.call_main(App.exe) > at org.hsqldb.DatabaseManager.getDatabase(App.exe) > at org.hsqldb.DatabaseManager.newSession(App.exe) > at org.hsqldb.jdbc.jdbcConnection.<init>(App.exe) > at java.sql.DriverManager.getConnection(App.exe) > at com.sportscash.database.H2.DAO.createConnection(App.exe) > at foo.foo.foo.<init>(App.exe) > at App.<init>(App.exe) That's worth a GCJ bugzilla entry. But please try it with JNC 1.0 (GCJ 4.2) to know if it's a regression. > When I try with H2, I get a file locking error. I did not run into these > issues when using gcj 4.02. Which platform? Filelocking was just recently implemented in mingw (Windows). So with GCJ 4.02, I think there was no support for it. Do these two applications work on Linux? Marco |