ubharedev
Oct 5, 2010, 02:32 AM
Hi,
I want to create an executable file for my console application program.
It is a network file sharing program, need to run on double click or command line.
This program contains 11 class files in which FileSharing.class is the main class file.
I have created manifest.txt file with 'Class-Path: Test1/FileSharing.class' as main class file where Test1 is the package.
Then I run the command: jar cfm FileShare.jar manifest.txt *.class
I creates a jar file with FileShare.jar name.
But while giving the run command from cmd.
java -jar FileShare.jar or java -jar FileShare
Gives the following error:
Unrecognized option: -
Could not create the Java virtual machine.
Please help.
Regards,
Dev
I want to create an executable file for my console application program.
It is a network file sharing program, need to run on double click or command line.
This program contains 11 class files in which FileSharing.class is the main class file.
I have created manifest.txt file with 'Class-Path: Test1/FileSharing.class' as main class file where Test1 is the package.
Then I run the command: jar cfm FileShare.jar manifest.txt *.class
I creates a jar file with FileShare.jar name.
But while giving the run command from cmd.
java -jar FileShare.jar or java -jar FileShare
Gives the following error:
Unrecognized option: -
Could not create the Java virtual machine.
Please help.
Regards,
Dev