• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I getting this error in unix. Google suggested that I should set this property. -Djava.awt.headless=true I am running weblogic , please help where can I specify thsi property which filw is it user properties or weblogic specific?
 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You set headless to true when Jre cannot get the graphics initialized in the environment in which your application is running. The abstract Windows toolkit requires that. It needs to be set on the console.

Aren't you accessing your application via a web browser, you are using weblogic, right?

Regards
 
JavaMonitor Support
Posts: 251
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear

You set it on the command line, or more commonly in the start script that starts your weblogic server. We can't help you with the specifics, because you have not told us which flavour of UNIX you use.

Also, consider unsetting the DISPLAY variable, to avoid your server attaching to the local X11 display or a ssh forwarded display.

Kees Jan
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
-Djava.awt.headless=true is a JVM parameter, so it would go into the "java" command that runs WebLogic. You might ask in the WebLogic forum how to set it. Or look at WebLogic's startup script to see where it reads its JVM parameters from.
 
srini carry
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kees Jan Koster wrote:Dear

You set it on the command line, or more commonly in the start script that starts your weblogic server. We can't help you with the specifics, because you have not told us which flavour of UNIX you use.

Also, consider unsetting the DISPLAY variable, to avoid your server attaching to the local X11 display or a ssh forwarded display.

Kees Jan



how can I find the UNIX flavour ?
 
Kees Jan Koster
JavaMonitor Support
Posts: 251
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear srini,

Try using uname(1) for that. Like so:

 
srini carry
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Kees Jan Koster wrote:Dear srini,

Try using uname(1) for that. Like so:



thank you for the quick reply

here the result


SunOS acfas01 5.9 Generic_118558-20 sun4u sparc SUNW,Sun-Fire-280R

now trell me what next.

 
reply
    Bookmark Topic Watch Topic
  • New Topic