Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 2nd, 2013, 08:01 PM
AlphaWolf918 AlphaWolf918 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2013
Posts: 3 AlphaWolf918 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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 )

Reply With Quote
  #2  
Old March 3rd, 2013, 05:43 AM
NormR's Avatar
NormR NormR is offline
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Aug 2010
Location: SW Missouri
Posts: 2,955 NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 2 h 53 m 34 sec
Reputation Power: 345
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.

Reply With Quote
  #3  
Old March 3rd, 2013, 10:13 PM
AlphaWolf918 AlphaWolf918 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2013
Posts: 3 AlphaWolf918 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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?

Reply With Quote
  #4  
Old March 4th, 2013, 06:12 AM
NormR's Avatar
NormR NormR is offline
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Aug 2010
Location: SW Missouri
Posts: 2,955 NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 2 h 53 m 34 sec
Reputation Power: 345
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.

Reply With Quote
  #5  
Old March 4th, 2013, 08:58 AM
AlphaWolf918 AlphaWolf918 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2013
Posts: 3 AlphaWolf918 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.

Reply With Quote
  #6  
Old March 4th, 2013, 09:02 AM
NormR's Avatar
NormR NormR is offline
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Aug 2010
Location: SW Missouri
Posts: 2,955 NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 2 h 53 m 34 sec
Reputation Power: 345
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Jar Help

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap