General J2EE: Why JAVA file has extension as .Java and .class ???
Everyone generally follows the conventional 3 letter extension but why java follows .java or .class also why not .oak ????
- Posted by: Mukesh Kumar
- Posted on: September 14 2006 04:59 EDT
- 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
You can't be serious. Maybe you should become a florist.
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.
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.
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