I have a program.jar file which includes some external libraries. Additionally I wan’t to start some classes with the program.jar.
The classes (TestKlass.class,…) are located in <path>/bin/data/test + sometimes there will be new classes added here.
How can I set this location for the classpath so I can use this command in the jar file:
cStart = Class.forName("data.test.TestKlass.class");
This is how my current MANIFEST.MF looks like:
Manifest-Version: 1.0
Rsrc-Class-Path: ./ junit-4.10.jar selenium-java-2.20.0.jar WinRegistr
y-4.4.jar selenium-server.jar
Class-Path: .
Rsrc-Main-Class: data.Testworks
Main-Class: org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader
(Everything works fine within eclipse)
You can’t reference external
jarsclasses in a runnable jar file. Everything must be contained inside the jar.