Answers.Body: <p>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.</p>
  <p><strong>Install openjdk-8-jre</strong></p>
  <pre><code><span class="math-container">$ sudo apt-cache policy openjdk-8-jre
  $</span> sudo apt install openjdk-8-jre=1.8.0_292
  </code></pre>
  <p><strong>Switch the default java</strong></p>
  <pre><code>$ sudo update-alternatives --config java
  *            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081  
  </code></pre>
  <p><strong>Checking the default java</strong></p>
  <pre><code>    $ java -version
  </code></pre>
  <p>openjdk version &quot;1.8.0_292&quot;
  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)</p>
  <p><strong>Run the UBGC.jar</strong></p>
  <pre><code>$ java -jar UBCG.jar 
        ###############################
        #         UBCG ver. 3.0       #
        ###############################
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-23T17:56:19.397Z
Answers.LastActivityDate: 2021-06-23T20:50:30.350Z
Answers.LastEditDate: 2021-06-23T20:50:30.350Z
Answers.UserDisplayName: Fabio
Answers.Body: <p>You are probably using the wrong java version it should be 8</p>
  <p>try &quot;java -version&quot;</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-07-19T14:00:58.263Z
Answers.LastActivityDate: 2020-07-19T14:00:58.263Z
Answers.UserDisplayName: Chris
Body: <p>I wanna install UBCG.JAR in ubuntu 18.04 but I cannot run the java File UBCG.JAR.
  when I type the code <code>java -jar UBCG.JAR</code> an error message appears.</p>
  <pre><code>Exception in thread &quot;main&quot; 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)
  </code></pre>
  <p>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</p>
  <pre><code>$ java -version
  Openjdk version &quot;11.0.7&quot; 2020-04-14
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-11-06T00:11:38.443Z
Comments.Text: Thank you very much the problem solved, it was about JDK version
Comments.UserDisplayName: Maloki
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-21T21:28:31.163Z
Comments.Text: Could you please either accept an answer, or write up (and accept) your own solution to this problem?
Comments.UserDisplayName: gringer
Tags: <java>
Title: Java error when trying to run UBCG jar (java.lang.ClassNotFoundException)
ThreadText: # Java error when trying to run UBCG jar (java.lang.ClassNotFoundException)
  
  (Asked by: username_0 on 2019-12-14)
  
  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
  
  ```
  $ java -version
  Openjdk version "11.0.7" 2020-04-14
  
  ```
  
  **Tags:** java
  
  > **Comments:**
  > **username_0**: Thank you very much the problem solved, it was about JDK version  
  > **username_1**: Could you please either accept an answer, or write up (and accept) your own solution to this problem?  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2021-06-23. Score: 0
  
  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       #
        ###############################
  
  ```
  
  
  ---
  
  ### Answer by username_3 on 2020-07-19. Score: 0
  
  You are probably using the wrong java version it should be 8
  
  try "java -version"
  
  
  ---
  
  