Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Eclipse unable to reference class ending with "$" in its name?
Eclipse unable to reference class ending with "$" in its name? [message #1865550] Mon, 06 May 2024 11:52 Go to next message
Eclipse UserFriend
I am working on a Spring Boot/Maven app that make use of generated metamodel class under target/generated-sources/annotations/. For testing this problem I created these classes manually.

When I have a class ending with "$", for example "VodMetadata$" that is under target/generated-sources/annotations/<pkg path>/ or another source folder I created, eclipse is unable to resolve it. However if I have other classes such as "VodMetada", "VodMetadata1", "VodMetadata_" under same package eclipse has no problem resolving them.

If "VodMetadata$" is placed under "src/main/java" it is resolved. If it has a unique package name it also have no problem. This problem only seem to occur when it is under a separate source folder but has the same package/path as a package in "src/main/java". I can't change the package because the class will be generated by a library.

The app can be compiled and run without any problem. IntelliJ does not have this problem.
Re: Eclipse unable to reference class ending with "$" in its name? [message #1865565 is a reply to message #1865550] Tue, 07 May 2024 00:41 Go to previous messageGo to next message
Eclipse UserFriend
If the class is accepted from one source folder but not from another with same package, that sounds like a bug to me.
I suggest you raise a new bug here - https://github.com/eclipse-jdt/eclipse.jdt.core/issues/new
Re: Eclipse unable to reference class ending with "$" in its name? [message #1865595 is a reply to message #1865565] Tue, 07 May 2024 08:55 Go to previous message
Eclipse UserFriend
Thanks for you reply. Since I am not very familiar with Eclipse was just wondering if someone else encountered this before, or there is a settings somewhere to flip for this.
Previous Topic:How to debug in local eclipse when server is in another box?
Next Topic:Jgoodies no class defined error
Goto Forum:
  


Current Time: Thu Apr 24 20:27:18 EDT 2025

Powered by FUDForum. Page generated in 0.26150 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top