Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting PATH and CLASSPATH

 
K Riaz
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
K Riaz
Ranch Hand
Posts: 375
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic