I was writing a simple program using a Java application (not application that has projects, but application within a project; .java) that has a single frame. Both of the files are .java so I can't write a manifest needed by the JAR.
The MyApp.java starts like a class with package, imports then public class MyApp and has a main function, but it's still .java file! I'm writing it in JDeveloper 11g if it helps.
Any ideas how to make a JAR from these files?
解决方案
Open a command prompt.
Go to the directory where you have your .java files
Create a directory build
Run java compilation from the command line
javac -d ./build *.java
if there are no errors, in the build directory you should have your class tree
move to the build directory and do a
jar cvf YourJar.jar *
For adding manifest check jar command line switches