I'm up to my eyeballs with Java code! I code all day in Java at work and then come home and code some more. Perhaps this is why I don't see what's wrong with this?
Here's the error message:
e:\suncertify\server\DuplicateKeyException.java:3: error while writing suncertify.server.DuplicateKeyException: e:\suncertify\server\Contractor.java\suncertify\server\DuplicateKeyException.class (The system cannot find the path specified)
The Contractor.java does not even reference the DuplicateKeyException (double checked) anywhere in the code. Now they both reside in the same package if that matters. Here's the content of DuplicateKeyException which compiles:
Basically, my life resolves around Java right now (wish I was talking about Starbucks), so if you can spare a little compassion and forgive me if it's right under my nose, I would greatly appreciate it!
Something went wrong writing a file to disk. As a result another file that references that file cannot find it. Maybe your Contractor class doesn't directly use your exception but is it used under water? Does some method call potentially throw your exception?
maybe your disk is full?
Joined: Jul 03, 2003
Hi Rachel and Jeroen, Thanks for your help.
Rachel, Sure, I will post my Contractor code after work, don't have access to it right now.
Jeroen, I'll have to double check, but I don't think any other methods are throwing the DuplicateKeyException to the Contractor. As of right now, the Contractor just holds information about itself (ie name, location, size....).
You do not say when this error message happens. Is it happening when you are compiling your code? That might explain why it is having trouble "writing". Are you compiling from the command line? Or maybe you are running the program from the IDE and the IDE automatically compiles dependent code (or depended upon code) that needs to be compiled whenever you run something.
So, can you explain what you are doing (and how) when you see this message?
The message "The system cannot find the path specified" seems to be an operating system message that the compiler (or runtime?) is passing thru. The other path it is looking for (e:\suncertify\server\Contractor.java\suncertify\server\DuplicateKeyException.class) seems very odd. It should be e:\suncertify\server\DuplicateKeyException.class. Maybe there is some problem with package name declarations???
We learn by doing, there is no other way.
Joined: Jul 03, 2003
This error occurs during compile time. I'm using TextPad and Command Prompt to compile with. Only using Command Prompt to ensure TextPad is working as it should (trying the trial version 4.7.3). Both times, I get the same error...well until today, now I'm getting a different error message but as you can see, they are basically the same:
e:\suncertify\server\Controller.java:13: error while writing suncertify.server.Controller: e:\suncertify\server\Contractor.java\suncertify\server\Controller.class (The system cannot find the path specified) public class Controller
this is the command I am using to compile all my classes: -d e:\suncertify\server\*.java e:\suncertify\db\*.java
Here's the code for the Controller class:
Thank you everyone for helping!
Joined: Aug 18, 2004
After the -d option you need to specify the location where to place generated class files.
For example: -d . e:\suncertify\server\*.java e:\suncertify\db\*.java
where "." means current directory. You can specify another directory location.