Configure the JavaJSP graphics platform for IPlanet under Soloris

xiaoxiao2021-03-06  53

B34477C

Configuring the iPlanet of Java / JSP graphics platform of at Soloris: Liao Wei 2004-6-17 17:47:28 blog China (Blogchina.com) configured iPlanet in Soloris Java / JSP graphics platform paper to comply with GPL copyright agreement, Liao巍, 200406, Weiliao at isoftstone.com 1. The group encountered this problem at work at the time, checked a lot of information in Chinese and English, and the solution was to finally explore it, with red displayed behind. I think this question should be more common, if this article is useful to you, please tell me. Second. Java's bug is due to a defect in the Java language itself, under the Soloris platform (there is no problem under the Windows platform, the Linux platform is not clear) It is not possible to directly reference the 2D, 3D system graphics platform related packages. Three. In the SOLORIS platform, the Java program running the introduction graphics package is three.Soloris running the JAAV program of the reference graphics package, seeing one of the following instances: [root @ isoft / root] # cat test.javapublic class test {public static void main (String [] args) {java.awt.graphicsenvironment.GetLocalGraphicsenvironment ();}} Belown under Shell, run the following command: [Root @ isoft / root] # javac test.java [root @ isoft / root] # java testexception in thread "main" java.lang.InternalError: Can not connect to X11 windowserver using ': 0.0' as the value of the DISPLAY variable at sun.awt.X11GraphicsEnvironment.initDisplay (Native Method) at at java. .lang.Class.forName0 (Native Method) at java.lang.Class.forName (Class.java:124) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment (GraphicsEnvironment.java:63) at test.main (test.java:5 This time, a solution is to log in to a CDE, open the console under CDE, find the environment variable Display as follows: [Root @ isoft / root] # set | grep display display = 10.67.85.7: 0.0 10.67.85.7 Represents the client's IP, 0.0 indicates the first CDE in which it is entered.

With this X client, you can use these graphics related packages in other clients connected to this server. If you use the way, you specify a Display: [root @ iSoft / root] # Display = 10.67.85.7: 0.0 [root @ ISOFT / ROOT] # @ ISOFT / ROOT] # java testfont specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal - * -% D - * - * -p - * - sun-fontspecific] font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal - * -% D - * - * - p - * - Sun-fontspecific] font specified In font.properties not found [-itc zapfdingbats-medium-r-normal - * -% D - * - * - p - * - sun-fontspecific] font specified in font.properties not found [-urw-ITC ZapfdingBats-Medium-r-Normal - * -% D - * - * - p - * - Sun-fontspecific] Now there is only a font error. Through this description, we can also understand why you have to perform the above command before installing Oracle. IV. The JSP page under IPlanet references the solution to the graphics package. In general, JSP is relatively rare.

But some time, such as the package provided by certain third parties, a DEMO JSP file is as follows: <% java.awt.graphicsenvironment ();%>

hello, world! < / h1> This time, the page error will appear, the common compilation error is as follows: java.lang.noclassdeffounderror: Sun / AWT / X11Graphicsenvironment at java.lang.class.Forname0 (Native Method) At Java .lang.Class.forName0 (Compiled Code) at java.lang.Class.forName (Compiled Code) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment (GraphicsEnvironment.java:63) at TestServlet.service (TestServlet.java:16) Unfortunately, this error message is somewhat misleading. this message does not actually reflect a class loading problem. the error can be avoiding by setting the DISPLAY environment variable in the appropriate configuration file. Another common error occurs DISPLAY is specified but not able to access this DISPLAY, reported the following error: Can not connect to X11 window server using ': 0'. as the value of the DISPLAY variable at sun.awt.X11GraphicsEnvironment.initDisplay (Native Method) at at java.lang.Class .forname0 (n ative Method) at java.lang.Class.forName (Class.java:124) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment (GraphicsEnvironment.java:63) at TestServlet.service (TestServlet.java:16) to iPlanet platform as an example, Need to modify /VAR/opt/sunwappserver7/domains/domain1/server1/config/server.xml Add two lines: ################################################################################################################################################################################################################################################### ########################### -djava.awt.Headless = true -dsun.java2d.fontpath = / usr / j2se / jre / lib / fonts ################# #################################################################### This parameter replaces the designation of Display.

Note that this requires a certain version of Java support. The Soloris version I use is as follows: [Root @ isoft bin] # / usr / java version "1.4.1_03" Java (TM) 2 Runtime Environment, Standard Edition (build 1.4.1_03- B02) Java Hotspot (TM) Client VM (Build 1.4.1_03-B02, Mixed Mode) 5. Reference article 1) Setting Up Solaris 7, 8, and 9 Operating Environments for Java Servlet graphicshttp: //developss.sun.com/ Solaris / Articles / Solaris_Graphics.html # 4 2) Graphics Environment Installation Configuration http://www.net.com.cn/eschool/inforcenter/a20040329298417.html 3) x Server configuration for image generationHttp: // Download-East. Oracle.com/otn_hosted_doc/jdeveloper/904preview/uixhelp/uixdevguide/xserver.htmlb34477c

Configuring the iPlanet of Java / JSP graphics platform of at Soloris: Liao Wei 2004-6-17 17:47:28 blog China (Blogchina.com) configured iPlanet in Soloris Java / JSP graphics platform paper to comply with GPL copyright agreement, Liao巍, 200406, Weiliao at isoftstone.com 1. The group encountered this problem at work at the time, checked a lot of information in Chinese and English, and the solution was to finally explore it, with red displayed behind. I think this question should be more common, if this article is useful to you, please tell me. Second. Java's bug is due to a defect in the Java language itself, under the Soloris platform (there is no problem under the Windows platform, the Linux platform is not clear) It is not possible to directly reference the 2D, 3D system graphics platform related packages. Three. In the SOLORIS platform, the Java program running the introduction graphics package is three.Soloris running the JAAV program of the reference graphics package, seeing one of the following instances: [root @ isoft / root] # cat test.javapublic class test {public static void main (String [] args) {java.awt.graphicsenvironment.GetLocalGraphicsenvironment ();}} Belown under Shell, run the following command: [Root @ isoft / root] # javac test.java [root @ isoft / root] # java testexception in thread "main" java.lang.InternalError: Can not connect to X11 windowserver using ': 0.0' as the value of the DISPLAY variable at sun.awt.X11GraphicsEnvironment.initDisplay (Native Method) at at java. .lang.Class.forName0 (Native Method) at java.lang.Class.forName (Class.java:124) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment (GraphicsEnvironment.java:63) at test.main (test.java:5 This time, a solution is to log in to a CDE, open the console under CDE, find the environment variable Display as follows: [Root @ isoft / root] # set | grep display display = 10.67.85.7: 0.0 10.67.85.7 Represents the client's IP, 0.0 indicates the first CDE in which it is entered.

With this X client, you can use these graphics related packages in other clients connected to this server. If you use the way, you specify a Display: [root @ iSoft / root] # Display = 10.67.85.7: 0.0 [root @ ISOFT / ROOT] # @ ISOFT / ROOT] # java testfont specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal - * -% D - * - * -p - * - sun-fontspecific] font specified in font.properties not found [-urw-itc zapfdingbats-medium-r-normal - * -% D - * - * - p - * - Sun-fontspecific] font specified In font.properties not found [-itc zapfdingbats-medium-r-normal - * -% D - * - * - p - * - sun-fontspecific] font specified in font.properties not found [-urw-ITC ZapfdingBats-Medium-r-Normal - * -% D - * - * - p - * - Sun-fontspecific] Now there is only a font error. Through this description, we can also understand why you have to perform the above command before installing Oracle. IV. The JSP page under IPlanet references the solution to the graphics package. In general, JSP is relatively rare.

But some time, such as the package provided by certain third parties, a DEMO JSP file is as follows: <% java.awt.graphicsenvironment ();%>

hello, world! < / h1> This time, the page error will appear, the common compilation error is as follows: java.lang.noclassdeffounderror: Sun / AWT / X11Graphicsenvironment at java.lang.class.Forname0 (Native Method) At Java .lang.Class.forName0 (Compiled Code) at java.lang.Class.forName (Compiled Code) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment (GraphicsEnvironment.java:63) at TestServlet.service (TestServlet.java:16) Unfortunately, this error message is somewhat misleading. this message does not actually reflect a class loading problem. the error can be avoiding by setting the DISPLAY environment variable in the appropriate configuration file. Another common error occurs DISPLAY is specified but not able to access this DISPLAY, reported the following error: Can not connect to X11 window server using ': 0'. as the value of the DISPLAY variable at sun.awt.X11GraphicsEnvironment.initDisplay (Native Method) at at java.lang.Class .forname0 (n ative Method) at java.lang.Class.forName (Class.java:124) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment (GraphicsEnvironment.java:63) at TestServlet.service (TestServlet.java:16) to iPlanet platform as an example, Need to modify /VAR/opt/sunwappserver7/domains/domain1/server1/config/server.xml Add two lines: ################################################################################################################################################################################################################################################### ########################### -djava.awt.Headless = true -dsun.java2d.fontpath = / usr / j2se / jre / lib / fonts ################# #################################################################### This parameter replaces the designation of Display.

转载请注明原文地址:https://www.9cbs.com/read-117628.html

New Post(0)