Jump to content
Excelsior Forums
geo

Jar resource in jar

Recommended Posts

Hello,

I have a jar application which contains another jar library.
The application launches fine with java -jar myApp.jar.

But when i compile the jar with JET jar inside myApp.jar is not found and ClassnotfoundException is thrown.

Any thoughts about this?

BR,
Geo

Share this post


Link to post
Share on other sites

Hello,

Excelsior JET does not support AOT compilation of inner jars in the main jar. So if you want to compile the inner library along with the main jar, the application structure should be flattened.

However, that configuration should also work because of JIT compilation of the inner library. Could you please tell us how you build your application and how the inner library is accessed?

Share this post


Link to post
Share on other sites

Hi,
I just import and use the classes in the lib jar just like any other class. No reflection or dynamic loading.

When I un-jar the lib and place the classes in the myApp.jar it works just fine.

I use JET 15 std.

+NOLAUNCHPAD
-GENSTACKTRACE+
-PACK=noncompiled
-CLASSABSENCE=HANDLE
-IGNOREMEMBERABSENCE+
-IGNORECLASSDUPLICATION+
-OUTPUTDIR=../dist
-OUTPUTNAME=lc
-SPLASH=../files/splash.jpg

-jetvmprop=-Djet.jit -Djet.gc.heaplimit:0m
-jetvmprop=-Djava.net.preferIPv4Stack=true
-jetvmprop=-Djet.stack.trace

-MAIN=advit/logicash/Logicash

-LOOKUP=*.jar=../../

!module MyApp.jar

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×