This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
dev build 200110040910 IBM JDK 1.3 I have: class Server (in the root directory) class ClientSupport (in package 'gui') Now, ClientSupport has multiple refers to "Server.MY_CONSTANT" but seeing as it's one directory higher than the root directory it cannot see downward without an import statement, and (as far as I know) one cannot simply "import .*". I tried it, it does not work. So I use "import Server;" instead which works. I then run the Import Management Tool which informs me no identifiers are unresolved. I click on NEXT anyway until I reach the dialog for removing unused import statements. The dialog suggests I remove "import Server;" which is wrong since the import is required. Worse yet, if I tell it to keep the reference to "import Server" but change the import to "package import" instead of "class import" it changes "import Server" into "import .*" which totally breaks the program. IBM JDK doesn't seem to accept "import .*" It doesn't throw an error, nor does it actually import anything. I can only assume Sun's JDK does the same.
Correction: IBM JDK flags "import .*" as "<identifier> expected" before the dot. Hence the import statement is invalid. Does anyone know how one goes about importing the root directory?
You cannot import classes from the default package (the "root" in your words). Default package is out of the namespaces and classes in default package can be used only from other classes in default package. You shouldn't use defualt package for real programming. Anyway, there is a bug in Java module which handles it badly, so reassigning to java module and leaving as open
Target milestone -> 3.3.1.
Already fixed in main trunk by using javac 1.4 code base for parser. This implementation does not allow to import default package. Will not be fixed in release33, as workaround use beta version of java module available from Beta Autoupdate.
Verified
Resolved for 3.4.x or earlier, no new info since then -> closing.