Results 1 to 4 of 4
- 03-29-2009, 12:58 PM #1
Member
- Join Date
- Aug 2008
- Posts
- 5
- Rep Power
- 0
- 03-29-2009, 10:07 PM #2
Just another cross poster. More than adequately answered here:
New To Java - importing packages at the same level
db
- 03-29-2009, 10:15 PM #3
Member
- Join Date
- Feb 2009
- Posts
- 92
- Rep Power
- 0
Same problem, maybe
Same question, prompted by an attempt to find the asnwer. Let me be more specific on my assumption and attempts to solve it.
When the previous post says "same level", I read that I am in foobar/foo/foo.java and he has a class in foobar/bar/bar.java.
ComSci 101, but thought the obvious answer was ../bar/bar.java, or that a fully realized path would work. Doesn't seem to. My question may be different than his, but it exists anyway.
I have a java file in eclipse on my hard drive at
k:/workspace2/props/src/rdt_props/Props. Its a Sun tutorial exercise.
I have a project that I compiled on another question on greatest common denominator. It is at
I have a java file in eclipse on my hard drive at
k:/workspace2/GCD/src/rdt_GCD/GCD
with a line in the Props source -
import k:/workspace2/GCD/src/rdt_GCD/GCD
Eclipse just complains about either a relative path, or a full path. Eclipse has some environment stuff to set that may solve the problem, but I should also be able to import the other package when I compile from the command line.
Is the import syntax incorrect? Do I need to set a switch in javac. The onlything I saw with java -help is that it might be a classpath problem, but that didn't help;
Edit: I was writing this when the above answer was posted. Read the post on sun. Still having problems, They said exactly what I thought. I'm assuming that we need to import the binary class file, not the source code. Eclipse puts them in different paths src/pckg/foo.java v. bin/pckg/foo.classLast edited by rdtindsm; 03-29-2009 at 10:29 PM. Reason: new data
- 03-30-2009, 03:17 AM #4
Member
- Join Date
- Aug 2008
- Posts
- 5
- Rep Power
- 0
Similar Threads
-
importing external packages
By bubbles in forum New To JavaReplies: 3Last Post: 01-20-2009, 11:42 PM -
Row level locking........
By jithan in forum New To JavaReplies: 0Last Post: 09-02-2008, 07:09 AM -
row level locking
By jithan in forum New To JavaReplies: 1Last Post: 08-28-2008, 06:42 PM -
Java Debug Level
By keshari in forum New To JavaReplies: 1Last Post: 05-26-2008, 08:23 AM -
Importing packages from the packages within same application.
By sta2003 in forum New To JavaReplies: 3Last Post: 02-12-2008, 11:03 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks