Ok.
I gave up trying to use java 8
So I used OpenSuse repository that is running java 7
But now, also does not run,
See what happens when I try to use the file PgdCarneLeao.jar
sergio@linux-kplg:~/Documentos/LEAO2015> java PgdCarneLeao.jar
Error: Could not find or load the main class PgdCarneLeao.jar
Redirecting Error Message for ‘LEAO2015.log’ …
This is the contents of the file ‘LEAO2015.log’ …
sergio@linux-kplg:~/Documentos/LEAO2015> cat /home/sergio/ProgramasRFB/LEAO2015/LEAO2015.log
Sistema: Linux
Java: 1.7.0_55
java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
at java.awt.Window.<init>(Window.java:535)
at java.awt.Frame.<init>(Frame.java:420)
at java.awt.Frame.<init>(Frame.java:385)
at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1756)
at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1831)
at javax.swing.JWindow.<init>(JWindow.java:185)
at gov.serpro.carneleao.gui.at.<init>(Unknown Source)
at gov.serpro.app.a.<init>(Unknown Source)
at gov.serpro.app.PGDCarneLeao.<init>(Unknown Source)
at gov.serpro.app.PGDCarneLeao.main(Unknown Source)
Exception in thread "main" java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:207)
at java.awt.Window.<init>(Window.java:535)
at java.awt.Frame.<init>(Frame.java:420)
at java.awt.Frame.<init>(Frame.java:385)
at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1756)
at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1831)
at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1697)
at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:863)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:667)
at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:638)
at classes.aj.a(Unknown Source)
at gov.serpro.app.PGDCarneLeao.main(Unknown Source)
What should I do to run .jar files?
Please, any idea is welcome
This needed to be clarified first…
Where your Java is coming from.
The procedures for installing Java from Oracle are different than when installing Java from any of the openSUSE repositories.
I recognized the error you first described, it’s what you see when you install the Java JDK RPM downloaded from Oracle. The RPM installs the JDK files in its own folder tree but does not symlink the files so that the system knows where they are and does not install/configure appropriate update-alternatives. BTW - IMO this is better than some cookbooks which install the JDK directly into the usual library tree which would stomp over other versions of Java… By installing in its own separate tree and symlinking, this permits side by side installation of different JDK.
As of today, AFAIK there is an unresolved bug following the SDB to install Oracle SE JDK 8, so do not recommend that. Install the 8 version of openjdk-devel for now from the openSUSE repos.
Yes, at this time the scripts support only Oracle SE JDK 7, both i586 (which is 32-bit) and x64 (which is 64-bit) (You’ll find both sets of scripts in your clone or download).
Until some issues are resolved specific to JDK 8, I haven’t released working scripts for that.
But, JDK 7up75(current latest Oracle release) will absolutely work.
Install the SE 7 JDK RPM, downloaded from oracle using the link I provided.
You can download the scripts I provided a number of different ways.
You can click on the ZIP link in the ri pane.
Or,
The instructions I provide describe how to use “git clone” which creates a local copy of everything I provided. It also means that in the future if you want to download an updated copy of my scripts, you only need to run “git pull”
Assuming that you are running on a 64-bit version of openSUSE (any version)
Open a root console
cd x64
if you run ls, you should then see the scripts for a 64-bit system, they should also all be already executable.
Execute each script in order, for example
./1.* tab to complete *
./2.* tab to complete*
and so on.
The name of of each script describes what the script does. When you have completed your last script, you’re done!
Well, actually as my README describes, you still need to run update-alternatives to set your system to your newly installed JDK