• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Jar files

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I Just installed java 1.5beta on my computer and am trying to create an executable jar file for one of my programs. I type this line from the directory which 1.5 is installed:

jar cmf Calc2.mf Calc2.jar Calc2.class ....

When i use the java -jar Calc2.jar int the directory it runs fine, but if you double click on the executable jar file, an error pops up that says that the main class cannot be found, what could be causing this problem?
Thank you and GOD Bless
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is your manifest file?
Did it work with 1.4?
 
Matthew Middleton
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my manifest file is just Calc2.mf, it includes just:
Manifest-Version: 1.0
Main-Class: Calc2
and it did work w/1.4, i wanted to use it in 1.5 b/c i think the decorated look and feel looks a lot more professional

Thanks again and GOD Bless
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When i use the java -jar Calc2.jar int the directory it runs fine, but if you double click on the executable jar file, an error pops up that says that the main class cannot be found, what could be causing this problem?

I'd guess that either something is wrong with your newly installed JRE, or that your system isn't quite configured correctly anymore. I'd also guess that your JAR file is fine.

Perhaps something is askew with the file associations in your operating system (OS). Which OS are you running? Are you familiar with fixing file associations in your OS?
 
Matthew Middleton
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my OS is windows XP i checked the file association, i'll try it again, maybe it's associated w/the wrong javaw and can't be read. Thanks and GOD Bless
 
joke time: What is brown and sticky? ... ... ... A stick! Use it to beat this tiny ad!
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic