Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I set the classpath?

Classpath
0
Posted

How do I set the classpath?

0

My thanks to Peter van der Linden for this answer–you can find this FAQ answer, and other great ones, listed at; http://www.afu.com/javafaq.html The CLASSPATH environment variable tells the VM’s class loader where to find classes that are directly or indirectly invoked, including system classes. The CLASSPATH variable should o point to the directory containing the class file, for classes not in a package. o point to the package root, for classes in a package. The root is the parent directory of the highest directory of the package name. o point directly to the zip or jar file, if the classes are in an archive file. You may have to list the contents of the archive to get the correct package/path name for the class. Separate multiple paths and archives with a platform-specific separator, “;” for Windows; “:” for Solaris Also remember that o Browsers set the CLASSPATH to the directory of the HTML file, plus the codebase parameter. For a great tutorial on updating the CLASSPATH variable,

0

Go to Start==> Settings==>Control panel Double click “System” icon Choose Environment tab Type Variable as classpath Type Value as the required classpath (For Example, if the user extracts the JdbcClasses.zip that is provided with the Installation Set to a directory called D:\JDBCClasses, then the classpath Value should be given as D:\JDBCClasses) Press “Set” button press “OK” Classpath setting is over. Close any open DOS windows to take this into effect. From commandline you can give the command: C:\> SET CLASSPATH=%CLASSPATH%;D:\jdbcClasses\JdbcClasses.zip It will take effect in current DOS window only.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.