The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Programming Languages
> Java Help
|
Jar Help
Discuss Jar Help in the Java Help forum on Dev Shed. Jar Help Java Help forum discussing all Java platforms - J2ME, J2SE and J2EE - as well as relevant standards, APIs and frameworks such as Swing, Servlets, JSPs, Applets, Struts, Spring, Hibernate, ANT, EJB, and other Java-related topics.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

March 2nd, 2013, 08:01 PM
|
|
Registered User
|
|
Join Date: Mar 2013
Posts: 3
Time spent in forums: 20 m 41 sec
Reputation Power: 0
|
|
|
Jar Help
Hello everyone. I'm relatively new to Java and have written a couple of programs, but there's only one I'm trying to get deployed. When I make the Jar, it works for me, as well as on my other computer, but they each have the JDK installed on them, so I don't know if that matters. Once I have the Jar made, I use JSmooth to turn it into an executable, which also works fine for me. The error, however, is that neither the Jar nor the executable will work for anyone else, and I was wondering if anyone had any pointers on how I would go about that?
Thank you.
edit: Sorry, the error that pops up when others try to run it says "Could not find main class: FILENAME.class"
(would rather not divulge the name of it just yet  )
|

March 3rd, 2013, 05:43 AM
|
 |
Contributing User
|
|
Join Date: Aug 2010
Location: SW Missouri
|
|
Quote: | Could not find main class: FILENAME.class" |
The name in the message looks like a filename not a classname.
A classname would not end with .class.
Try removing the .class from the name of the class.
|

March 3rd, 2013, 10:13 PM
|
|
Registered User
|
|
Join Date: Mar 2013
Posts: 3
Time spent in forums: 20 m 41 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by NormR The name in the message looks like a filename not a classname.
A classname would not end with .class.
Try removing the .class from the name of the class. |
See, that's the thing. In the manifest file, all I put is:
Main-Class: FileName
(Return included)
So I really don't understand what's going on. Anyone else got a suggestion?
|

March 4th, 2013, 06:12 AM
|
 |
Contributing User
|
|
Join Date: Aug 2010
Location: SW Missouri
|
|
|
Try this to get better error messages:
Open a command prompt window, change to the folder with the jar file and enter:
java -jar THEJARFILENAME.jar
copy the full contents of the command prompt window and paste it here.
|

March 4th, 2013, 08:58 AM
|
|
Registered User
|
|
Join Date: Mar 2013
Posts: 3
Time spent in forums: 20 m 41 sec
Reputation Power: 0
|
|
Quote: | Originally Posted by NormR Try this to get better error messages:
Open a command prompt window, change to the folder with the jar file and enter:
java -jar THEJARFILENAME.jar
copy the full contents of the command prompt window and paste it here. |
I understand what you're saying and I appreciate the help, but I don't think you understand. The Jar works fine for me, on both of my computers. It's others that it doesn't work for. It runs flawlessly on mine, so the Jar isn't really the issue; the issue I think is something missing, but I'm trying to figure out what.
|

March 4th, 2013, 09:02 AM
|
 |
Contributing User
|
|
Join Date: Aug 2010
Location: SW Missouri
|
|
Quote: | It's others that it doesn't work for. |
Do what I suggested on the computer where there is a problem.
Doing it where there isn't a problem won't show you what the problem is on some other computer.
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|