C
Composer
I've read several posts about Class-Path and they generally seem to
assume that I know how to specify the location of a directory relative
to the directory of the jar being executed. I'm running OS X.
The jar to be executed is
/Java projects/myname/utilities/DesktopApp.jar
The external jar containing classes I need is
/Java projects/javamail/mail.jar
So the external jar file is two directories up and then one directory
down from my main jar.
The compiler is perfectly happy finding the classes in mail.jar.
If I explicitly load all the classes from mail.jar into
DesktopApp.jar, it executes fine.
Here are the variants I have tried in my manifest:
Class-Path: .;.../javamail/mail.jar
Class-Path: .;../javamail/mail.jar
Class-Path: .;./javamail/mail.jar
Class-Path: .:.../javamail/mail.jar
Class-Path: .:../javamail/mail.jar
Class-Path: .:./javamail/mail.jar
Class-Path: .../javamail/mail.jar
Class-Path: ../javamail/mail.jar
Class-Path: ./javamail/mail.jar
All nine of these attempts result in NoClassDefFoundError when I
execute DesktopApp.jar.
Am I being really stupid?
assume that I know how to specify the location of a directory relative
to the directory of the jar being executed. I'm running OS X.
The jar to be executed is
/Java projects/myname/utilities/DesktopApp.jar
The external jar containing classes I need is
/Java projects/javamail/mail.jar
So the external jar file is two directories up and then one directory
down from my main jar.
The compiler is perfectly happy finding the classes in mail.jar.
If I explicitly load all the classes from mail.jar into
DesktopApp.jar, it executes fine.
Here are the variants I have tried in my manifest:
Class-Path: .;.../javamail/mail.jar
Class-Path: .;../javamail/mail.jar
Class-Path: .;./javamail/mail.jar
Class-Path: .:.../javamail/mail.jar
Class-Path: .:../javamail/mail.jar
Class-Path: .:./javamail/mail.jar
Class-Path: .../javamail/mail.jar
Class-Path: ../javamail/mail.jar
Class-Path: ./javamail/mail.jar
All nine of these attempts result in NoClassDefFoundError when I
execute DesktopApp.jar.
Am I being really stupid?