|
Thanks a lot. The '-s' switch on the export command was what I missed and does the job now. Marco van Maris Blair Wyman <wyman@vnet.ibm.com> on 28/04/2000 18:25:54 Please respond to JAVA400-L@midrange.com To: JAVA400-L@midrange.com cc: (bcc: Marco Van Maris/EPT) Subject: Re: Unable to access class files Excerpts from java400-l: 27-Apr'00 Unable to access class files Marco_Van_Maris@ept.lu (1043*) > I don't seem to be able to make javac find classes in package > com.ibm.as400.access. I tried to modifiy CLASSPATH and also used the > classpath options of javac and javap and even unpacked the original jar > into its constituent files. > CLASSPATH is set as follows: > CLASSPATH=/QIBM/ProdData/HTTP/Public/jt400/lib/jt400.jar If this is the exact command you used to set the CLASSPATH, then I see what's wrong. The issue is not unique to QShell; it applies to all UNIX-like command shells, though the syntax depends on the shell. The issue involves the "visibility" of a variable to its child processes. When you set a variable like: MYVAR=some_value then MYVAR is only visible to the "current" shell -- it is not passed to child processes (such as javac) in the environment. In order to tell the shell to put the variable into the environment for child processes, you need to use the 'export' command, like so: MYVAR=some_value export MYVAR This is typically elided into a single command: export MYVAR=some_value So, for the CLASSPATH example, you could use: export CLASSPATH=/some/dir:/some/other/dir/with/maybe.jar NOTE: If I remember correctly, in V4R3 you had to specify the -s parameter on the 'export' statement, due to some implementation details unique to Java/QShell interactions. So, you'd need to use: export -s CLASSPATH=/QIBM/ProdData/HTTP/Public/jt400/lib/jt400.jar In V4R4 and later, the -s is tolerated but not required. > The following command does not work either: > javap -classpath /QIBM/ProdData/HTTP/Public/jt400/lib/jt400.jar > com.ibm.as400.access.AS400 > com.ibm.as400.access.AS400: no such class This is a little spookier... I suspect we didn't get the javap's "-classpath" parameter implemented quite correctly... Of course, the stock question is always "Are you up-to-date on your PTFs?" :) There is a "group PTF" for Java that lets you get current in one fell swoop. To determine if you have the latest group PTF installed, you can do: DSPDTAARA DTAARA(QJAVA/SF99066) You should see Group PTF#: SF99066-06 V4R3M0 07/26/1999 If you don't see this, or if the data area isn't found, I think the answer is as simple as ordering SF99066 through your regular support channels, and a CD will get sent to you containing all the required PTFs to get you updated. Hope this helps, -blair ___ _ Blair Wyman IBM Rochester ( /_) / _ ' _ (507)253-2891 blairw@us.ibm.com __/__)_/_<_/_/_/_' Opinions expressed may not be those of IBM +--- | 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.