Let's go at it one step at a time and maybe we can find the problem. After starting qshell, Use -classpath on the java command to set the classpath. For example, java -classpath /daw/classes:/daw/lib/jt400.jar test.SimpleProgram Note a colon separates the elements of the classpath and use a forward slash as the separator. Also note I package qualify the program name since in my case the class containing main() is in the test package. Set the classpath environment variable. For example, export CLASSPATH=/daw/classes:/daw/lib/jt400.jar java test.SimpleProgram Note colon and forward slash. Also note CLASSPATH is uppercase. Try with .profile. I haven't tried this but it should work. Once inside qshell enter 'set' to see the values of the environment variables. Make sure CLASSPATH is set. I hope one of these helps you out. David Wall AS/400 Toolbox for Java "Eyers, Daniel" <email@example.com> on 08/08/2000 01:08:38 PM Please respond to JAVA400-L@midrange.com To: "'JAVA400-L@midrange.com'" <JAVA400-L@midrange.com> cc: Subject: CLASSPATH revisited Sorry, guys... I missed this the first time.... I have written a Java application (my first) from VisualAge for Java. It extends another class that I wrote. I FTPed the .java files to our AS400 and compiled them successfully. BTW, they are part of a package called package (the names have been changed to protect the innocent). The class I want to run is class2; it is an extention of class1. (I'm using a little polymorphism to share code) When I try to run it in QSH, it can't find the class2 class, even though I compiled it. :-( I created a directory called package and put both classes in there but to no avail. I also changed my CLASSPATH in my .profile to point to both my current directory (i.e. /home/myprofile) and the subdirectory package (i.e. /home/myprofile/package) but still can't find the class. I even did a CRTJVAPGM (which finished ok) but I still can't make it happen... What am I doing wrong??? dan +--- | 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: firstname.lastname@example.org +--- +--- | 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: email@example.com +---
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.