aspose file tools*
The moose likes Oracle/OAS and the fly likes Setting PATH and CLASSPATH Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Oracle/OAS
Bookmark "Setting PATH and CLASSPATH " Watch "Setting PATH and CLASSPATH " New topic
Author

Setting PATH and CLASSPATH

K Riaz
Ranch Hand

Joined: Jan 08, 2005
Posts: 375
Why does OAS override the windows environment variable CLASSPATH and PATH? I have an external directory outside of my Oracle installation with some DLL files, and a JAR in my classpath for a web application. These are in the PATH and CLASSPATH respectivly. But on starting OAS 10g, is overrides it, so my DLLs are not found, and neither is my JAR. How can I add these in? I have noticed half a dozen batch files in Oracle which have statements such as SET CLASSPATH=... and SET PATH=... - do I need to modify these in include the current values of the above variables?

I would like to avoid copying files into the %WINNT%\system32 (e.g. DLL) or %JAVA_HOME%\lib\ext (e.g. JARs) directories.

Thanks.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

Actually what happens is that Oracle is really nice enough to make sure that their stuff is automatically placed in the very beginning of your PATH and CLASSPATH environment variables. You will need to put them in the back manually.

I believe you are on Windows, so go into the computer properties, go to advanced, and click the Environment Variables button, and find your PATH and CLASSPATH and edit it and move those nasty Oracle stuff to the back.

In those config files it usually has SET CLASSPATH=%CLASSPATH%;c:\somedir\blahblah.jar

or

CLASSPATH=c:\somedir\blahblah.jar;%CLASSPATH%

So your original setting are still included.

Again I say usually.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
K Riaz
Ranch Hand

Joined: Jan 08, 2005
Posts: 375
Thanks for your reply Mark. I had another look at the batch files in %ORACLE_HOME%\bin and all the "SET PATH=.." seems to have "%PATH% somewhere in the middle. So thats rather strange, since it looks like it is actually appending a new path to the existing path, not overwriting it as I first imagined.

OAS is not getting what I have in the PATH and CLASSPATH variables (under Win2k). I did a System.getProperty(..) and it doesn't match.

Do you know the sequence of batch files which are called when the server is restarted through the admin "start all" button (via the web interface)?

I had the same problem with Tomcat 5.0.28 where I found the batch file which was in fact overwriting the CLASSPATH. I added %CLASSPATH% and it found it as I had set it in Windows. Not the case with OAS. Where can I find the docs in HTML?
[ August 18, 2005: Message edited by: K Riaz ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting PATH and CLASSPATH