I have java-1.7.0-openjdk installed on a CentOS-6.3 x86_64 system. On my desktop I have a jar file containing a calculator program which runs fine on CentOS-5 and on MS-Windows machines. On the CentOS-6 system when I right-click on the jar file and say open with java nothing apparently happens. When I double-click on it then I see a file browser window offering to extract the contents but there are no contents visible, only an empty / directory. If I go to the desktop in a terminal session and type java superbcalc.jar then I see this message: "Could not find or load main class superbcalc.jar" There is no CLASSPATH environment variable set by the system. If I provide one and include the current directory '.' I get the same error. CLASSPATH=. java superbcalc.jar Error: Could not find or load main class superbcalc.jar What has changed in CentOS-6 to stop this from working and how do I get jar files to open and run using Java both from the command line and from the desktop? -- *** E-Mail is NOT a SECURE channel *** James B. Byrne mailto:ByrneJB at Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3
On Fri, 1 Feb 2013 10:42:23 -0500 James B. Byrne wrote:> how do I > get jar files to open and run using Java both from the command line > and from the desktop?Create a small script or a launcher (right-click on desktop, Create Launcher) containing the following: java -jar nameofjar.jar -- MELVILLE THEATRE ~ Real D 3D Digital Cinema ~ www.melvilletheatre.com www.creekfm.com - FIFTY THOUSAND WATTS of POW WOW POWER!
On Fri, February 1, 2013 10:59, Reindl Harald wrote:> java -jar superbcalc.jarThank you. -- *** E-Mail is NOT a SECURE channel *** James B. Byrne mailto:ByrneJB at Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3