Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Weird ClassNotFoundException in Java
#5
Quote:Are you 100% sure it actually loads the file from this location?


my dev directory contains three directories: source, lib and data.
When I build the project, a new directory is created called dist where both data and lib directories are copied to with their content, then a jar file is also generated there.
By doing this, I know that the dist folder will contain the exact same files that are in my development directory.
I also know that by running the "run" task, I'm not in the same directory as the jar file I'm trying to run. But because the folder structure is the same and the contents are exactly the same, I don't think it matters.

I'm pretty sure the jar file containing the library is loaded at the very least during the compilation, because there are no errors. I also tried to set up the classpath for runtime manually and run the jar from it's directory but it also didn't work.

The fact that only one class out of entire library could not be found throws me off...


Messages In This Thread
Weird ClassNotFoundException in Java - by CHmSID - 01-11-2015, 07:18 PM
RE: Weird ClassNotFoundException in Java - by CHmSID - 01-12-2015, 09:12 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)