0
$\begingroup$

I wanna install UBCG.JAR in ubuntu 18.04 but I cannot run the java File UBCG.JAR. when I type the code java -jar UBCG.JAR an error message appears.

Exception in thread "main" java.lang.NoClassDefFoundError: org/json/simple/parser/ParseException
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)

Caused by: java.lang.ClassNotFoundException: org.json.simple.parser.ParseException at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 3 more

$\endgroup$
2
  • $\begingroup$ Have you checked that you have the required dependencies installed and that your Java version is the right one? Requirements are summarized here: ezbiocloud.net/tools/ubcg and additional details here: help.ezbiocloud.net/ubcg-users-manual $\endgroup$ May 7 '20 at 14:55
  • $\begingroup$ You are probably using the wrong java version it should be 8 try "java -version" $\endgroup$
    – Chris
    Jul 19 '20 at 14:00
0
$\begingroup$

I solved this problem but UBCG.JAR does not work with java 11 . It is necessary to install openjdk-8-jre and switch the default java.

Install openjdk-8-jre

$ sudo apt-cache policy openjdk-8-jre
$ sudo apt install openjdk-8-jre=1.8.0_292

Switch the default java

$ sudo update-alternatives --config java
*            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081  

Checking the default java

    $ java -version

openjdk version "1.8.0_292" OpenJDK Runtime Environment (build 1.8.0_292-8u292-b10-0ubuntu1~18.04-b10) OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)

Run the UBGC.jar

$ java -jar UBCG.jar 
      ###############################
      #         UBCG ver. 3.0       #
      ###############################
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.