|
Don - The AS/400 does not have graphical devices so the AS/400 JVM has a RAWT (Remote Abstract Windows Toolkit) that it invokes whenever there is a need to do Graphical display work, or in fact even if there is only a need us any piece of AWT that does not display on glass. You will need to research and use the RAWT classes on a PC that is connected via IP to the AS/400. You will have to set the RmtAwtServer system property to point the AS/400 JVM to the device to display the frame on. This device can be your PC. Fred A. Newberry EFG Companies 1-800-527-1984 x8262 fnewberry@efgusa.com -----Original Message----- From: Don Strickland [mailto:dstrickland@800.com] Sent: Friday, May 19, 2000 3:12 PM To: JAVA400-L@midrange.com Subject: AWT on AS400 Missing? I am attempting to run a Java program that extends Frame. It works on Visual Age, but I get the following error when I run it on the AS400. Anyone know why? The error is: java.awt.AWTError: Toolkit not found: com.ibm.rawt.client.CToolkit java/awt/Toolkit.getDefaultToolkit()Ljava/awt/Toolkit;+51 (Toolkit.java:396) java/awt/Frame.addNotify()V+14 (Frame.java:203) java/awt/Window.pack()V+27 (Window.java:123) testFrame.<init>()V+151 (testFrame.java:30) testFrame.main([Ljava/lang/String;)V+1 (testFrame.java:36) $ It seems to be loading AWT properly. I used -verbose to display the following loaded objects: Loading class java/awt/Frame.class from /QIBM/ProdData/Java400/jdk117/lib/classes.zip Loading class java/awt/Window.class from /QIBM/ProdData/Java400/jdk117/lib/classes.zip Loading class java/awt/Container.class from /QIBM/ProdData/Java400/jdk117/lib/classes.zip Loading class java/awt/Component.class from /QIBM/ProdData/Java400/jdk117/lib/classes.zip Loading class java/awt/image/ImageObserver.class from /QIBM/ProdData/Java400/jdk117/lib/classes.zip Note: this is a subset...there a hundred or so. My export in .profile is: export -s CLASSPATH=.:$HOME/AS400JT/lib/jt400.zip:$HOME/AS400JT/utilities The source is: import java.awt.*; import java.awt.event.*; class testFrame extends Frame { private Label instructions; private Label prompt; private TextField entry; private Button listButton; private Button okButton; public testFrame() { super(); setTitle("My First Java Window"); setSize(300,200); setLocation(200,100); setBackground(java.awt.Color.lightGray); instructions= new Label("Enter Company Number"); prompt = new Label("Number"); entry= new TextField(5); listButton= new Button("List..."); okButton= new Button("Ok"); setLayout(new BorderLayout()); add(instructions,"North"); add(entry,"South"); add(listButton,"East"); add(okButton,"West"); pack(); show(); } public static void main(String args[]) { testFrame test = new testFrame(); } } Don Strickland Senior Programmer/Analyst dstrickland@800.COM (503) 944-3631 +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +--- +--- | This is the JAVA/400 Mailing List! | To submit a new message, send your mail to JAVA400-L@midrange.com. | To subscribe to this list send email to JAVA400-L-SUB@midrange.com. | To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com. | Questions should be directed to the list owner: joe@zappie.net +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.