Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Compile error Package Does not Exit  RSS feed

 
Jim Smithian
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am not very new to java but, still sometimes get confused by classpath errors. I am writing some servlets, they worked fine until yesterday when I added some source file to my two packages. When I try to compile packages, compiler complains that the other package does not exist. I have used the proper package name and import statements.

Here is part of my directory structure:

WEB-INF
|
|-classes
| |-pac
| |-emp
|-src
| |-pac
| |-emp
|
My classpath includes the 'classes' directory. Currently there is no class file in the class directory.

When I compile source files in the 'pac' package, it says that package 'emp' does not exist, and the same when I try to compile the 'emp' package.

Here are the commands that I used to compile:
.../src/pac> javac *.java
.../src/emp> javac *.java
Can any body please help me to fix this problem.

Thanks

Jim

[ November 12, 2004: Message edited by: Jim Smithian ]

[ November 12, 2004: Message edited by: Jim Smithian ]
[ November 12, 2004: Message edited by: Jim Smithian ]
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunately, your directory diagram was mangled by the message board. To keep your formatting, you can use UBB CODE tags. Feel free to go back and edit your original message by clicking on the pencil-and-paper icon at the top right of it.

With that said, I'm assuming that you mean that src and classes both contain directories called pac and emp. I'm not sure why you are getting the errors you describe. Can you please copy-and-paste your CLASSPATH here as well as the exact commands you use to compile the code? Also indicate what the current working directory is when you run these commands. These details should help us track down your problem.

Thanks,

Layne
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!