[27] | 1 | ======================== |
---|
| 2 | BUILD OUTPUT DESCRIPTION |
---|
| 3 | ======================== |
---|
| 4 | |
---|
| 5 | When you build an Java application project that has a main class, the IDE |
---|
| 6 | automatically copies all of the JAR |
---|
| 7 | files on the projects classpath to your projects dist/lib folder. The IDE |
---|
| 8 | also adds each of the JAR files to the Class-Path element in the application |
---|
| 9 | JAR files manifest file (MANIFEST.MF). |
---|
| 10 | |
---|
| 11 | To run the project from the command line, go to the dist folder and |
---|
| 12 | type the following: |
---|
| 13 | |
---|
| 14 | java -jar "Jung.jar" |
---|
| 15 | |
---|
| 16 | To distribute this project, zip up the dist folder (including the lib folder) |
---|
| 17 | and distribute the ZIP file. |
---|
| 18 | |
---|
| 19 | Notes: |
---|
| 20 | |
---|
| 21 | * If two JAR files on the project classpath have the same name, only the first |
---|
| 22 | JAR file is copied to the lib folder. |
---|
| 23 | * Only JAR files are copied to the lib folder. |
---|
| 24 | If the classpath contains other types of files or folders, none of the |
---|
| 25 | classpath elements are copied to the lib folder. In such a case, |
---|
| 26 | you need to copy the classpath elements to the lib folder manually after the build. |
---|
| 27 | * If a library on the projects classpath also has a Class-Path element |
---|
| 28 | specified in the manifest,the content of the Class-Path element has to be on |
---|
| 29 | the projects runtime path. |
---|
| 30 | * To set a main class in a standard Java project, right-click the project node |
---|
| 31 | in the Projects window and choose Properties. Then click Run and enter the |
---|
| 32 | class name in the Main Class field. Alternatively, you can manually type the |
---|
| 33 | class name in the manifest Main-Class element. |
---|