JDK class used by library not found, package name is incorrect

Answered

I'm having a strange problem. I am using a third party library that when run gets class not found exceptions for JDK classes, except that for some reason the package name has been prefixed, for example gj/awt/geom/Dimension2D$Double. I have not changed the library in a long time. The problem went away after I did several things including flushing the file system cache and rebuilding the application that used the library. Sorry I can't say exactly what helped because there were other problems I ran into. I'm curious to know how the package name could be altered. The library class files have the expected class name strings.

0
4 comments
Clear Cache and rebuild project would lead to reindex, which may be helpful for project to re-recognize some dependencies and classes. The issue may be related to some cache conflict.
0

So, where is the code that could create that fully qualified class name, given that it does not appear in any source?

0
Hi Alan, could you please provide some screenshots of the issue, for example in which scenario the package name could be renamed automatically? Usually the package name won't be changed, but if you refactor some files like move or something else, or after code inspection and take the suggestions automatically, it may change the package name if there are some misconfiguration in your code.
0

I did not change the library code at all. The problem was fixed by rebuilding after clearing the cache.

 

0

Please sign in to leave a comment.