I want to know that when we create a java file it has extension .java and the class file generated is .class But DOS only supports 3 characters as extension. What if wanna write and runa an application on DOS alone. It's very urgent. Plz help Neeraj
i am not sure but try it! there is a dos editor. try: edit File_Name.java i repeat try it coz i don't know if it works but this is a simple idea to try ! good luck plz inform me if it works. byez
Hi Amer, Got ur reply but friend when u save a file in DOS Editor it will truncate the last chars after 3 chars so the file saved will be file.jav and not file.java and forget about the .class file. I hope it is like this only. just check it out. Bye Neeraj
Neeraj, are you running a DOS only PC or are you running DOS under some version of windows? You may find that your DOS version will support long filenames but the DOS Editor will not. In that case, you can save your file and then copy or rename it back to the .java extention that you need for compliation.
What version of DOS are you using? I currently compile and run Java on Win95, Win98 and WinNT at various times. I don't use an IDE - just raw DOS and notepad to save and execute from. There is no problem with the .java or .class extensions.
Hi, Thanks for the reply. When u compile ur program from DOS PROMPT in Win 95/98/NT then there is no problem. The reason the MSDOS PROPMPT is an application that simulates DOS and as Win 95/98/NT support long file names so does the DOS PRMPT so don't confuse the DOS PROMPT Application with DOS which is an OS. Let me put it more clearly I have a system with only DOS installed on it there is no Win95/98/NT. How do I execute Java Programs there. Forget about the DOS Editor that renaming can be done but what if ur OS doesn't allow more than 3 chars as Extension. I hope I have made it clear. Neeraj