I have the following setup:
java installed to: c:\j2sdk1.4.1_02
I want to be able to run java programs on an e: drive, but I get the following error:
Exception in
thread "main" java.lang.NoClassDefFoundError: TestMail
I can compile a program for example in the e:\startup folder by typing: c:\j2sdk1.4.1_02\bin\javac TestMail.java from the e:startup folder
However when I go to run this program by typing: c:\j2sdk1.4.1_02\bin\javac TestMail , I get the above error.
Now my envirnoment variable setting are:
Path
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program
Files\Symantec\pcAnywhere\;C:\j2sdk1.4.1_02\bin;
CLASSPATH:
%JAVA_HOME%\lib\tools.jar
JAVA_HOME:
c:\j2sdk1.4.1_02
I would like to be able to compile and run java programs from anywhere on my system. How would I set the classpath to allows this?
Listing on the imports on the testmail program:
import java.sql.*;
import java.text.*;
import java.util.*;
import java.io.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
import java.net.InetAddress;
import java.net.*;
public class TestMail
Any help would be great.
thanks!
Dean