• 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

Can't run project from command line.

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is probably a simple question for all of you who do a lot of work at at the command line with jarred bundles, but it a brave new world for me!
Anyway, my project works fine in my ide. From the command line I'm entering:

I get back:

If I click on the jar file in Windows, I get a Window error box that says:
"Could not find the main class. Program will exit!"
My manifest file says this:

And the class RunGui.class is in fact in the jar file.
If I change the Main-Class name in the manifest file to the fully qualified path, I get:


So I don't think that's right either.
Any idea what I'm doing wrong?
Thanks!
Kirk
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kirk,
If you use package you should have package.name.class with dots, not slashes.
HTH
/Torgny
 
Kirk Maze
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Torgny! I just came back to post that I'd figured it out, but you'd already beat me to it. Funny how you can get so wedded to an OS with a gui!
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Indeed !
If it doesn\t work with slashes use dots, for rmic it's the package name (dots) for javac it's path (slashes). For getResource() it's slashes. So it's conistent, in a way
Cheers
/T
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic