Sign in to follow this  
FatNewbie

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

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this