I need help getting my java program ready for release. I have a program with three packages in each package are classes. Within one package is the class with main that requires all of the other classes when running. My question is how do I build this Java project so anyone can run it. The structure of the files is as follows:
- src/table/java files
- src/school/java files
- src/schoolSort/java files
The main is located in schoolSort/Main.java I have a Windows 7 set up and I have tried:
javac table/*.* school/*.* schoolSort/*.*
And this produced class files but the main file wont run. Help please. I am using Eclipse and have tried that too but it didnt seem to work.
In Eclipse, you can right click on your project and choose to export it as an executable jar. It will ask for your main class (through the run configuration you used) and you should be good to go from there.
Right click on project > Export > Java > Runnable Jar File