Java: Packaging Self-running Jar
I'm trying to package my Java app into self-running jar file. But it always says "Could not find the main class." If you could take a look of the process and tell me what I did wrong, that would be greatly appreciated.
Files structure:
Code:
manifest.mf
TaskManager/
data.xml
bin/
TaskManagerFrame.class
Task.class
Organizer.class
doc/
images/
delete-task.png
new-task.png
print.png
src/
TaskManagerFrame.java
Task.java
Organizer.java
The main method is in TaskManagerFrame, and the content of manifest.mf is the following.
Code:
Manifest-Version: 1.0
Class-Path: TaskManager/bin/
Main-Class: TaskManager/bin/TaskManagerFrame
The command to produce the jar file follows.
Code:
jar cmvf manifest.mf taskmanager.jar TaskManager
The jar file is produced, but when double-clicked, it says "Could not find the main class."