Please don't go into a rant why I shouldn't be using GJC, I understand the con's of it.
The question is, can I link a compiled library just as if using a regular jar?
// this works and links to the jarfiles.jar
java -cp lib/jarfiles.jar:classes Main
But is I turn the jar to native code like this:
gcj -shared -fPIC -Wl,-Bsymbolic jarfiles.jar -o jarfiles.so
And try to run it calling the .so file:
java -cp lib/jarfiles.so:classes Main
It blows not being able to find the expected classes.
Exception in thread "main" java.lang.NoClassDefFoundError: com/netxpect/FirstFromJar
at Main.<clinit>(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.netxpect.FirstFromJar
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
Shouldn't this work? What am I doing wrong? Thank you.