This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 222682

Summary: I am getting an error when I attempt to open a .jar file. The error window says "The Java JAR file "program name" could not be launched. Check the Console for possible error messages.".
Product: platform Reporter: joni_espino
Component: -- Other --Assignee: Stanislav Aubrecht <saubrecht>
Status: RESOLVED INCOMPLETE    
Severity: normal CC: jhavlin
Priority: P3    
Version: 7.2   
Hardware: Macintosh   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log

Description joni_espino 2012-11-24 03:02:11 UTC
Product Version = NetBeans IDE 7.2 (Build 201207171143)
Operating System = Mac OS X version 10.8.2 running on x86_64
Java; VM; Vendor = 1.6.0_37
Runtime = Java HotSpot(TM) 64-Bit Server VM 20.12-b01-434
Comment 1 joni_espino 2012-11-24 03:02:16 UTC
Created attachment 128332 [details]
IDE log
Comment 2 Jaroslav Havlin 2012-11-26 15:11:18 UTC
Do you mean opening JAR file inside the IDE? I cannot reproduce it.
Can you please provide exact steps to reproduce? Thanks.
Comment 3 joni_espino 2012-11-27 03:58:02 UTC
I am new to the programming environment and to NetBeans as well, and also I am learning English, so I hope these steps are clear for you; if it is not clear, just let me know. Thanks.

Steps:
- After writing and testing the code for my program in NetBeans, I clicked on the button "Clean and Build Project" (right next to the Run Project button).
- Then I followed this path to find the .JAR file: Documents/NetBeans/ProgramName/dist/ProgramName.jar
- Then I double-clicked on the ProgramName.jar file to run the application/program I created, and here's where I get the window error.

My classmates are able to create and run the ProgramName.jar file on their computers running Windows 7.
Comment 4 Jaroslav Havlin 2012-11-27 08:50:12 UTC
Have you set the main class correctly?
(Right-click on project -> Properties -> Run -> Main Class).

Please try to run the JAR file from system console (terminal), it may give you more information.
(java -jar Documents/NetBeans/ProgramName/dist/ProgramName.jar)
Comment 5 Stanislav Aubrecht 2012-11-29 15:30:09 UTC
Looks more like an user than a bug in NetBeans. Please attach a screen shot of the error message you are getting and reopen, thanks.