I'm relatively new to Java and I was trying to make one my programs more accessible to my non-computer savvy friends with java web start. I took my .class file and archived it with the command:
I then created a .jnlp file and uploaded the .jar file and the .jnlp file to a web server.
When I download and run the .jnlp file I get the following exception:
at java.security.AccessController.doPrivileged(NativeMethod)
at java.net.URLClassLoader.findClass(Unknown Source)
at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Here's a link to the site with all my files: http://nocookies92.webs.com/
If anyone could help me figure out what I did wrong, I'd greatly appreciate it. Thanks in advance.
I'm having trouble running my .jar file too, even from the command line. every time I try to run it gives me the windows "error" sound. Any suggestions?
Can you copy and paste here the contents of the command prompt screen when you try to run the jar? There could be info in the error message.
To copy the command prompt screen:
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper left again
Select Edit and click 'Copy'
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\person>cd my documents
C:\Documents and Settings\person\My Documents>TabbedLatinHelp.jar
C:\Documents and Settings\person\My Documents>
There's no error message, it just makes the "error" sound. My .class file runs perfectly fine when I run it from the command line by the way, so that's not the problem.
What you have pasted doesn't show any command. The commandline associated with the .jar file executes and reads the .jar file trying to find a manifest file with a Main-Class: entry. Does your jar file have a manifest with a Main-Class entry?
What do you think that entering the name of a jar file on a command line should do?
If you build the jar file, did you configure it so it could be executed?
Last edited by NormR1; Jul 30th, 2010 at 12:09 pm.
I just re-made the jar file with a manifest, here's my command prompt's contents:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
I get the same "error" sound when trying to run it, through both double clicking it and command line execution. The website I read told me that entering the name of the jar file on the command line was how to test the jar file. The Main-Class in the manifest is TabbedLatinHelp.
How do I configure a jar file to be executed, I thought it was executable automatically?
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.