File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Headless and java.awt.Color Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Headless and java.awt.Color" Watch "Headless and java.awt.Color" New topic

Headless and java.awt.Color

Lautaro Brasseur

Joined: Aug 06, 2005
Posts: 13
Hello, I have a problem with java.awt.Color class. I'm running Java on a Linux with Blackdown-1.4.2-03 JVM, without graphical environment (X).

When I try to load class java.awt.Color, it gives me a ClassNotFound exception. I tried setting the system propert java.awt.headless to true, but then it gives an error about not being found...

Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/j2se/1.4/jre/lib/amd64/ cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(
at java.lang.ClassLoader.loadLibrary(
at java.lang.Runtime.loadLibrary0(
at java.lang.System.loadLibrary(
at Method)
at java.awt.Toolkit.loadLibraries(
at java.awt.Toolkit.<clinit>(
at java.awt.Color.<clinit>(
at neoris.Prueba.probar(
at neoris.Prueba.main(

I used headless parameter with some products such as JasperReports in past (over a distinct environment) and it worked well...

Somebody has a similar problem? Maybe java.awt.Color class doesn't supports headless parameter in Blackdown JVM?



Lautaro Brasseur<br />SCJP 1.4 (95%) / SCBCD 1.3 (100%)
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

Sounds to me like you have an install issue. usr/lib/j2se/1.4/jre/lib/amd64/ doesn't sound like a blackdown path to me, it sounds like a Sun JRE. Check your paths and Java configuration. I think your LIBPATH is pointing to the wrong JRE.

[How To Ask Questions On JavaRanch]
Lautaro Brasseur

Joined: Aug 06, 2005
Posts: 13
The path is ok, I asked to system administrator.

I just checked java.awt.Color source code and at class static initialization code it calls java.awt.Toolkit.loadLibraries, regardless of headless system property.

I solved the problem installing the libraries... It seems that java.awt.Color requires them even in headless mode.

Thanks a lot

Pavan Gulhane

Joined: Sep 18, 2006
Posts: 1
Hi Lautaro,
I am facing the similar problem with the jasper reports on Linux .
The famous: java.lang.UnsatisfiedLinkError
The Env. is : Linux RH on java 1.3.1 WAS 5
When you say that you have installed the libraries and it worked, can you please let me know the details.
I am desperately looking for the fix/solution.
Do let me know if you need some info.

Thanks in advance
Pavan Gulhane.
I agree. Here's the link:
subject: Headless and java.awt.Color
It's not a secret anymore!