This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: jc1 out of memory error gcc 4.2.2 Linux 64-bit OS


Harpal Grover wrote:
And voila, a full executable was created. I was able to launch it and
my SWT application appears with no problems so far. I closed the app
down, and moved the executable to another folder along with its
required libraries. I then tried to launch it from within this new
folder and I got this stacktrace:

Exception in thread "main" java.lang.NoClassDefFoundError: main.App
   at java.lang.Class.initializeClass(/datal/gcc/gcc/gcc/libgcc2.c:0)
Caused by: java.lang.ClassNotFoundException: main.App$3 not found in gnu.gcj.run
time.SystemClassLoader{urls=[file:.\], parent=gnu.gcj.runtime.ExtensionClassLoad
er{urls=[], parent=null}}
   at java.net.URLClassLoader.findClass(/datal/gcc/gcc/libjava/java/net/URLClass
Loader.java:1080)
   at java.lang.ClassLoader.loadClass(/datal/gcc/gcc/libjava/java/lang/ClassLoad
er.java:351)
   at java.lang.ClassLoader.loadClass(/datal/gcc/gcc/libjava/java/lang/ClassLoad
er.java:295)
   at java.lang.Class.initializeClass(/datal/gcc/gcc/gcc/libgcc2.c:0)

For some odd reason, it is looking for a class file which should have
been compiled into my native executable. My native executable is 57
MB. The really strange thing is gcj is looking for "main.App$3" class.
"main.App" is the class which contains the main method. I am not sure
why it is looking for "main.App$3" instead. Am I missing an additional
step of compiling the class files into the executable, so the
executable can finally be independent from the class files?

If I drop the native executable back into its original folder, it
launches fine again because it can see all of these classes again... I
know I am really close to finally getting this thing to compile, and
run smoothly. This is baffling me.

Do you have a class file called main.App$3 or not? Is it compiled into your
executable, or not?


Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]