Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in Compilation

 
mi blrin
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) while compiling from dos, I got error's like:

a) package javax.servlet.http does not exist at
import javax.servlet.http.HttpServletRequest;

b) package org.apache.struts.action does not exist at
import org.apache.struts.action.ActionForm;

what's the problem, can anyone explain?
 
Henry Wong
author
Marshal
Pie
Posts: 21504
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both of those mentioned are *not* classes, that are by default, part of the standard JDK. I am assuming that you installed those packages, and have placed them in your classpath?

Henry
 
mi blrin
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
originally by Henry

I am assuming that you installed those packages, and have placed them in your classpath?
------------------------------------------------------------------------

Henry Thank's for reply,

I have neither installed these packages nor placed them in classpath

may be some different problem, someone please sovle.

Thanks for All
 
Henry Wong
author
Marshal
Pie
Posts: 21504
84
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have neither installed these packages nor placed them in classpath

may be some different problem, someone please sovle.


Well, if you have "neither installed these packages nor placed them in the classpath", then how do you expect the compiler to magically find them?

The compiler is complaining that the classes "does not exist". Why do you think these problems are not related?

Henry
 
Vikas Kapoor
Ranch Hand
Posts: 1374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by mi blrin:
originally by Henry ...
I have neither installed these packages nor placed them in classpath
...

Hi Mi,

Welcome to JavaRanch.

The error says that it is not able to find those classes (HttpServletRequest and ActionForm) while executing import statement.

In order to compile and run the application you need to include appropriate jar files and put them into classpath also.

Please tell us if you get any problem after doing this.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"a" ios from a jar called j2ee.jar or servlets.jar. "b" is from a jar called struts.jar.

The first step is to locate these files. You don't really install jars as they aren't executable. I think Henry meant to ask whether you downloaded/imported them.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic