yccheok / jstock

JStock is a free stock market software for 28 countries.
https://jstock.org
657 stars 345 forks source link

jstock-1.0.7.47-bin, jdk1.8.0_271-arm32-vfp-hflt, java.lang.NoClassDefFoundError: org/jdesktop/jxlayer/JXLayer #164

Open elizabethexpialadocious opened 3 years ago

elizabethexpialadocious commented 3 years ago

hi, I received the error:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: org/jdesktop/jxlayer/JXLayer
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
    at java.lang.Class.getMethod0(Class.java:3018)
    at java.lang.Class.getMethod(Class.java:1784)
    at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:650)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:632)
Caused by: java.lang.ClassNotFoundException: org.jdesktop.jxlayer.JXLayer
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)

upon starting './jstock.sh' using jstock-1.0.7.47-bin with jdk1.8.0_271-arm32-vfp-hflt on raspberry pi. However, creating a directory in the default jstock folder and copying all the*.jar files thereto remedied the issue. e.g.

cd jstock-1.0.7.47-bin
mkdir lib
cp *.jar lib

I also get 'Unrecognized option: --module-path' unless I comment out the _JAVAFXOPTIONS stuff:

_JAVAFXPATH="/usr/share/openjfx/lib"
if [[ (-d "$_JAVAFXPATH") && (-f "$_JAVAFXPATH/javafx.base.jar") ]] ; then
#   _JAVAFXOPTIONS="--module-path $_JAVAFXPATH --add-modules=javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web"
    echo 
else
    _JAVAFXOPTIONS=""
fi