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.
This error concerns capitalization change of first character of inner class name, from upper to lower case, only. I followed these customer supplied instructions and reproduced the resulting compile error exactly as they described it: Problem: class files not renamed when case of class name changes Test case: This file below was originally named class "productElement" with an initial capital "P". The class was compiled, resulting in a compiled file AmazonQueryResult$ProductElement.class. The case change was made to the productElement class and the class was recompiled successfully. A new version of AmazonQueryResult$ProductElement.class was created. However, the case of the generated .class file was not changed to reflect the new class name. About box: Forte for Java 4, Enterprise Edition (Build 020521) Java VM 1.4.0-b92 on Windows fragment of code that shows the error: AmazonQueryResult queryResult = new AmazonQueryResult(); queryResult.catalog.product.title = "title"; The second line generates the following compile error: org/dyck/bookdatabase/amazonqueryservice/AmazonQuery.java [69:1] cannot access org.dyck.bookdatabase.amazonqueryservice.AmazonQueryResult. productElement file org\dyck\bookdatabase\amazonqueryservice\AmazonQueryResult$ productElement.class not found queryResult.catalog.product.title = "title"; Removing the .class files and rebuilding AmazonQueryResult.java produces a class file for the inner class with the correct case. >AmazonQueryResult.java > >/* > * AmazonQueryResult.java > * > * Created on June 17, 2002, 1:23 AM > */ > >package org.dyck.bookdatabase.amazonqueryservice; > >/** Data returned from the Amazon XML query interface. > * Current as of 6/17/2002. > * @author Timothy Dyck > */ > >public class AmazonQueryResult { > > /** member variables for AmazonQueryResult > */ > public CatalogElement catalog = new CatalogElement(); > > /** class for XML catalog element > */ > public class CatalogElement { > /** member variables for CatalogElement > */ > public String product_group; > public productElement product = new productElement (); > /** instantiate class > */ > public CatalogElement() { > } > } // public class CatalogElement > > /** class for XML product element > */ > public class productElement { > /** member variables > */ > public String ranking; > public String title; > public String asin; > public String author; > public String image; > public String small_image; > public String our_price; > public String list_price; > public String release_date; > public String binding; > public String rating; > public String availability; > public String director; > public String tagged_url; > /** instantiate class > */ > public productElement() { > } > } // public class ProductElement > > /** instantiate class > */ > public AmazonQueryResult() { > } > >} // public class AmazonQueryResult
This is a bug in JDK. It works the same way outside of NetBeans, using commandline javac. Please report it to JDK team.
Just a little detailed explanation: it seems that the JVM uses something like C library function fopen(theFileName, "w+") to open the file descriptor. There is already a file Something$Foo and the JVM calls the function as fopen("Something$foo", "w+"). Because for Windows, "Something$Foo" and "Something$foo" are same filenames, the existing file is found, truncated to zero length and written into. The class is written into "Something$Foo", but when javac searches for a file it seems to use case-sensitive comparisons, so reports the class as missing.
BTW: For command-line javac the problem exists for top level classes as well.
Resolved for 3.4.x or earlier, no new info since then -> closing.