943,027 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Marked Solved
  • Views: 803
  • Java RSS
You are currently viewing page 1 of this multi-page discussion thread
Jul 29th, 2010
0

Java Web Start Class not Found Exception

Expand Post »
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:

jar -cf TabbedLatinHelp.jar TabbedLatingHelp.class

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:

Java Syntax (Toggle Plain Text)
  1. java.lang.ClassNotFoundException: TabbedLatinHelp
  2. at java.net.URLClassLoader$1.run(Unknown Source)
  3. at java.security.AccessController.doPrivileged(Native Method)
  4. at java.net.URLClassLoader.findClass(Unknown Source)
  5. at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
  6. at java.lang.ClassLoader.loadClass(Unknown Source)
  7. at java.lang.ClassLoader.loadClass(Unknown Source)
  8. at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
  9. at com.sun.javaws.Launcher.run(Unknown Source)
  10. 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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nocookies92 is offline Offline
24 posts
since Mar 2010
Jul 29th, 2010
0
Re: Java Web Start Class not Found Exception
Check your spellings. The posted jar command shows a g in the class name?
Java is case sensitive.
Reputation Points: 915
Solved Threads: 499
Posting Expert
NormR1 is offline Offline
5,063 posts
since Jun 2010
Jul 29th, 2010
0
Re: Java Web Start Class not Found Exception
Yes, that's just a type-o on my part, I double checked the spelling and caps when I actually entered the command.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nocookies92 is offline Offline
24 posts
since Mar 2010
Jul 29th, 2010
0
Re: Java Web Start Class not Found Exception
Why not copy and paste rather than typing in the wrong data?

Did you check ALL your spellings? How many places are the class names spelled out?
Reputation Points: 915
Solved Threads: 499
Posting Expert
NormR1 is offline Offline
5,063 posts
since Jun 2010
Jul 29th, 2010
0
Re: Java Web Start Class not Found Exception
I didn't copy and paste because I archived it a day a ago. I guess I can go back and re-do the archiving again and check my spelling again.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nocookies92 is offline Offline
24 posts
since Mar 2010
Jul 29th, 2010
0
Re: Java Web Start Class not Found Exception
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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nocookies92 is offline Offline
24 posts
since Mar 2010
Jul 29th, 2010
0
Re: Java Web Start Class not Found Exception
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'

Paste here.
Reputation Points: 915
Solved Threads: 499
Posting Expert
NormR1 is offline Offline
5,063 posts
since Jun 2010
Jul 30th, 2010
0
Re: Java Web Start Class not Found Exception
Here's my command prompt screen:

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nocookies92 is offline Offline
24 posts
since Mar 2010
Jul 30th, 2010
0
Re: Java Web Start Class not Found Exception
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.
Reputation Points: 915
Solved Threads: 499
Posting Expert
NormR1 is offline Offline
5,063 posts
since Jun 2010
Jul 30th, 2010
0
Re: Java Web Start Class not Found Exception
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.

C:\Documents and Settings\person>cd my documents

C:\Documents and Settings\person\My Documents>jar cvfm TabbedLatinHelp.jar manif
est.txt TabbedLatinHelp.class
added manifest
adding: TabbedLatinHelp.class(in = 3432) (out= 1806)(deflated 47%)

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?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nocookies92 is offline Offline
24 posts
since Mar 2010

This thread is solved

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.
Message:
Previous Thread in Java Forum Timeline: How to add another button
Next Thread in Java Forum Timeline: Prices Array





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC