IN JAVA - What on earth are CLASSPATHS and how to i set them!

Started by
1 comment, last by FatNewbie 18 years, 5 months ago
Hi, I've downloaded sun's javamail-1.3.3_01 and i've unzipped it, but it says i need to set a class path, how on eath do i do that! it says: Assuming you unzipped javamail-1_3_3.zip in c:\download the following would work: set CLASSPATH=%CLASSPATH%;c:\download\javamail-1.3.3\mail.jar;. Also include the "activation.jar" file that you obtained from downloading the JavaBeans Activation Framework (which i do), in your CLASSPATH. set CLASSPATH=%CLASSPATH%;c:\download\activation\activation.jar what do i do, do i just go into a dos prompt and just type out set CLASSPATH=%CLASSPATH%;c:\download\javamail-1.3.3\mail.jar;. with my own directories in place of there's, or do i need to add this line to a file ?? thank you in advance wise members of game dev - Matthew
Advertisement
The CLASSPATH environment variable is a set of directories which are used when a java class is loaded (similar to a PATH environment variable, which is searched when you specify "program.exe" on the command line).

On windows you can add to it via the control panel (Control panel -> System -> Advanced tab -> Environment variables button). However it's usually a better idea to specify it on the command line when running your app. There should be an option to specify the classpath in your IDE's 'run program' settings.
Thank you soo much :D !!!

This topic is closed to new replies.

Advertisement