[CentOS] Opening a jar file from the desktop

Fri Feb 1 15:42:23 UTC 2013
James B. Byrne <byrnejb at harte-lyne.ca>

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