-2

I have created a program that creates a keystore. When I run this code on IDE, it runs perfectly. However, when I run the jar file - I get no errors but cannot find the keystore created.

Some additional info - The jar file has been created in the cmd prompt using the following commands:

 javac -XDignore.symbol.file Keygenerate.java 
 echo Main-Class: Keygenerate >manifest.txt
 jar cvfm myjar.jar manifest.txt *.class

The reason i use -XDignore.symbol.file option is because I am using some deprecated methods in my java file. My file runs perfectly fine on Netbeans but does not clean and build. This is the reason I am using command line to compile and create the jar.

user207421
  • 305,947
  • 44
  • 307
  • 483

1 Answers1

-3

You may need to add the manifest file to the META-INF folder of myjar.jar

Can you show the project and jar folder structures?

Apofis82
  • 26
  • 2
  • The first sentence is exactly what the `m` option of the `jar` command does. The second sentence is a question, not an answer. – user207421 Nov 30 '16 at 21:50