JDK-6209535 : A class name Con is never understood by the java compiler
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 5.0
  • Priority: P5
  • Status: Closed
  • Resolution: Won't Fix
  • OS: windows_2000
  • CPU: itanium
  • Submitted: 2004-12-16
  • Updated: 2016-03-23
  • Resolved: 2005-09-01
Related Reports
Relates :  
Relates :  
Description
A DESCRIPTION OF THE REQUEST :
I developed a smaple program having a subclass and if the subclass was named Con the java compiler never compiles the file, instead it spits the bytecode of the program itself  in advance .  I have to get a .class for atleast the used parent class.


JUSTIFICATION :
Suppose if any one tries to Develop as Connection class in JDBC  some may try to use a short name as Con (say) .  At that juncture the compiler has to help the programmer telling this iis either a bug or a thing which is never allowed.

EXPECTED -
i would like to see a .class in the name of  the parent class wihich is not named as Con.
ACTUAL -
I cannot see a Con.class file generated

---------- BEGIN SOURCE ----------
class NewVersion
{

    public static void main(String[] args)
	{
              new NewVersion();
              Con c=new Con();
			  c.myprint();
	}
}


class Con extends NewVersion
{
		  public void myprint()
		  {
			  System.out.println("Its Inside Stuff in Java");
		  }

}  

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
it is the matter of  the complier  which finds out  the available class name  and stops compiler . May be the  the compiler has to be fine tune or  the microsoft(useless)  Naming  convention in  its O.S has to be changed
###@###.### 2004-12-16 16:01:47 GMT

Comments
EVALUATION This will not be fixed. We are considering adding warnings for the problematic file names. See RFE 6241975.
01-09-2005

EVALUATION Certain filenames are reserved on Windows: CON, COMx, LPTx, PRN, AUX, and NUL (I think that's all) So javac and the VM should map these names to other filenames as allowed by the specification. We don't plan to fix it. This is arguably a problem in Windows. ###@###.### 2004-12-17 03:03:12 GMT
17-12-2004