Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » imports not recognized with source subdirectory
imports not recognized with source subdirectory [message #147773] Mon, 08 March 2004 12:32 Go to next message
Eclipse UserFriend
Originally posted by: rjc.lambent.net

I have imported a project that was developed in JBuilder. It is organized
as follows:

build.xml
src/com/....
test/com/...

If I create the eclipse project at the 'src' level, builds work fine. But
I want to take advantage of the package and deployment targets in the
build.xml, and build.xml is not included when the project is created at
this level. So I created a different version of the project using the
top-level directory so it includes build.xml, src, and test. I configured
the source directories via Project Properties -> Java Build Path ->
Source, where I have entries of

myProject/src
myProject/test

There are internal jars to be added to the classpath at the top-level lib
directory, which I have added in Project Properties -> Java Build Path ->
Libraries.

But with this arrangement, my imports can't be resolved. For example,
src/com/rad/tra/Bridge.java contains

import org.apache.commons.codec.binary.Base64

but eclipse says "The import org.apache.commons cannot be resolved".

The (slightly truncated) .classpath file contains:

<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/commons-codec-1.1.jar"/>
<classpathentry kind="output" path="build"/>
</classpath>

Any hints?

Thanks,
Rich
Surely somebody's run into this! [message #147931 is a reply to message #147773] Tue, 09 March 2004 10:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: rjc.lambent.net

Surely somebody's run into this!
Re: imports not recognized with source subdirectory [message #147948 is a reply to message #147773] Tue, 09 March 2004 10:28 Go to previous message
Eclipse UserFriend
Originally posted by: smesh.openrules.com

> but eclipse says "The import org.apache.commons cannot be resolved".

> <classpathentry kind="lib" path="lib/commons-codec-1.1.jar"/>

Does <yourProject>/lib/commons-codec-1.1.jar contain org.apache.commons
package?

Sam Mesh - http://openrules.com
Life is very short, and there's no time,
For coding and testing, my friend.
Previous Topic:Refactoring warning instead of appending this
Next Topic:Custom builder problem
Goto Forum:
  


Current Time: Sat May 10 05:42:59 EDT 2025

Powered by FUDForum. Page generated in 0.02915 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top