× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: CLASSPATH revisited
  • From: dawall@xxxxxxxxxx
  • Date: Wed, 9 Aug 2000 16:25:03 -0500

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" <daniel.eyers@honeywell.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: 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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.