Click to See Complete Forum and Search --> : Trouble loading custom classes into my classes


decibel
07-29-2009, 02:06 PM
Hi,

I cannot figure out how to load a custom class into a class I've created.

I'm using tomcat, so i have a directory structure like this:

webapps/myapp
webapps/myapp/WEB-INF/classes/mypackage

I've created and compiled a class called Base in the mypackage directory like this:


package mypackage;

class Base{

public Base(){

}

}


and I'm trying to use it in a class in the mypackage directory like this:

package mypackage;

import java.util.*;

import mypackage.Base;

public class MyClass implements java.io.Serializable {

public MyClass(){

Base var = new Base();

}

}


When I try to compile MyClass, i keep getting "cannot resolve symbol".

Please help, what is the trick to using custom classes???

thanks in advance.

JavaServlet
07-29-2009, 04:45 PM
Everything looks okay.

Check to make sure you have a good CLASSPATH.