This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


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
Author

Eclipse import problem..mystery (code included)

Maria Sachhause
Greenhorn

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: 14193
    
  20

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
Bartender

Joined: Oct 02, 2003
Posts: 11351
    
  16

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
 
GeeCON Prague 2014
 
subject: Eclipse import problem..mystery (code included)