WindowListener/JFrame error - Oracle jre8 headless

Any questions? Need some help?
Post Reply
verysofttoiletpaper
Posts: 141
Joined: 05 Jul 2012, 09:44

WindowListener/JFrame error - Oracle jre8 headless

Post by verysofttoiletpaper »

Hello, sorry for bothering with java problems.
I was just trying 4.0 portable on a new arch linux instalation and I get this error:

Code: Select all

$ filebot
Exception in thread "main" java.lang.NoClassDefFoundError: java/awt/event/WindowListener
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
	at java.lang.Class.getMethod0(Unknown Source)
	at java.lang.Class.getMethod(Unknown Source)
	at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
	at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: java.awt.event.WindowListener
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 6 more
Randomly it spits this other one instead:

Code: Select all

$ filebot
Exception in thread "main" java.lang.NoClassDefFoundError: javax/swing/JFrame
	at java.lang.Class.getDeclaredMethods0(Native Method)
	at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
	at java.lang.Class.getMethod0(Unknown Source)
	at java.lang.Class.getMethod(Unknown Source)
	at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
	at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: javax.swing.JFrame
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 6 more
I tried it earlier with openjdk7 and it works fine, but very slow.
Then I created this jre using oracle jdk 8 for armv7 and it doesn't work:

Code: Select all

$ java -version
java version "1.8.0"
Java(TM) SE Embedded Runtime Environment (build 1.8.0-b132, profile compact1, headless)
Java HotSpot(TM) Embedded Minimal VM (build 25.0-b70, mixed mode)

Is this some headless related issue?

Thank you a lot!
User avatar
rednoah
The Source
Posts: 22990
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: WindowListener/JFrame error - Oracle jre8 headless

Post by rednoah »

Yes, headless means "without GUI components" so if you have the minimal JRE which doesn't include GUI components you can't display GUI components. Just install a full JRE (and not the Embedded Minimal) from Oracle, they even do JavaFX on ARM now so I'm sure it's possible.

Do you have have less than 16 MB of RAM?
Use the Embedded Minimal.

Do you have more than 256 MB of RAM?
Just use the full JRE.
:idea: Please read the FAQ and How to Request Help.
verysofttoiletpaper
Posts: 141
Joined: 05 Jul 2012, 09:44

Re: WindowListener/JFrame error - Oracle jre8 headless

Post by verysofttoiletpaper »

It's a server, It doesn't have a GUI or x installed...
I'm looking to run filebot CLI only
User avatar
rednoah
The Source
Posts: 22990
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: WindowListener/JFrame error - Oracle jre8 headless

Post by rednoah »

So what's the issue then? filebot -version obviously works fine.

Run FileBot GUI

Code: Select all

filebot
Run FileBot CLI

Code: Select all

filebot <arguments>
e.g.

Code: Select all

filebot -help

Code: Select all

filebot -version

Code: Select all

filebot -script fn:sysinfo

PS: I've never tested with the Embedded Minimal profile, therefore it probably won't work and you better use the full JRE.
:idea: Please read the FAQ and How to Request Help.
verysofttoiletpaper
Posts: 141
Joined: 05 Jul 2012, 09:44

Re: WindowListener/JFrame error - Oracle jre8 headless

Post by verysofttoiletpaper »

Thank you, it works fine with normal SE version, still not as fast as it used to on my debian install..
Takes 27s to start running sysinfo?

Code: Select all

$ filebot -script "fn:sysinfo"
FileBot 4.0 (r2056)
JNA Native: 4.0.0
MediaInfo: MediaInfoLib - v0.7.68
7-Zip-JBinding: net.sf.sevenzipjbinding.SevenZipNativeInitializationException: Failed to load 7z-JBinding: no 7-Zip-JBinding in java.library.path
chromaprint-tools: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: DISABLED
Groovy Engine: 2.2.0
Java(TM) SE Runtime Environment 1.8.0 (headless)
32-bit Java HotSpot(TM) Client VM
Linux (arm)
Linux alarm 3.4.79-3-ARCH #1 PREEMPT Sat Mar 29 22:08:51 MDT 2014 armv7l GNU/Linux
Done ヾ(@⌒ー⌒@)ノ
- 7-zip is only needed for archives right? no subtitle extraction necessary?
- chroma-print tools only needed to match music files right?

Thank you!
Post Reply