Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compiling Code without a class file!

 
Robin John
Ranch Hand
Posts: 281
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic