• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with Jar

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I finished developing a program in the Eclipse IDE, so I exported it to a Jar file. My computer intially opened up the Jar file using winzip, so i changed the default program to open it with to Java (TM) Platform SE Binary.
Now when I double click on the icon, the timer glass shows for about 1-2 seconds and then thats it, nothing else happens. I can't get my program to open up outside of my IDE.

If anyone could help I would greatly appreciate it.

Thanks.
 
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How did you set the entry point in Eclipse?

Have you read the Java Tutorials section?
 
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
check do you have main class in your jar and if it is ok
add mainfiest to your jar
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Victor O'Sullivan:
.. thats it, nothing else happens.



If you run the jar from the command line, you can find out from the exception(s) what is going wrong and fix it accordingly.
 
Victor O'Sullivan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I ran it from the command line, and again nothing happens. The command prompt just re-appears.

Yes, I have set the entry point in Eclipse. This was done in the Exporting wizard.

The manifest file looks like this
 
Campbell Ritchie
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is that manifest file finished with a blank line?
 
Victor O'Sullivan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes it is
 
Campbell Ritchie
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't know; you appear so far to have done everything correctly. What command are you using to start the jar from a command line?

And sorry we haven't been able to help any better yet.

[Edit]Alter inappropriate tongue smilie to something more appropriate (Sorry)[/edit]
[ December 04, 2008: Message edited by: Campbell Ritchie ]
 
Victor O'Sullivan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I had been just typing the name of the jar ... may have been a foolish mistake



But recently i tried



and the following exception occurred



Might this mean there is something missing from my Manifest file in realtion to the DB driver?
 
Victor O'Sullivan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I managed to solve my problem. I informed that I could not put a database driver into my jar file, so I created a .bat file to run a command to execute the jar file and connect to the sepertate driver.

A scincere thanks to everyone who helped along the way.
 
Campbell Ritchie
Marshal
Posts: 79178
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well done sorting it out.
 
reply
    Bookmark Topic Watch Topic
  • New Topic