I wanted to use deskdock to control my phone with my laptops keyboard and mouse and deskdock seemed like a reputable app which even has an xda thread.
After installing adb on my laptop, enabling usb debugging on my phone, allowing accessibility for the mobile deskdock app, I launched the java app using java -jar.
The desktop app would connect to the phone but when I tried to move my mouse from my laptop screen to the phone I would get an error message.
ncaught Exception in Thread JNativeHook Dispatch Thread: java.lang.NoClassDefFoundError: com/sun/awt/AWTUtilities$Translucencycom/sun/awt/AWTUtilities$Translucency
A user on the XDA thread had what I think is a similar problem, but there was no solution posted on that thread.
1 Answer
The solution for me was to uninstall my current installation of JDK and install jre on ubuntu through
sudo apt install openjdk-8-jreAfter this I didn't get the error message.
The reason I thought of this was because of this guys post on how to install deskdock.
They say "There are mainly two versions of Java — JRE and JDK. JRE is for running java apps and JDK is for making java apps. Since we just want to run a program, you need to install the latest version of JRE. But that didn’t work for me. When asked the app developer he answered ‘for some OS like Mac, you need to use JDK’."
So I thought the type of java I had would matter.
1