File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse import problem..mystery (code included) 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 » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse import problem..mystery (code included)" Watch "Eclipse import problem..mystery (code included)" New topic

Eclipse import problem..mystery (code included)

Maria Sachhause

Joined: Nov 30, 2005
Posts: 10
First, sorry about broken english.

I have tried to make NanoXML work on Ecplipse without success.
This is what I have tried do so far step-by-step:

1. I create new project (file-new-java project) and name it for example as TEST
then I select Add External JARs and I select nanoxml-2.2.1.jar

2. I create a class called DumpXML(it's from nanoxml tutorial)

3. Then Eclipse says "The Import net cannot be resolved"

Why it cannot be resolved is a mystery to me, please help me.

Can you describe how I can configure it on Eclipse?
please step by step. thanks.

Code is below if it helps.

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 15094

In the Package Explorer in Eclipse, do you see the library listed (possibly under "Referenced Libraries")? If not, try adding it again: select Project / Properties / Java Build Path / Libraries and add the JAR again with "Add External JARs...".

If you click open the library in the Package Explorer, you can see what packages are inside the JAR file. Is there a package net.n3.nanoxml, or does it have a different name? Maybe, if the name is different, the tutorial you're following is for an older version of the library you're using, and they've renamed the package to something else.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11955

Since this seems to be an Eclipse issue, I think it would fit better in our IDE forum. I'll move it over there.

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
I agree. Here's the link:
subject: Eclipse import problem..mystery (code included)
It's not a secret anymore!