Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unable to run application outside of IDE.

843789May 27 2010 — edited Jun 2 2010
I am VERY NEW to JAVA SE. I have written several small applications, each with a swing library. I am using a MAC computer OSX 10.6.3, and NetBeans 6.8. The applications run fine within the IDE. However, when I copied the "dist" folder to the desktop and tried to run them in either the terminal or X-11 terminal window, they would not run:

From within the terminal window, I first changed to the desktop, and then entered the following:

java -jar "MyApplication.jar"

I got an error message "Unable to access jarfile MyApplication.jar

I also tried to run them on a PC running XP Pro through the CMD window and was unsuccessful.

I got the same error message "Unable to access jarfile MyApplication.jar

I then ran one of the applications through "Jar Bundler", and created a folder called "MyApplication.app". Again this would not run on the desktop of my MAC. The ICON would very briefly flash on the DOC, and then disappear - there was no error message.

Obviously something is very wrong, but I cannot figure it out.

Any thoughts on where to look would be appreciated.

Thanks.......

Bob
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 30 2010
Added on May 27 2010
34 comments
1,116 views