There are three solutions:
1,InstallVirtual xwindows
2. Use the JDK 1.4 headless mode (-djava. AWT. Headless = true)
3. Use PJA (pureJavaAWT)
The first method was tried a year ago, but IDownloadXvfb always reports errors and fails to be installed under Solaris.
The second method is the simplest. This time we will use it to add-djava. AWT. Headless = true to the Weblogic STARTUP script, which is similar to the following statement:
Java $ java_options-classpath $ classpath-djava. AWT. headless = true-dweblogic. domain = mydomain-dweblogic. name = myserver-dbea. home =/WLS/wlshome-dweblogic. management. password = $ wls_pw-dweblogic. productionmodeenabled = $ startmode-djava. security. policy =/WLS/wlshome/wlserver6.1/lib/weblogic. policy
Weblogic. Server
It seems that jdk1.4 is much more powerful than jdk1.3, and I may encounter more than one similar problem. The disadvantage of the second method is that JDK 1.4 is required.
In the third method, PJA was also heard a year ago and has not been carefully studied, pure Java AWT is called because it reloads the underlying functions in jdk awt that depend on the drawing of the operating system, so that the drawing is completely dependent on the Java program, and has nothing to do with the operating system, naturally, the X-Windows support is no longer needed. The disadvantage is that it is troublesome to configure PJA, because it has nothing to do with the operating system, so the performance is worse than the traditional AWT.
I guess the second method is djava. AWT. the principle of headless = true should be the same as that of PJA, that is, JDK 1.4 contains APIs similar to PJA, Java. AWT. the headless parameter is the switch, which is used to select between these APIs and the operating system APIs.-djava. AWT. if headless = true, select the API in JDK 1.4 and stop calling the API of the operating system.
I used weblogic8.1.5. In the directory where the domain is located, find setdomainenv. sh file, edit java_options = "$ {java_options}-da" to java_options = "$ {java_options}-da-djava. AWT. headless = true "and then restart the service. In some versions of Weblogic, if setdomainenv. Sh is not installed on Linux, modify the configuration of startweblogic. Sh.
Modify the startweblogic. Sh File
$ {Java_home}/bin/Java $ {java_vm }$ {mem_args }$ {java_options}-dweblogic. name =$ {SERVER_NAME}-dweblogic. productionmodeenabled =$ {production_mode}-djava. AWT. headless = true-djava. security. policy = "$ {wl_home}/Server/lib/weblogic. policy "weblogic. serverva_home}/bin/Java
$ {Java_vm }$ {mem_args }$ {java_options}-dweblogic. name =$ {SERVER_NAME}-dweblogic. productionmodeenabled =$ {production_mode}-djava. AWT. headless = true-djava. security. policy = "$ {wl_home}/Server/lib/weblogic. policy "weblogic. server
Add-djava. AWT. Headless = true in the above position
-Djava. AWT. Headless = true both must contain spaces