www.webdeveloper.com
Results 1 to 2 of 2

Thread: Trouble loading custom classes into my classes

Hybrid View

  1. #1
    Join Date
    Dec 2004
    Posts
    439

    Trouble loading custom classes into my classes

    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:

    Code:
    package mypackage;
    
    class Base{
    
    	public Base(){
    
    	}
    
    }
    and I'm trying to use it in a class in the mypackage directory like this:
    Code:
    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.

  2. #2
    Join Date
    Jun 2009
    Posts
    98
    Everything looks okay.

    Check to make sure you have a good CLASSPATH.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles