You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was developing a relatively complicated Java app in Netbeans18. I reached a stable point in my code and wanted to update the IDE. I installed using the exe installer on a Windows10 machine. I opened my project and dependencies. Netbeans21 converted the project files and everything seemed normal. I did a clean and build and the project built, all the new jars appeared. Everything looked good. I attempted to run a class in the generated jar.
I got an error like the following:
Error: Could not find or load main class com.example.AClass in module jdk.internal.vm.compiler
The project is a plain netbeans project that I've updated since circa 2017. It uses the standard ANT build process with NO overrides on my part. I placed some echo commands in the build-impl.xml and can verify that the class path points to dist/classes (in addition to the dependencies the main project has). Similarly, I get the error when I attempt to debug. I can see the class in the dist/classes directory. I can see the jar is created. There are warnings, but no errors.
This feels like a problem where something in a .properties file is missing, but I can't see anything obvious. I have tried changing the src to java20, in hopes whatever is missing would be overwritten, but nothing.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi!
I was developing a relatively complicated Java app in Netbeans18. I reached a stable point in my code and wanted to update the IDE. I installed using the exe installer on a Windows10 machine. I opened my project and dependencies. Netbeans21 converted the project files and everything seemed normal. I did a clean and build and the project built, all the new jars appeared. Everything looked good. I attempted to run a class in the generated jar.
I got an error like the following:
Error: Could not find or load main class com.example.AClass in module jdk.internal.vm.compiler
The project is a plain netbeans project that I've updated since circa 2017. It uses the standard ANT build process with NO overrides on my part. I placed some echo commands in the build-impl.xml and can verify that the class path points to dist/classes (in addition to the dependencies the main project has). Similarly, I get the error when I attempt to debug. I can see the class in the dist/classes directory. I can see the jar is created. There are warnings, but no errors.
This feels like a problem where something in a .properties file is missing, but I can't see anything obvious. I have tried changing the src to java20, in hopes whatever is missing would be overwritten, but nothing.
Beta Was this translation helpful? Give feedback.
All reactions