Reputation: 21
Can some tell me how/if I can convert a bluej project into a packaged jar that can be run by clicking on it? I have to convert a big project I'm working on in BlueJ into a packaged jar and I'm really not sure how to go about that. Thanks and sorry if this is a stupid question.
Upvotes: 2
Views: 624
Reputation: 1152
in addition to the stuff mentioned already, you'll need to run the java launcher with the -jar flag, e.g.
java -jar myProgram.jar
This tells the launcher it's dealing with an archive/whole app and not just a class.
Upvotes: 0
Reputation: 901
Go to File > Create Jar File and then choose your main class. If you're making a Swing (GUI) application, this is the class which creates your main JFrame. If this is not a GUI application, then this is whichever class makes the program start i.e. the controller class. Remember, if you are not making a GUI application and are only using System.out.println();
then you need to run it through your terminal application (command prompt for Windows and terminal for OSX/Linux).
Upvotes: 1