ich hab jetzt openjdk 11 installiert, das Programm startet zwar aber die Aktienkurse werden nicht installiert
#!/bin/bash
#
# Normally, editing this script should not be required.
# Only case is to set up JAVA_HOME if it's not already defined.
#
# To specify an alternative JVM, edit and uncomment the following
# line and change the path accordingly.
#JAVA_HOME=/usr/lib/java
JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
_JAVA_EXEC="java"
if [ -n $JAVA_HOME ] ; then
_TMP="$JAVA_HOME/bin/java"
if [ -f "$_TMP" ] ; then
if [ -x "$_TMP" ] ; then
_JAVA_EXEC="$_TMP"
else
echo "Warning: $_TMP is not executable"
fi
else
echo "Warning: $_TMP does not exist"
fi
fi
if ! which "$_JAVA_EXEC" >/dev/null ; then
echo "Error: No Java Runtime Environment found"
echo "Please set the environment variable JAVA_HOME to the root directory of your SUN Java installation, e.g. by editing the 7th line in this launcher script."
exit 1
fi
#
# Resolve the location of the JStock installation.
# This includes resolving any symlinks.
PRG=$0
while [ -h "$PRG" ]; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null`
if expr "$link" : '^/' 2> /dev/null >/dev/null; then
PRG="$link"
else
PRG="`dirname "$PRG"`/$link"
fi
done
JSTOCK_BIN=`dirname "$PRG"`
cd "${JSTOCK_BIN}"
_VMOPTIONS="-Xms64m -Xmx512m"
_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"
else
_JAVAFXOPTIONS=""
fi
$_JAVA_EXEC $_VMOPTIONS $_JAVAFXOPTIONS -jar jstock.jar
folgende Fehler
saturn@lenovo3000n200:~/jstock$ ./jstock.sh
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/home/saturn/jstock/lib/xstream-1.4.11.1.jar) to field java.util.TreeMap.comparator
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Security framework of XStream not initialized, XStream is probably vulnerable.
Security framework of XStream not initialized, XStream is probably vulnerable.
Security framework of XStream not initialized, XStream is probably vulnerable.
Security framework of XStream not initialized, XStream is probably vulnerable.
Security framework of XStream not initialized, XStream is probably vulnerable.
Security framework of XStream not initialized, XStream is probably vulnerable.
Security framework of XStream not initialized, XStream is probably vulnerable.
Security framework of XStream not initialized, XStream is probably vulnerable.
Security framework of XStream not initialized, XStream is probably vulnerable.
was ich nicht so ganz verstehe, es gibt 2 jstock varianten, eine gleich mit java im Ordner, die andere ohne java. Eigentlich müsste die version mit java ja auch das abgestimmte java haben.
ergänzend hab ich mal java oracle 8 runtergeladen um es hier mit zu versuchen
dazu habe ich den java ordner jdk1.8.0_202 in den Ordner Programme im Homeverzeichnis kopiert und den pfad entsprechend abgeändert
# Only case is to set up JAVA_HOME if it's not already defined.
#
# To specify an alternative JVM, edit and uncomment the following
# line and change the path accordingly.
JAVA_HOME= /home/Programme/jdk1.8.0_202/
_JAVA_EXEC="java"
if [ -n $JAVA_HOME ] ; then
_TMP="$JAVA_HOME/bin/java"
if [ -f "$_TMP" ] ; then
if [ -x "$_TMP" ] ; then
_JAVA_EXEC="$_TMP"
else
echo "Warning: $_TMP is not executable"
fi
else
echo "Warning: $_TMP does not exist"
fi
fi
if ! which "$_JAVA_EXEC" >/dev/null ; then
echo "Error: No Java Runtime Environment found"
echo "Please set the environment variable JAVA_HOME to the root directory of your SUN Java installation, e.g. by editing the 7th line in this launcher script."
exit 1
fi
#
# Resolve the location of the JStock installation.
# This includes resolving any symlinks.
PRG=$0
while [ -h "$PRG" ]; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null`
if expr "$link" : '^/' 2> /dev/null >/dev/null; then
PRG="$link"
else
PRG="`dirname "$PRG"`/$link"
fi
done
JSTOCK_BIN=`dirname "$PRG"`
cd "${JSTOCK_BIN}"
_VMOPTIONS="-Xms64m -Xmx512m"
_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"
else
_JAVAFXOPTIONS=""
fi
$_JAVA_EXEC $_VMOPTIONS $_JAVAFXOPTIONS -jar jstock.jar
beim Starten des Progs erscheint dann die fehlermeldung
saturn@lenovo3000n200:~/Programme/jstock$ ./jstock.sh
Warning: /saturn/Programme/jstock/jdk1.8.0_202 does not exist
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by com.thoughtworks.xstream.converters.reflection.SunUnsafeReflectionProvider (file:/home/saturn/.local/share/Trash/files/jstock.6/lib/xstream-1.4.11.1.jar)
WARNING: Please consider reporting this to the maintainers of class com.thoughtworks.xstream.converters.reflection.SunUnsafeReflectionProvider
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:990)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:593)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:515)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:484)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:430)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:369)
at org.yccheok.jstock.gui.Utils.getXStream(Utils.java:1785)
at org.yccheok.jstock.gui.Utils.fromXML(Utils.java:1819)
at org.yccheok.jstock.gui.JStock.getJStockOptionsViaXML(JStock.java:1803)
at org.yccheok.jstock.gui.JStock.main(JStock.java:1819)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @4411d970
at java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:353)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:329)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:277)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:179)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:173)
at com.thoughtworks.xstream.core.util.Fields.locate(Fields.java:40)
at com.thoughtworks.xstream.converters.collections.TreeMapConverter.<clinit>(TreeMapConverter.java:50)
... 10 more
saturn@lenovo3000n200:~/Programme/jstock$
jetzt weiss ich auch nicht mehr weiter, zumal vorher alles funktioniert hat