Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to save as a java file

 
jane jutu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:
I am a new java learner. I intalled Windows 98 ( no Dos intalled) on my computer. Then
I installed the JDK1.2.2, and set up the path. After writting the code using Notepad, I
selected 'All Files' under the extenstion menu,and tried to save it as a *.java. However,
the file remains as a text file, not a java file. Does anyone know how to fix this problem?
Any insight would be highly appreciated. Thank u very much!
 
leo donahue
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Choose the Tools menu in Windows Explorer.
2. Choose the Folder Options menu item.
3. Click the view tab.
4. Uncheck the "hide file extensions for known types" check box.
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jane,
Welcome to JavaRanch. I see you had some problem posting this as four instances resulted. It would be nice if you would delete the other three posts. You can do that by selecting each and clicking on the Edit/Delete icon and choosing Delete Post in the resulting window.
Now for your problem, you'll be much better served to forget about notepad and try something like TextPad which is for writing programs. You can even launch the compiler directly from it. You can download it here
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've deleted three of the posts.
Jane please press the little button with an icon that looks like a letter and a pencil. You can then edit your post. Thanks
[ May 06, 2003: Message edited by: Barry Gaunt ]
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have just done that on Windows ME and found the same problem if you do not speciy the file type explicitly as .java
So if your class is MyClass, you must specify MyClass.java in the "filename" box.
The other "extension" box should be "All Files".
Hope that helps,
-Barry
 
jane jutu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Many thanks for your help. I used the way leo
posted, and solved the problem. thanks again
everyone.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic