LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-26-2019, 02:48 AM   #1
Janus84
Member
 
Registered: Sep 2019
Location: New Zealand
Distribution: Debian, Mint
Posts: 61

Rep: Reputation: Disabled
Java app won't run - permissions?


Installed and configured Java as per instructions on their website.
Downloaded and unpacked Ubiquiti discovery tool .jar.

I get:
Code:
$ java -jar "ubnt-discovery-v2.5.1.jar"
Exception in thread "main" java.lang.ClassFormatError: Illegal field name "this.super" in class com/OoOO/super/A/o0oO
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
        at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
        at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:800)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:698)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:621)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        at com.ubnt.discovery.Main.<clinit>(Unknown Source)
$
Thanks!
 
Old 11-26-2019, 03:40 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,901

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
no, this is not a permission error (I guess). Probably the command you executed is incomplete, or the environment was not set properly, a [jar] file is missing or ???
 
1 members found this post helpful.
Old 12-13-2019, 06:09 PM   #3
Janus84
Member
 
Registered: Sep 2019
Location: New Zealand
Distribution: Debian, Mint
Posts: 61

Original Poster
Rep: Reputation: Disabled
I have re-installed Java, re-downloaded the discovery tool and there is the same error.
Looking up the first line of this error returns the same question in some other language on some other forum with zero answers.

Any ideas please?

Code:
$ java -jar ubnt.jar
Exception in thread "main" java.lang.ClassFormatError: Illegal field name "this.super" in class com/OoOO/super/A/o0oO
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
        at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
        at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:821)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:719)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:642)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:600)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        at com.ubnt.discovery.Main.<clinit>(Unknown Source)
 
Old 12-13-2019, 06:45 PM   #4
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,614

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Quote:
Originally Posted by Janus84 View Post
I have re-installed Java, re-downloaded the discovery tool and there is the same error.
Looking up the first line of this error returns the same question in some other language on some other forum with zero answers.
I searched in DuckDuckGo and it also returned a Reddit thread containing:
Quote:
I found a solution to this problem.

sudo apt remove openjdk-*
wget https://raw.githubusercontent.com/ro...6/master/j6.sh && bash j6.sh
finely reboot or logout
I don't recommend blindly running scripts in that fashion, but inspecting the file shows that (amongst other things) it installs a specific version of Java (6u45), so maybe the issue is Ubiquiti only runs correctly for that version of Java?

Sounds like an issue to be raised with whoever produces Ubiquiti.
 
1 members found this post helpful.
Old 12-14-2019, 04:27 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,901

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
actually you gave no usable information. Also repeating the same error message does not help to go further. We have no idea what have you downloaded from where and how did you try to install (on what os). So you need to check if the java version is compatible with the version of ubiquiti you have. Also you may need to check other environment settings (like CLASSPATH). You also may need to use jdk instead of openjdk.
 
Old 04-07-2020, 06:20 PM   #6
Janus84
Member
 
Registered: Sep 2019
Location: New Zealand
Distribution: Debian, Mint
Posts: 61

Original Poster
Rep: Reputation: Disabled
solution

The UBNT apps require Java 8.

Install OpenJDK 8:
Code:
sudo apt-get install openjdk-8-jre-headless -y
Check if you have the Java 8 installed:
Code:
java -version
If you keeping other versions of Java and only adding Java 8, you will need to switch between default versions. This is described elsewhere.

If you run .jar file and get

Exception in thread "main" java.awt.AWTError: Assistive Technology not found: org.GNOME.Accessibility.AtkWrapper

Simply disable assistive technologies:
Code:
sudo nano /etc/java-8-openjdk/accessibility.properties
Comment out the following line:

#assistive_technologies=org.GNOME.Accessibility.AtkWrapper

Should work now
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Permissions Permissions Permissions! makem Linux - Newbie 13 07-30-2015 11:54 AM
How can I write a simple script to automatically run a java app? Brianlicorice Programming 2 02-05-2013 01:21 AM
Multiple processes open when java app is run ciuc Slackware 3 02-02-2007 03:17 PM
Samba Profiles Losing Permissions Settings (Java App) djturner Linux - Networking 0 10-07-2005 12:06 PM
Java applets run fine in Konqueror, but won't run in MS IE. OAnimal Linux - Software 7 12-04-2002 06:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration