Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable To Run Jar File... Urgent....

 
Somnath Mallick
Ranch Hand
Posts: 482
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

I wrote some code in Eclipse then i created a runnable jar file from the export option. But my problem is I am unable to run it.
I run the command java -jar NameRemoval.jar
I get the error message as "Unable to access jarfile NameRemoval.jar".

My jar file is in the folder E:\Important Documents\Name Removal Folder. And I am executing the command from within that folder.

I am using java 1.6. Please help. Extremely urgent....
 
Albareto McKenzie
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Somnath, maybe this can help you:
http://forums.sun.com/thread.jspa?threadID=644420&tstart=60

And you can get a lot of information from google http://www.google.com/search?hl=en&q=%22Unable+to+access+jarfile%22

Good luck!! ;)
 
Somnath Mallick
Ranch Hand
Posts: 482
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have run the the file with the full path as well but still didn't work.

When I run the jar command with the full path I get the error:
Unable to acsess jarfile: E:\Important.

I did a google to find my solution first. But i found nothing of use. So i posted here.

 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your jar file path contains white spaces.
Put the whole path into quotes.
 
Somnath Mallick
Ranch Hand
Posts: 482
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ran the command java -jar "E:\Important Documents\Name Removal\NameRemoval.jar". Still I got the error...

Unable to access jarfile E:\Important Documents\Name Reomval\NameRemoval.jar
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
E:\Important Documents\Name Removal\NameRemoval.jar
E:\Important Documents\Name Reomval\NameRemoval.jar


 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic