File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Compiling Code without a class file! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Compiling Code without a class file!" Watch "Compiling Code without a class file!" New topic
Author

Compiling Code without a class file!

Robin John
Ranch Hand

Joined: Sep 10, 2008
Posts: 270

hey Guys,

first let me tell you the project details,

Details - Its a very small project having 3 classes and certain number of jars in its class path in the batch file.

now for the problem -

Out of those 3 classes - I have the problematic situation in just one small method in a small class -

Situation - In the class I have a method which throws two exceptions lets say...
method throws ConfusedException, ExampleException {
<...body...>
}

now after analysis, I found out that this method never throws the ConfusedException and it's just a leftover from previous codes that have been there... (very old application)...

okay when I compile the entire class with the existing jars on the main server it compiles fine and even runs! but when I took the code to my local machine and imported to eclipse it was showing me compile time errors, I tried to run it on my local machine...but..

Weird Problem - There is no class called ConfusedException (in my case) and its not even there inside any jars, nowhere absolutely nowhere! not even as an inner class..... I found out a dependency tool which lists out the dependent classes that tool listed all the paths but for this class its showed up as "NA"

I am actually confused as - from where this class is taken in the server and howcome I'm not getting the class ? I have even searched all the system files and jars in the original system where this runs fine for that class and also my local machine.. the file is not found anywhere... I just want to know where all I should look for this class.


Time is what we want the most, but what we use the worst. -- William Penn
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

If you can compile it then ConfusedException exists in *something* on your classpath.

Have you examined each of the jars on the classpath when you compile?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compiling Code without a class file!
 
Similar Threads
I Need a Sanity Check on this job.
Client and EJB Classes On Different Servers
ibm websphere test 157 for websphere studio application developer 4.0.3 for windows
Java versioning problem
Relative directory issues