• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Headless and java.awt.Color

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 libXp.so.6 not being found...

Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/lib/j2se/1.4/jre/lib/amd64/libawt.so: libXp.so.6: cannot open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1586)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1503)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1437)
at java.awt.Toolkit.<clinit>(Toolkit.java:1458)
at java.awt.Color.<clinit>(Color.java:250)
at neoris.Prueba.probar(Prueba.java:35)
at neoris.Prueba.main(Prueba.java:22)

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?

Thanks

Lautaro
 
Bartender
Posts: 9559
12
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds to me like you have an install issue. usr/lib/j2se/1.4/jre/lib/amd64/libawt.so 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.
 
Lautaro Brasseur
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

Lautaro
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!