Search code examples
javanetbeansjarderby

creating jar file for java appication using derby database


I have recently developed a school management system in java netbeans using derby(java built in database).Now i want to make a jar file and proivide it to my client .So can this jar run on client pc without netbeans or java installed? and what about database?


Solution

  • Java must be installed with at least the version of java you used. Embedded databases need no extra installation other than in your code.

    Starting from a jar is a bit different than in the IDE from a class path. A jar contains only read-only resources, and the file names in the jar (zip archive) are case-sensitive.

    It could be that the software first has to use a resource file as initial template to be copied to the file system. Like a prefilled database to be written to.

    • Java 9 can use jlink to create your own smaller JRE, java run time. (I do not think you are using java 9 though.)
    • Java 8 has a javapackager.