-
compiling with a nested directory structure
I'm getting "resolve symbol" errors when I try to compile source files which
are in the child directory whose dependent on files from it's parent
directory. Here's my current directory structure:
src
-->a
---->b
------>util
What I'm trying to do is compile files which are in the 'util' directory.
Some of these files use some of the classes in the 'b' directory. My
compile statement is the following:
java -d class -classpath src src\a\b\util\aFile.java
Files in the 'util' directory has a import a.b.* statement on top, but I
don't think that's the problem, let alone necessary.
Any assistance would be appreciated.
-
Re: compiling with a nested directory structure
You can't specify a directory for the file you are trying to compile. You
have to enter
javac -d class -classpath (something) aFile.java
and rely on the classpath to direct the compiler to the file. But if you
have declared aFile to be in the a.b.util package, then you have to enter
javac -d class -classpath (something) a/b/util/aFile.java
I'm not going to explain how to set up your classpath when your classes are
in packages, or even when they aren't. It's a long story. You should be
able to find something that explains that.
PC2
"Arnold" <abc@abc.com> wrote in message news:3c9a5ca1$1@10.1.10.29...
>
> I'm getting "resolve symbol" errors when I try to compile source files
which
> are in the child directory whose dependent on files from it's parent
> directory. Here's my current directory structure:
>
> src
> -->a
> ---->b
> ------>util
>
> What I'm trying to do is compile files which are in the 'util' directory.
> Some of these files use some of the classes in the 'b' directory. My
> compile statement is the following:
>
> java -d class -classpath src src\a\b\util\aFile.java
>
> Files in the 'util' directory has a import a.b.* statement on top, but I
> don't think that's the problem, let alone necessary.
>
> Any assistance would be appreciated.
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks