|
Here is the code. import java.awt.*; import java.awt.event.*; import java.io.*; import com.adobe.acrobat.*; public class SampleReader extends Viewer { public SampleReader() throws Exception { } public static void main(String args[]) { Frame f = new Frame("Sample Acrobat Reader"); f.setLayout(new BorderLayout()); Label top = new Label("Acrobat Reader created using adobe.Acrobat.Viewer", Label.CENTER); top.setBackground(Color.red); f.add(top, BorderLayout.NORTH); f.add(new Label("Adobe Acrobat Reader - Alpha release - 1998", Label.CENTER), BorderLayout.SOUTH); try { final Viewer acrobat = new Viewer(); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { if (acrobat != null) { // The deactivate method will ensure that the // acrobat.properties file is saved // upon exit. acrobat.deactivate(); } System.exit(0); } }); if (args.length > 0) { try { FileInputStream in = new FileInputStream(args[0]); acrobat.setDocumentInputStream(in); } catch (FileNotFoundException x) { System.out.println("File not found!"); } } f.add(acrobat, BorderLayout.CENTER); // you must call activate to enable the Viewer object // to layout its sub-components and the further initialization // needed for it to be displayed. acrobat.activate(); //WithoutBars(); } catch (Exception x) { f.add(new Label("Unable to create an Acrobat Reader"), "Center"); } f.setSize(400, 400); f.show(); } } -----Original Message----- From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx]On Behalf Of java400-l-request@xxxxxxxxxxxx Sent: Sunday, March 21, 2004 1:00 PM To: java400-l@xxxxxxxxxxxx Subject: JAVA400-L Digest, Vol 2, Issue 106 Send JAVA400-L mailing list submissions to java400-l@xxxxxxxxxxxx To subscribe or unsubscribe via the World Wide Web, visit http://lists.midrange.com/mailman/listinfo/java400-l or, via email, send a message with subject or body 'help' to java400-l-request@xxxxxxxxxxxx You can reach the person managing the list at java400-l-owner@xxxxxxxxxxxx When replying, please edit your Subject line so it is more specific than "Re: Contents of JAVA400-L digest..." Today's Topics: 1. RE: Cant seem to execute my second Java program after Hello World (Bill Fly) 2. SQL and EBCDIC Convert ... (Peter.Daransky@xxxxxxxx) 3. Re: SQL and EBCDIC Convert ... (Colin Williams) ---------------------------------------------------------------------- message: 1 date: Sat, 20 Mar 2004 12:44:40 -0600 from: "Bill Fly" <billfly3@xxxxxxxxxxx> subject: RE: Cant seem to execute my second Java program after Hello World Where's your Java code? -----Original Message----- From: Nick Leonessa [mailto:nastvp@xxxxxxxxxxxxx] Sent: Saturday, March 20, 2004 7:56 AM To: JAVA400-L@xxxxxxxxxxxx Subject: Cant seem to execute my second Java program after Hello World I am trying to execute my second java program on the iseries. I was able to get the "Hello" program working, now I am trying the "SampleReader". When I issue the following commands, I get the following: java SampleReader java.lang.NoClassDefFoundError: com/adobe/acrobat/Viewer java/lang/Throwable.<init>(Ljava/lang/String;)V+4 (Throwable.java:90) java/lang/Error.<init>(Ljava/lang/String;)V+1 (Error.java:46) java/lang/NoClassDefFoundError.<init>(Ljava/lang/String;)V+1 (NoClassDefFoundError.java:43) java/lang/ClassLoader.defineClass(Ljava/lang/String;[BIILjava/security/Prote ctionDomain;)Ljava/lang/Class;+79ClassLoader.java:492) java/security/SecureClassLoader.defineClass(Ljava/lang/String;[BIILjava/secu rity/CodeSource;)Ljava/lang/Class;+27 (SecureClassLoader.java:111) java/net/URLClassLoader.defineClass(Ljava/lang/String;Lsun/misc/Resource;)Lj ava/lang/Class;+196 (URLClassLoader.java:287) java/net/URLClassLoader.access$300(Ljava/net/URLClassLoader;Ljava/lang/Strin g;Lsun/misc/Resource;)Ljava/lang/Class;+1 (URLClassLoader.java:64) java/net/URLClassLoader$ClassFinder.run()Ljava/lang/Object;+42 (URLClassLoader.java:594) java/net/URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class;+16 (URLClassLoader.java:200) java/lang/ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+41 (ClassLoader.java:303) sun/misc/Launcher$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Cl ass;+33 (Launcher.java:286) java/lang/ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;+1(Class Loader.java:259) java/lang/ClassLoader.loadClassInternal(Ljava/lang/String;)Ljava/lang/Class; +1 (ClassLoader.java:319) Then I try this: java -classpath /home/nick/acrobat.jar SampleReader java.lang.NoClassDefFoundError: SampleReader java/lang/Throwable.<init>(Ljava/lang/String;)V+4 (Throwable.java:90) java/lang/Error.<init>(Ljava/lang/String;)V+1 (Error.java:46) java/lang/NoClassDefFoundError.<init>(Ljava/lang/String;)V+1 (NoClassDefFoundError.java:43) And finally this: java -classpath /home/nick/:/home/nick/acrobat.jar SampleReader java.lang.NoClassDefFoundError: com/adobe/acrobat/Viewer java/lang/Throwable.<init>(Ljava/lang/String;)V+4 (Throwable.java:90) java/lang/Error.<init>(Ljava/lang/String;)V+1 (Error.java:46) java/lang/NoClassDefFoundError.<init>(Ljava/lang/String;)V+1 (NoClassDefFoundError.java:43) java/lang/ClassLoader.defineClass(Ljava/lang/String;[BIILjava/security/Prote ctionDomain;)Ljava/lang/Class;+79 (ClassLoader.java:492) java/security/SecureClassLoader.defineClass(Ljava/lang/String;[BIILjava/secu rity/CodeSource;)Ljava/lang/Class;+27 (SecureClassLoader.java:111) java/net/URLClassLoader.defineClass(Ljava/lang/String;Lsun/misc/Resource;)Lj ava/lang/Class;+196 (URLClassLoader.java:287) java/net/URLClassLoader.access$300(Ljava/net/URLClassLoader;Ljava/lang/Strin g;Lsun/misc/Resource;)Ljava/lang/Class;+1 (URLClassLoader.java:64) java/net/URLClassLoader$ClassFinder.run()Ljava/lang/Object;+42 (URLClassLoader.java:594) java/net/URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class;+16 (URLClassLoader.java:200) java/lang/ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+41 (ClassLoader.java:303) sun/misc/Launcher$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Cl ass;+33 (Launcher.java:286) java/lang/ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;+1 (ClassLoader.java:259) java/lang/ClassLoader.loadClassInternal(Ljava/lang/String;)Ljava/lang/Class; +1 (ClassLoader.java:319) Can someone shed some light on this for me. Thanks. My environment and settings are as follows. If I did not include enough, please let me know: Env--------------------------- QIBM_USE_DESCRIPTOR_STDIO=I QIBM_DESCRIPTOR_STDIN=CRLN=Y LOGNAME=NICK SHLVL=1 HOSTTYPE=powerpc HOSTID=10.0.0.2 HOSTNAME=AS400.NAST.COM OSTYPE=os400 MACHTYPE=powerpc-ibm-os400 CLASSPATH=.:/home/nick/acrobat.jar:/home/nick TERMINAL_TYPE=5250 HOME=/home/NICK PATH=/usr/bin: Version---------------------- java version "1.3.1" ls--------------------------- Hello.class Hello.java MRJToolkitStubs.jar acrobat.jar SampleReader.class ------------------------------ message: 2 date: Sun, 21 Mar 2004 14:55:38 +0100 from: Peter.Daransky@xxxxxxxx subject: SQL and EBCDIC Convert ... Hi *All, ... again question about SQL and converting from EBCDIC to UTF ... I've now problem that i need "dynamic" convert EDCDIC string to UTF, so i mean sometime yes and sometime not. I've found here in Archiv something about GRAPHIC() SQL function, i've tryed it but it doesn't work for me (i got error, that conversion between 65535 and 13488 ist invalid)? Any idea ? Peter ------------------------------ message: 3 date: Sun, 21 Mar 2004 14:57:55 -0000 from: "Colin Williams" <colin.williams@xxxxxxxxxxxx> subject: Re: SQL and EBCDIC Convert ... Peter, if this is for java, I believe the as400Text classes in jtopen provide that sort of conversion functionality cheers Colin.W ----- Original Message ----- From: <Peter.Daransky@xxxxxxxx> To: <java400-l@xxxxxxxxxxxx> Sent: Sunday, March 21, 2004 1:55 PM Subject: SQL and EBCDIC Convert ... > Hi *All, > ... again question about SQL and converting from EBCDIC to UTF ... > I've now problem that i need "dynamic" convert EDCDIC string to UTF, so i > mean sometime yes and sometime not. > I've found here in Archiv something about GRAPHIC() SQL function, i've > tryed it but it doesn't work for me (i got error, that conversion between > 65535 and 13488 ist invalid)? > > Any idea ? > > Peter > _______________________________________________ > This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list > To post a message email: JAVA400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/java400-l > or email: JAVA400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/java400-l. > > This e-mail has been sent by a company of Bertram Group Ltd, whose registered office is The Nest, Rosary Road Norwich NR1 1TF. This message, and any attachments, are intended solely for the addressee and may contain privileged or confidential information. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. If you believe that you have received this email in error, please contact the sender immediately. Opinions, conclusions and statements of intent in this e-mail are those of the sender and will not bind a Bertram Group Ltd company unless confirmed in writing by a director independently of this message. Although we have taken steps to ensure that this email and any attachments are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free. ------------------------------ _______________________________________________ This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) digest list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/java400-l or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l. End of JAVA400-L Digest, Vol 2, Issue 106 *****************************************
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.