• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Setting Classpath/path in WindowsNT

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi
Can anybody tell me how do i set path and classpath settings working in WINDOWS NT 4.0
Thanks
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by zaeem masood ashar:

Hi
Can anybody tell me how do i set path and classpath settings working in WINDOWS NT 4.0
Thanks


1.Double click on MyComputer icon
2.Click on Control-Panel icon
3.Double click on System icon
4.Click the Environment tab
5.Under the user variables set Path=c:\java_home(where you installed java)\bin;%PATH%
6.Set ClassPath=c:\java_home\lib;.;(or the classpath specified by the product you want to install)
 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wrote a bat file so that only the path and classpath for a given dos window could be changed (actually appends the paths to the Windows NT environment's paths). The reason being, where I work they replace the environment settings with their own profile each time we login. The effect is, you change the environment paths and everything works, but once you log back in the path and classpath along with all the other environment value are replaced with the co. profile values. It took me a bit of head scratching to figure out what the heck was going on. My request for a different environment setup was rejected, they want everyone the same.
If this happens to you or you don't want to change your environment setting, you can use the following bat file each time you want to do some java. Just put it in the dir where you keep you java source and run it before you do any compiling or executing. When you close the dos window the path and classpath will be discarded. Also the windows environment is not effected, meaning even though you have changed (appended) the paths on the dos-window Windows itself has its original paths in its environment. If you open other dos windows they will have the Windows NT environment's paths not your new paths.
If you use this, modify the path and classpath in the bat file to meet you needs.
j-set.bat
cls
@echo *****************************************************
@echo Temp Set-up for Java
@echo PATH and CLASSPATH are set only for this DOS window.
@echo *****************************************************
@echo Off
SET PATH=%PATH%;C:\your_jdk_version\bin;D:\your_java_source
SET CLASSPATH=C:\your_jdk_version\lib\;.;
REM ----------------
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic