SUSE / openSUSEThis Forum is for the discussion of Suse Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Jar files are executable if you have java virtual machine is installed. At least you can do a batch file or script which acts like executable, that contains like
java -xvj <name>.jar
Dont remember (xvj) switches exactly it may be different
Distribution: Kubuntu, Ubuntu server, SuSE 11, Knoppix, Puppy, Myth. Oh alright then, all of them
Posts: 177
Rep:
Or just use NetBeans to create the jar file and manifest.
You can then test it in NetBeans plus edit files and update the jar file plus it's manifest easily.
Just follow sadun's instructions run outside of NetBeans.
but i still dont get how to create a new JAR file ??
all i had to do is to right click on the project name on the left and choose build
then the jar file appeared in /dist directory, but it didnt appear in the project tree in the IDE
but another problem arrised, my application is a DB application, when I run it from the jar file it doesnt work with the DB at all, ie when I submit any data or try to retrieve from the DB nothing at all happens !!!!!!!!!!!!!
the DB is with mysql
here is what i get when i try to communicate with the DB
john@linux:~/JavaProjects/SoccerSafe/dist> java -jar Soccer.jar
java.lang.NoClassDefFoundError: com/mysql/jdbc/NonRegisteringDriver
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.john.db.query.retrieve(query.java:47)
at matchResultFrame.submitData(matchResultFrame.java:136)
at matchResultFrame.submitResultActionPerformed(matchResultFrame.java:120)
at matchResultFrame.access$000(matchResultFrame.java:15)
at matchResultFrame$1.actionPerformed(matchResultFrame.java:71)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Distribution: Kubuntu, Ubuntu server, SuSE 11, Knoppix, Puppy, Myth. Oh alright then, all of them
Posts: 177
Rep:
Quote:
then the jar file appeared in /dist directory, but it didnt appear in the project tree in the IDE
Oops, sorry thats me going back to NB 3.*.
To make changes in 4.1 right click on the project and choose properties.
Then check the nodes shown for various properties.
3.* used to be lovely for this!
For your db its possible but I'm not 100% that you may need to add some library (JDBC?) to your jar, again from the project properties dialogue.
Although I thought you could choose a connection, assuming you've created one, from the runtime listing?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.