-
Why JAVA file has extension as .Java and .class ??? (4 messages)
- Posted by: Mukesh Kumar
- Posted on: September 14 2006 04:59 EDT
Everyone generally follows the conventional 3 letter extension but why java follows .java or .class also why not .oak ????Threaded Messages (4)
- Re: Why JAVA file has extension as .Java and .class ??? by Christopher Stach II on September 14 2006 13:09 EDT
- Re: Why JAVA file has extension as .Java and .class ??? by Jeroen Wenting on September 15 2006 02:23 EDT
- not a language requirement by Vijay Murugan on September 18 2006 03:06 EDT
- Re: not a language requirement by Jyothish John on September 19 2006 05:51 EDT
-
Re: Why JAVA file has extension as .Java and .class ???[ Go to top ]
- Posted by: Christopher Stach II
- Posted on: September 14 2006 13:09 EDT
- in response to Mukesh Kumar
You can't be serious. Maybe you should become a florist. -
Re: Why JAVA file has extension as .Java and .class ???[ Go to top ]
- Posted by: Jeroen Wenting
- Posted on: September 15 2006 02:23 EDT
- in response to Mukesh Kumar
Everyone generally follows the conventional 3 letter extension but why java follows .java or .class also why not .oak ????
In that case, why does C use the extension "c" or "C", and "h" or "H" for sourcefiles? That's not 3 letters either... The 3 letter convention is a leftover from the olden days when that was all many operating systems supported. If you want that to remain, you should also demand that everyone write classes with names no more than 8 characters long as that was the norm in those same ancient times. If you go back even further, you should drop the extension completely and don't use directories either, as originally those didn't exist at all. -
not a language requirement[ Go to top ]
- Posted by: Vijay Murugan
- Posted on: September 18 2006 03:06 EDT
- in response to Mukesh Kumar
Hi , This is not actually a language requirement, but it is an implementation requirement of many compilers, including the reference compilers from Sun. It is unwise to ignore this convention, because doing so limits the portability of your source files (but not, of course, your compiled files). -vijay.s. -
Re: not a language requirement[ Go to top ]
- Posted by: Jyothish John
- Posted on: September 19 2006 05:51 EDT
- in response to Vijay Murugan
It is simply because Sun decided to name the java files with a .java extenstion and a class file with a .class extension, and all the compliers/vendors adhere to the creatorsof java. May be some one will come up with a 010 extension for their version of java complier and a 000 extension for the class files for their VM. PLAINLY SPEAKING SUN CREATED JAVA , AND THEY DECIDED TO SPECIFY SOURCE FILES WITH A ".java" , AND A ".class" EXTENSION FOR THE CLASS FILES. AND NO ONE HVE DARED TO TRY OUT A DIFFERENT EXTENSION FOR THEIR VERSIONS OF COMPILERS ?VM's J