Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT-SPY : [3] GUI : PROBLEMS getting version information - [2] compatibility of version JavaFX / openjfx - [1] Could not find or load main class #87

Open
droopy4u opened this issue Jun 9, 2020 · 3 comments

Comments

@droopy4u
Copy link

droopy4u commented Jun 9, 2020

It started with : but finally end with problems in the GUI (see point 3)

1. It originally started with :

Error: Could not find or load main class pl.baczkowicz.mqttspy.Main

more information about my troubleshooting -

The ERROR :

tech@LinuMint:SOFT $ java -jar ./mqtt-spy-1.0.1-beta-b18-jar-with-dependencies.jar                                                
Error: Could not find or load main class pl.baczkowicz.mqttspy.Main

2. compatibility of version JavaFX / openjfx

### Finally I found this problem :
for more information --> see point 5. - troubleshooting

has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: javafx/application/Application has been compiled by a more recent version of the Java Runtime (class file version 54.0), this version of the Java Runtime only recognizes class file versions up to 52.0

SOLUTION

https://forums.linuxmint.com/viewtopic.php?p=1826127#p1826127 - Thu Jul 07, 2011 8:47 am - by ramk

using the same installed the appropriate version of openjdk 8, openjfx 8 and the related "correct" dependencies.

apt-cache show openjfx
sudo apt-get -V install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2

So I followed the information and tried out for 'my' version '8u252-b09', but without success:

$ sudo apt-get -V install openjfx=8u252-b09-1ubuntu2 libopenjfx-java=8u252-b09-1ubuntu2 libopenjfx-jni=8u252-b09-1ubuntu2
   
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version 8u252-b092-1ubuntu2' for 'openjfx' was not found
E: Version '8u252-b09-1ubuntu2' for 'libopenjfx-java' was not found
E: Version '8u252-b09-1ubuntu2' for 'libopenjfx-jni' was not found

But how to find out which versions are available; ex '8u161-b12' ?

apt-get -V install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2

The installed versions :

$ apt-cache policy openjfx        
openjfx:
  Installed: 8u161-b12-1ubuntu2
  Candidate: 11.0.2+1-1~18.04.2
  Version table:
     11.0.2+1-1~18.04.2 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages
 *** 8u161-b12-1ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        100 /var/lib/dpkg/status

If I search via the package on the site of ubuntu; openjfx, I don't find '8u161-b12-1ubuntu2'

the package on the site of ubuntu available ; openjfx

3. GUI : ERROR / PROBLEMS getting version information / update version

Finally I have the GUI MQTT SPY up and running, but still have some problems - see image.

And I'm afraid that I also have problems, with making a network connection.
But about that, I have to check that I didn't make a fault (I'm a beginner at MQTT).

IMG_MQTT

https://i.stack.imgur.com/SZ3fu.png

@droopy4u droopy4u changed the title MQTT-SPY : MQTT-SPY : [3] GUI : PROBLEMS getting version information - [2] compatibility of version JavaFX / openjfx - [1] Could not find or load main class Jun 9, 2020
@colin713
Copy link

Did you get a resolution with this issue. I have the same problem: I get the GUI as shown: Error getting version info. Also I am unable to connect to any of the brokers.
Using windows 10. I'm assuming the Java RTE supports FX, ?

C:\Users...>java -version
java version "1.8.0_321"
Java(TM) SE Runtime Environment (build 1.8.0_321-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.321-b07, mixed mode)

@bmw-biker
Copy link

Same issue here. Any suggestions ?
Also the "please support" notification window hangs on top all windows and will not close.
Meanwhile we have Win 10 22H2, Mqtt Spy 1.0 and JRE 8 361

@riker65
Copy link

riker65 commented Jan 31, 2023

looks like after some updated I also run again into those issues, can not get it started on ubunut 20
running
/usr/lib/jvm/java-14-openjdk-amd64/bin/java -cp "mqtt-spy-0.5.4-jar-with-dependencies.jar:lib/xmlsec-1.5.5.jar:lib/commons-logging-1.1.1.jar" pl.baczkowicz.mqttspy.Main

openjfx: Installed: 11.0.7+0-2ubuntu2 Candidate: 11.0.7+0-2ubuntu2 Version table: *** 11.0.7+0-2ubuntu2 500 500 http://de.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages 100 /var/lib/dpkg/status 11.0.7+0-2ubuntu1 500 500 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 Packages

does not work

error
Error: Could not find or load main class pl.baczkowicz.mqttspy.Main

any idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants