Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Executing a jar file from desktop

 
Jennifer Sohl
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. I have created a shortcut on my desktop to javaw.exe. I am then specifying the directory that the jar file is in, and then the main class like this:

When I execute the jar file it works great.
However, I want to change the drive and directory that these jar files are located in. I copied the jar files to a different directory so now my target looks like this:

When I try to run this, it says it can't find the main class?? What am I forgetting? Why does it work in one directory and not the other?
Thanks for any help!
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does the Manifest in your Jar file say?
 
Jennifer Sohl
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I exported these classes from VAJ 3.5.3 to a jar file, so the manifest file was automatically generated. It has A LOT of stuff in it. Do you want me to post all of it here?
 
Jennifer Sohl
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cindy,
Nevermind, I figured out what I did wrong. Before I had just copied the jar file from one directory to another. I figured out I actually had to go back into Visual Age and actually export it to the new directory.
Thanks for the nudge!
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No - just check to be sure that it does not reference anything in the OLD location.
Silly question, but you DID move the 2 jar files to the new location in E:\JavaApps didn't you?? Of course, of course . . . just checking.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic