trex-stateless-gui icon indicating copy to clipboard operation
trex-stateless-gui copied to clipboard

trex-stateless-gui-v4.5.6 not find the java

Open digger-yu opened this issue 2 years ago • 1 comments

hi i use the trex-stateless-gui-v4.5.6.tgz) on ubuntu 18.04 The following errors were encountered What steps are missing

root@dperf:~/gui# java -version java version "1.8.0_333" Java(TM) SE Runtime Environment (build 1.8.0_333-b02) Java HotSpot(TM) 64-Bit Server VM (build 25.333-b02, mixed mode) root@dperf:~/gui# ./trex-stateless-gui Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:873) Caused by: java.lang.UnsupportedOperationException: Unable to open DISPLAY at com.sun.glass.ui.gtk.GtkApplication.lambda$new$5(GtkApplication.java:142) at java.security.AccessController.doPrivileged(Native Method) at com.sun.glass.ui.gtk.GtkApplication.(GtkApplication.java:140) at com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(GtkPlatformFactory.java:41) at com.sun.glass.ui.Application.run(Application.java:147) at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:279) at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:211) at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675) at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:337) at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328) ... 5 more If you experience issues running TRex GUI application, try using Oracle Java Please download and install latest Oracle Java 8 Runtime environment (JRE8) and add it to PATH environment variable Java download location: https://java.com/ru/download/ Manually choose package(or different OS): https://java.com/ru/download/manual.jsp manual run command: $JRE_PATH/bin/java -jar trex-stateless-gui.jar root@dperf:~/gui#

digger-yu avatar Jun 22 '22 00:06 digger-yu

I did download Oracle's JRE jre-8u341-linux-x64.tar.gz, unpacked it in the directory where I have the .jar and the trex-stateless-gui script.

Added the last three lines of this snippet (JAVA to export):

#!/bin/bash

BASE="$(dirname "$0")"
cd "$BASE"
JAVA="$BASE/jre1.8.0_341"
PATH=$JAVA/bin:$PATH
export JAVA
[...]
drwxrwxr-x 7 rschmied rschmied     4096 Sep 14 09:45 jre1.8.0_341
-rw-rw-r-- 1 rschmied rschmied 94978146 Sep 14 09:45 jre-8u341-linux-x64.tar.gz
drwxr-xr-x 2 rschmied rschmied     4096 Sep 12  2019 lib
drwxrwxr-x 2 rschmied rschmied     4096 Sep 14 09:38 logs
drwxrwxr-x 4 rschmied rschmied     4096 Sep 14 09:58 trex
-rwxr-xr-x 1 rschmied rschmied      956 Sep 14 10:00 trex-stateless-gui
-rw-r--r-- 1 rschmied rschmied  1212350 Sep 12  2019 trex-stateless-gui.jar

this works for me.

rschmied avatar Sep 21 '22 14:09 rschmied