Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Eclipse 3.0.0 initial setup, Win2K

Posted on 2004-08-16
11
Medium Priority
?
280 Views
Last Modified: 2012-08-13
Hi,
I am trying to set up Eclipse to write a simple java file.  The end use is with the displaytag taglib (JSP) though I don't think that should matter...  I have been playing with Java for a while but haven't been able to spend enough time to get very far up the learning curve and I have also been focused on JSP.

I start with the blank package explorer, right click and select new project, java project.  The java file I need to write needs to import a couple of provided java files:

import org.displaytag.decorator.ColumnDecorator;
import org.displaytag.exception.DecoratorException;

It appears I have to bring those into the project folder in the package explorer in order for eclipse to find the files for the import (puts them in the classpath?).  I found two ways to do this, drag the top level org folder into the folder - this created the need to bring in a bunch of other packages to handle all the dependencies in the 20 or so files in this path, which seems like a bad idea.  The second way was to right click and then import a file - first I had to move the org folder to the root directory so the imports would resolve properly which was a bit tedious.  Is this the best way to add the files to the classpath?

Second problem holding me up is that eventually one of the files has:
import javax.servlet.jsp.JspTagException;
where do I get javax.servelet…?  I recognize it as a Sun package but I couldn’t find it on my computer (Java 1.4.2_04).

To summarize, I have two questions:
1. Best way to add files to the classpath (if I have the terminology right) in a project
2. Where do I get javax.servelet…

Thanks,
Eric
0
Comment
Question by:EricE
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
11 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 11817939
I do not know anything about Eclipse so I can't help you with your first question.

The javax.servlet.jsp package is a package that comes with the servlet api 2.2 specification. You should already have it if you have the jdk1.4.2.
0
 

Author Comment

by:EricE
ID: 11817985
Hi,
I did a find across all my hard disks and only came back with some html files that referenced it and a jar file in an eclipse plugin.  No .java file though...

Thanks,
Eric
0
 
LVL 35

Accepted Solution

by:
girionis earned 800 total points
ID: 11818022
They should be in a .jar file, as far as I remember they are now in the j2ee.jar if you download the j2ee sdk or in the servlet.jar if you have the standard sdk.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 9

Expert Comment

by:ronan_40060
ID: 11818883
check out the online documentation of Java on www.eclipse.org 

you can download the Java Development Guide in PDF format everything is mentioned there
0
 

Author Comment

by:EricE
ID: 11827150
Hi,
girionis - I found the servlet.jar file but it doesn't appear to be recognized when I add it to the package explorer...seems like it should work, looks like I will have to RTFM.

ronan - I downloaded the manual when I got eclipse but I was hoping by give the questions what seemed like a relatively large number of points to get somebody to give me the step by step procedure.  I will eventually read the manual, but right now I am working on this stuff too late at night to have the bandwidth to do it now (unless I don't get the answer here of course).

Thanks,
Eric
0
 
LVL 35

Expert Comment

by:girionis
ID: 11827887
What do you mean it does not recognize the package? Are you still getting the same error message?
0
 

Author Comment

by:EricE
ID: 11832017
Hi,
It still gives an error (red underline) under the import statement for import javax.servlet.jsp.JspTagException;.  I am at work now so I don't have the exact error message.  For other import statements, Eclipse would update automatically when I added the org.apache... source to the project and clear errors for the related import statements.  That is not happening when I add the jar file.

Thanks,
Eric
0
 
LVL 35

Expert Comment

by:girionis
ID: 11833019
What happens if you do:

jar -tfv servlet.jar | grep JspTagException
0
 
LVL 35

Expert Comment

by:girionis
ID: 11833024
It might not be in the servlet.jar...
0
 

Author Comment

by:EricE
ID: 11838130
Hi,
It was in the servlet.jar but once I figured out how to import the jar files, Eclipse appears to be smart enough to realize that I don't need it, or at least it generated a class file that worked with displaytag which is all I am looking for at this point.

Thanks,
Eric
0
 
LVL 35

Expert Comment

by:girionis
ID: 11838548
Ah... nice one, thank you for the update (and for accepting an answer) :)

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question