Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
srini carry
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • 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?
 
Himanshu Kansal
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • 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
 
Kees Jan Koster
JavaMonitor Support
Rancher
Posts: 251
5
  • Mark post as helpful
  • send pies
  • 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
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18165
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • 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
  • 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
Rancher
Posts: 251
5
  • Mark post as helpful
  • send pies
  • 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
  • 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.

 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic