After creating a Java Desktop Application, adding Frames and Containers, adding event listeners, and customizing the application, the only thing left is creating an executable. And making a lot of money (of course!).
It is necessary to have the sources of a Java Desktop Database Application in your NetBeans project folder.
It is necessary to have Java DB up and running. If unsure how to do this, please refer to Chapter 4, Setting up Apache Derby/Java DB.
The recipe, Creating a Java Desktop Database Application, would be of great help in understanding why the design and components listed here are presented in this manner.
With the Java Desktop Database Application open:
The output window will show the path in which the JAR file was placed.
To distribute the application, simply compress the application in the desired format - ZIP and RAR are the most popular - and distribute it.
When the Clean and Build task is executed, NetBeans generates the JAR file and automatically copies all the necessary libraries to the lib
folder.
Here is a list of the libraries contained in lib
folder, as shown in the next screenshot:
How to execute and view the contents of JAR files.
The IDE already gives, through the output window, all the required information to perform this task, but in case you missed it, here it goes:
Under Linux:
java -jar "<USER_DIRECTORY>/NetBeansProjects/DesktopApplicationDB/dist/DesktopApplicationDB.jar"
Under Windows:
The same java jar
command from Linux can be used, pay attention to the different file delimiter present in windows.
18.117.233.26