CLASSPATH Environment Variable


If a class is located in a package, what do you need to change in the OS environment to be able to use it?

✍: FYIcenter


You need to add the directory or the jar file that contains the package to the CLASSPATH environment variable. Let's say a class Employee belongs to a package; and is located in the file c:\dev\com\fyicenter\hr\ In this case, you need to add c:\dev to the variable CLASSPATH.

2007-03-03, 5056👍, 0💬