This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Servlets and the fly likes Unable to compile class exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Unable to compile class exception" Watch "Unable to compile class exception" New topic

Unable to compile class exception

Mike Han

Joined: Jul 16, 2001
Posts: 11
I am using tomcat 3.2 on local machine,in one of my jsp page I have directive <%@ page import = "java.util.ArrayList" %> when this page is accessed in the program, tomcat gave the message :
Unable to compile class for JSPD:\tomcat\work\localhost_8080%2Fconference\ Class java.util.ArrayList not found in import.
import java.util.ArrayList;

Can anybody give me any help on that?
Thanks in advance.
Dave Soto
Ranch Hand

Joined: Sep 15, 2001
Posts: 55
It sounds like maybe your JAVAHOME is not correctly set. It needs to be pointed to your JDK. Are you able to run other servlets/apps on this same machine, or is this your first one, because it sure sounds like your servlet engine can't see your JDK.
Mike Han

Joined: Jul 16, 2001
Posts: 11
Hello Dave
Thank you for response.
The other jsps and servlets work well.Even for this JSP page,once I changed the
compiling can go through this statement but failed at the Arraylist variable I define in the page.
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
ArrayList is available in java 2 and up. You must be using jdk 1.1.something. and not jdk 1.2 or higher. You can either download JDK 1.2.2 or higher or just use a Vector instead of ArrayList.


So much trouble in the world -- Bob Marley
I agree. Here's the link:
subject: Unable to compile class exception
jQuery in Action, 3rd edition