aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Unable to compile class exception" Watch "Unable to compile class exception" New topic
Author

Unable to compile class exception

Mike Han
Greenhorn

Joined: Jul 16, 2001
Posts: 11
Hello
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\_0002fsrc_0002flbm_0002fPaperManJSP_0002ejspPaperManJSP_jsp_0.java:15: Class java.util.ArrayList not found in import.
import java.util.ArrayList;
^

Can anybody give me any help on that?
Thanks in advance.
Mike
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
Greenhorn

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
import="java.util.ArrayList"
to
import="java.util.*"
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: 1506
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.

Bosun


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to compile class exception
 
Similar Threads
Class path issue?
Tomcat 4.0.1 - javabeans not found
JSP import directive in TOMCAT
Class not found error in JSP
JSP's and class files.....