linux:/opt/Jabref # java JabRef-2.10.jar
Exception in thread "main" java.lang.NoClassDefFoundError: JabRef-2.10.jar
at gnu.java.lang.MainThread.run(libgcj.so.14)
Caused by: java.lang.ClassNotFoundException: JabRef-2.10.jar not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.14)
at java.lang.ClassLoader.loadClass(libgcj.so.14)
at java.lang.ClassLoader.loadClass(libgcj.so.14)
at gnu.java.lang.MainThread.run(libgcj.so.14)
linux:/opt/Jabref # java -jar JabRef-2.10.jar
WARNING: You are running Java version 1.6 or lower (1.5.0 to be exact).
JabRef needs at least a Java Runtime Environment 1.6 or higher.
JabRef should not start properly and output an error message
(probably java.lang.UnsupportedClassVersionError ... (Unsupported major.minor version 49.0)
See http://jabref.sf.net/faq.php for more information.
WARNING: You are not running a Java version from Oracle (or Sun Microsystems).
Your java vendor is: Free Software Foundation, Inc.
If JabRef crashes please consider switching to an Oracle Java Runtime.
See http://jabref.sf.net/faq.php for more information.
ERROR while starting or running JabRef:
java.awt.AWTError: Cannot load AWT toolkit:
at java.awt.Toolkit.getDefaultToolkit(libgcj.so.14)
at javax.swing.plaf.basic.BasicLookAndFeel.initialize(libgcj.so.14)
at javax.swing.UIManager.setLookAndFeel(libgcj.so.14)
at javax.swing.UIManager.<clinit>(libgcj.so.14)
at java.lang.Class.initializeClass(libgcj.so.14)
at javax.swing.UIManager.getUI(libgcj.so.14)
at javax.swing.JLabel.updateUI(libgcj.so.14)
at javax.swing.JLabel.<init>(libgcj.so.14)
at javax.swing.JLabel.<init>(libgcj.so.14)
at net.sf.jabref.external.ExternalFileType.<init>(ExternalFileType.java:31)
at net.sf.jabref.JabRefPreferences.<init>(JabRefPreferences.java:118)
at net.sf.jabref.JabRefPreferences.getInstance(JabRefPreferences.java:143)
at net.sf.jabref.JabRef.<init>(JabRef.java:92)
at net.sf.jabref.JabRef.main(JabRef.java:84)
at java.lang.reflect.Method.invoke(libgcj.so.14)
at net.sf.jabref.JabRefMain.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException:
at java.lang.Class.forName(libgcj.so.14)
at java.awt.Toolkit.getDefaultToolkit(libgcj.so.14)
...15 more
Please first check if this problem and a solution is already known. Find our...
* ...FAQ at http://jabref.sf.net/faq.php and our...
* ...user mailing-list at http://sf.net/mailarchive/forum.php?forum_name=jabref-users
If you do not find a solution there, please let us know about the problem by writing a bug report.
You can find our bug tracker at http://sourceforge.net/p/jabref/bugs/
* If the bug has already been reported there, please add your comments to the existing bug.
* If the bug has not been reported yet, then we need the complete error message given above
and a description of what you did before the error occured.
We also need the following information (you can copy and paste all this):
* Java Version: 1.5.0
* Java Vendor: Free Software Foundation, Inc.
* Operating System: Linux (3.14.0-rc5-1-desktop)
* Hardware Architecture: x86_64
We are sorry for the trouble and thanks for reporting problems with JabRef!
Exception in thread "main" java.lang.NoClassDefFoundError: javax.swing.UIManager
at java.lang.Class.initializeClass(libgcj.so.14)
at javax.swing.UIManager.getUI(libgcj.so.14)
at javax.swing.text.JTextComponent.updateUI(libgcj.so.14)
at javax.swing.text.JTextComponent.<init>(libgcj.so.14)
at javax.swing.JEditorPane.<init>(libgcj.so.14)
at net.sf.jabref.JabRefMain.main(Unknown Source)
linux:/opt/Jabref # zypper in libgcj.so.14
PackageKit is blocking zypper. This happens if you have an updater applet or other software management application using PackageKit running.
Tell PackageKit to quit? [yes/no] (no): yes
PackageKit is still running (probably busy).
Try again? [yes/no] (no): yes
Loading repository data...
Reading installed packages...
'libgcj.so.14' not found in package names. Trying capabilities.
'libgcj48-32bit' providing 'libgcj.so.14' is already installed.
Resolving package dependencies...
Nothing to do.
[quote=“karaisan”]
WARNING: You are not running a Java version from Oracle (or Sun Microsystems).
Your java vendor is: Free Software Foundation, Inc.
If JabRef crashes please consider switching to an Oracle Java Runtime.
See jabref.sf.net/faq.php for more information.
Java Version: 1.5.0
Java Vendor: Free Software Foundation, Inc.
Operating System: Linux (3.14.0-rc5-1-desktop)
Hardware Architecture: x86_64
[/code]
你现在运行的 Java 不是你在 Oracle 官网下载安装的 JRE,而是 Free Software Foundation 的 openjdk。openSUSE 默认的 Java 是开源的 openjdk,要用闭源 JRE 你要用 alternative 把软链接改过来:
linux:/opt/Jabref # zypper rm icedtea-web
Loading repository data…
Reading installed packages…
Package ‘icedtea-web’ is not installed.
‘icedtea-web’ not found in package names. Trying capabilities.
No provider of ‘icedtea-web’ is installed.
Resolving package dependencies…
Nothing to do.
linux:/opt/Jabref # update-alternatives --install “/usr/bin/java” “java” “/usr/java/latest/bin/java” 1
linux:/opt/Jabref # update-alternatives --set java /usr/java/latest/bin/java
update-alternatives: using /usr/java/latest/bin/java to provide /usr/bin/java (java) in manual mode
linux:/opt/Jabref # rpm -ql jre | grep libnpjp2.so
/usr/java/jre1.7.0_60/lib/amd64/libnpjp2.so
linux:/opt/Jabref # plugin=$(rpm -ql jre | grep libnpjp2.so)
linux:/opt/Jabref # ln -sv “$plugin” /usr/lib64/browser-plugins/
‘/usr/lib64/browser-plugins/libnpjp2.so’ -> ‘/usr/java/jre1.7.0_60/lib/amd64/libnpjp2.so’
linux:/opt/Jabref # java -jar JabRef-2.10.jar
六月 11, 2014 2:35:19 下午 java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Found 2 plugin(s):