Running KryoFlux GUI (Debian 10)

All questions about how to use KryoFlux go here.
fryo
Posts: 9
Joined: Sat Jan 18, 2020 1:17 pm

Running KryoFlux GUI (Debian 10)

Post by fryo »

Hi! Can someone please help me to run the KryoFlux GUI on Debian 10? The quickstart manual says that libusb 1.0.9 is required. Is there any need for action?

Code: Select all

user@debian:~$ apt search libusb-1
Sortierung... Fertig
Volltextsuche... Fertig
libusb-1.0-0/stable,now 2:1.0.22-2 amd64  [Installiert,automatisch]
  userspace USB programming library

libusb-1.0-0-dev/stable,now 2:1.0.22-2 amd64  [installiert]
  userspace USB programming library development files

libusb-1.0-doc/stable,now 2:1.0.22-2 all  [Installiert,automatisch]
  documentation for userspace USB programming

libusb-ocaml/stable 1.3.0-4+b1 amd64
  OCaml bindings to libusb-1.0 (runtime)

libusb-ocaml-dev/stable 1.3.0-4+b1 amd64
  OCaml bindings to libusb-1.0

lm4flash/stable 3:0.1.3-1 amd64
  Command-line firmware flashing tool to communicate with the Stellaris Launchpad
Which Java packages are required to run the GUI? openjdk-11-jdk?

Thx!

brightcaster
Posts: 237
Joined: Fri Nov 08, 2013 10:48 pm

Re: Running KryoFlux GUI (Debian 10)

Post by brightcaster »

I get the same listing with "apt search libusb-1" on debian jessie here and the gui runs fine (using openjdk-7-jdk)! Whats the err message if you start the gui with "java -jar kryoflux-ui.jar."?

David

fryo
Posts: 9
Joined: Sat Jan 18, 2020 1:17 pm

Re: Running KryoFlux GUI (Debian 10)

Post by fryo »

Thanks for your reply. Error message:

Code: Select all

user@debian:~$ java -version
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Debian-1deb10u1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Debian-1deb10u1, mixed mode, sharing)

user@debian:~/Downloads/kryoflux_2.6_linux/dtc$ java -jar kryoflux-ui.jar
Exception in thread "main" java.lang.ExceptionInInitializerError
        at com.kryoflux.ui.KryoFlux.main(KryoFlux.scala)
Caused by: java.lang.ClassNotFoundException: com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:398)
        at java.desktop/javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:2036)
        at java.desktop/javax.swing.UIManager.setLookAndFeel(UIManager.java:632)
        at com.kryoflux.ui.KryoFluxApp.<init>(KryoFlux.scala:26)
        at com.kryoflux.ui.KryoFlux$.<init>(KryoFlux.scala:12)
        at com.kryoflux.ui.KryoFlux$.<clinit>(KryoFlux.scala)
        ... 1 more
I'm new to Debian. What's the best way to install openjdk-7-jdk?

brightcaster
Posts: 237
Joined: Fri Nov 08, 2013 10:48 pm

Re: Running KryoFlux GUI (Debian 10)

Post by brightcaster »

There is a difference between the java developement kit (jdk) and the runtime invironment (jre). Unless you want to write your own java aplications a simple "apt install default-jre" should do the job.

If you also want to develope and compile you should ad an "apt install default-jdk".

This will install open jdk 11 which should be fine for the kryflux gui. I guess you installed it manually as it can't find the classes path...

David

fryo
Posts: 9
Joined: Sat Jan 18, 2020 1:17 pm

Re: Running KryoFlux GUI (Debian 10)

Post by fryo »

Thanks for your help! Here are the commands I used:

Code: Select all

apt remove openjdk-11-jdk
apt autoremove
apt install default-jre
The java version and the error message is exactly the same as before:

Code: Select all

java -version
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Debian-1deb10u1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Debian-1deb10u1, mixed mode, sharing)

user@debian:~/Downloads/kryoflux_2.6_linux/dtc$ java -jar kryoflux-ui.jar
Exception in thread "main" java.lang.ExceptionInInitializerError
        at com.kryoflux.ui.KryoFlux.main(KryoFlux.scala)
Caused by: java.lang.ClassNotFoundException: com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:398)
        at java.desktop/javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:2036)
        at java.desktop/javax.swing.UIManager.setLookAndFeel(UIManager.java:632)
        at com.kryoflux.ui.KryoFluxApp.<init>(KryoFlux.scala:26)
        at com.kryoflux.ui.KryoFlux$.<init>(KryoFlux.scala:12)
        at com.kryoflux.ui.KryoFlux$.<clinit>(KryoFlux.scala)
        ... 1 more

User avatar
karadoc
Posts: 139
Joined: Sun Oct 31, 2010 9:12 pm

Re: Running KryoFlux GUI (Debian 10)

Post by karadoc »

I'm not sure why you're getting that error. It seems that the KryoFlux UI thinks it's running on an older version of Java for some reason (the file it is requesting was moved in later versions of Java, but you're seeing the old location being selected, which is clearly incorrect).

I've tried it on my Mac with the same version of Java, using the AdoptOpenJDK distribution and it works.

Code: Select all

$ java -version
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)
We'll have to install Debian and see if we can diagnose the problem... In the short term, perhaps you could see if the AdoptOpenJDK version works? If you go to the "Linux RPM and DEB installer packages" section this page you can add an apt repository if you prefer.

It would be good to know if the behaviour is different here, but hopefully it will get you up and running.

brightcaster
Posts: 237
Joined: Fri Nov 08, 2013 10:48 pm

Re: Running KryoFlux GUI (Debian 10)

Post by brightcaster »

Could you type "update-alternatives --config java" to see if there are artefacts of previos installations?

David

fryo
Posts: 9
Joined: Sat Jan 18, 2020 1:17 pm

Re: Running KryoFlux GUI (Debian 10)

Post by fryo »

Code: Select all

root@debian:~# update-alternatives --config java
There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-11-openjdk-amd64/bin/java
Nothing to configure.
I'll test to run Kryoflux from a Debian Live image at the weekend. Perhaps something went wrong when uninstalling openjdk-11-jdk?

fryo
Posts: 9
Joined: Sat Jan 18, 2020 1:17 pm

Re: Running KryoFlux GUI (Debian 10)

Post by fryo »

karadoc wrote:
Wed Jan 22, 2020 11:35 pm
We'll have to install Debian and see if we can diagnose the problem... In the short term, perhaps you could see if the AdoptOpenJDK version works? If you go to the "Linux RPM and DEB installer packages" section this page you can add an apt repository if you prefer.
After installing AdoptOpenJDK the KryoFlux GUI is finally starting:

Code: Select all

user@debian:~# su -
root@debian:~# apt remove default-jre
root@debian:~# apt autoremove
root@debian:~# wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
root@debian:~# add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/
root@debian:~# apt update
root@debian:~# apt install adoptopenjdk-8-hotspot
root@debian:~# exit

user@debian:~$ java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.242-b08, mixed mode)

user@debian:~$ cd /home/user/Downloads/kryoflux_2.6_linux/dtc/
user@debian:~/Downloads/kryoflux_2.6_linux/dtc$ java -jar kryoflux-ui.jar 
screenshot_kryoflux.png
Many thanks!

Edit:

'adoptopenjdk-11-hotspot' does not work!

Code: Select all

user@debian:~$ su -
root@debian:~# apt remove adoptopenjdk-8-hotspot
root@debian:~# apt autoremove
root@debian:~# apt install adoptopenjdk-11-hotspot
root@debian:~# exit

user@debian:~$ java -version
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.6+10, mixed mode)

user@debian:~$ cd /home/user/Downloads/kryoflux_2.6_linux/dtc/
user@debian:~/Downloads/kryoflux_2.6_linux/dtc$ java -jar kryoflux-ui.jar 
Exception in thread "main" java.lang.ExceptionInInitializerError
        at com.kryoflux.ui.KryoFlux.main(KryoFlux.scala)
Caused by: java.lang.ClassNotFoundException: com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        at java.base/java.lang.Class.forName0(Native Method)
        at java.base/java.lang.Class.forName(Class.java:398)
        at java.desktop/javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:2036)
        at java.desktop/javax.swing.UIManager.setLookAndFeel(UIManager.java:632)
        at com.kryoflux.ui.KryoFluxApp.<init>(KryoFlux.scala:26)
        at com.kryoflux.ui.KryoFlux$.<init>(KryoFlux.scala:12)
        at com.kryoflux.ui.KryoFlux$.<clinit>(KryoFlux.scala)
        ... 1 more

fryo
Posts: 9
Joined: Sat Jan 18, 2020 1:17 pm

Re: Running KryoFlux GUI (Debian 10)

Post by fryo »

Ubuntu Live image test:

Code: Select all

ubuntu@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.3 LTS
Release:	18.04
Codename:	bionic

ubuntu@ubuntu:~$ uname -r
5.0.0-23-generic

ubuntu@ubuntu:~$ sudo apt update

ubuntu@ubuntu:~$ sudo apt install default-jre

ubuntu@ubuntu:~$ java -version
openjdk version "11.0.5" 2019-10-15
OpenJDK Runtime Environment (build 11.0.5+10-post-Ubuntu-0ubuntu1.118.04)
OpenJDK 64-Bit Server VM (build 11.0.5+10-post-Ubuntu-0ubuntu1.118.04, mixed mode, sharing)

ubuntu@ubuntu:~$ cd /home/ubuntu/Downloads/kryoflux_2.6_linux/dtc/

ubuntu@ubuntu:~/Downloads/kryoflux_2.6_linux/dtc$ java -jar kryoflux-ui.jar
Exception in thread "main" java.lang.ExceptionInInitializerError
	at com.kryoflux.ui.KryoFlux.main(KryoFlux.scala)
Caused by: java.lang.ClassNotFoundException: com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:398)
	at java.desktop/javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:2036)
	at java.desktop/javax.swing.UIManager.setLookAndFeel(UIManager.java:632)
	at com.kryoflux.ui.KryoFluxApp.<init>(KryoFlux.scala:26)
	at com.kryoflux.ui.KryoFlux$.<init>(KryoFlux.scala:12)
	at com.kryoflux.ui.KryoFlux$.<clinit>(KryoFlux.scala)
	... 1 more

Post Reply