• 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

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why do need to always set the CLASSPATH even through I am just working with one class in one directory, and that class is in my current directory?
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you always setting it using the
java -classpath ... method? If so you are only
setting it for a particular run of the JVM. You
can set you system's CLASSPATH variable so you
don't have to do this all the time.
For Windows 98(maybe 95 and ME too):
Start Menu>Run...>type in msconfig
Click on the autoexec.bat tab
Editthe text SET CLASSPATH=C:\PROGRA~1\JAVA\J2RE1.4.1_01\lib\rt.jar (or something close
at the end of this, put a ; (semicolon) and either type in the full path to where the .class is located OR type in a . (period)

For Windows 2000/XP:
Start Menu>Settings>Control Panel
System
Advanced Tab
Environment Variables
Find the CLASSPATH variable and edit as above
DOn't know about any other OS
 
So you made a portal in time and started grabbing people. This tiny ad thinks that's rude:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic