I\'m trying to load a jar using
@echo off
java -jar Test.jar
pause
With the manifest of
Manifest-Version: 1.0
Main-Class:
If you use package names, it won't work with folders containing dots (Error: Could not find or load main class). Even though it compiles and creates the jar file successfully.
Instead it requires a complete folder hierarchy.
Fails:
com.example.mypackage/
Main.java
Works:
com/
example/
mypackage/
Main.java
To compile in Linux:
javac `find com/ -name '*.java'` \
&& jar cfe app.jar com.example.mypackage.Main `find com/ -name '*.class'`