markhorn732-dev opened a new issue, #8738:
URL: https://github.com/apache/netbeans/issues/8738
### Apache NetBeans version
Apache NetBeans 26
### What happened
There seems to be something wrong with the mechanism for specifying an
import.
ProjectA and ProjectB are Ant projects.
PackageA includes ClassA1
PackageB includes ClassB1, with "import PackageA.ClassA1;"
I do clean and build of ProjectA.
For ProjectB, I have Properties =>Libraries=>Compile=>ClassPath =>
../ProjectA/dist/ProjectA.jar
But in ProjectB1.java, the compiler finds an error at the import statement,
"PackageA does not exist".
I have tried deleting the cache, restarting Netbeans, and restarting the
computer, but the problem remains.
### Language / Project Type / NetBeans Component
Java Ant projects
### How to reproduce
1. Create ProjectA and ProjectB, with packages PackageA and PackageB and
source ClassA1.java and Class B1.java:
==================
package PackageA;
public class ClassA1 {
public ClassA1() {} {
}
}
==================
package PackageB;
import PackageA.ClassA1;
public class ProjectB1 {
public static void main(String[] args) {
ClassA1 ca = new ClassA1();
}
}
==================
2. Do clean and build for ProjectA.
3. For ProjectB, specify
Properties =>Libraries=>Compile=>ClassPath=> [add]
../ProjectA/dist/ProjectA.jar
The error is then apparent in the attempted immediate compilation of Class
B1.java, i.e. "PackageA does not exist".
### Did this work correctly in an earlier version?
Apache NetBeans 21 or earlier
### Operating System
Windows 11 Version 24H2 (OS Build 26100.4946)
### JDK
java version "24.0.2" 2025-07-15 Java(TM) SE Runtime Environment (build
24.0.2+12-54) Java HotSpot(TM) 64-Bit Server VM (build 24.0.2+12-54, mixed
mode, sharing)
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
The problem arose when I moved from an earlier Netbeans on Windows10 to a
new PC, with Windows 11 and the current Netbeans. It occurs everywhere one of
my packages needs to reference code in other packages of mine. It does NOT
occur when invoking code in Java or POI packages (e.g. java.io or
org.apache.xmlbeans).
### Are you willing to submit a pull request?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists