File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes how to save as a java file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how to save as a java file" Watch "how to save as a java file" New topic
Author

how to save as a java file

jane jutu
Greenhorn

Joined: May 06, 2003
Posts: 2
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

Joined: Apr 17, 2003
Posts: 327
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.


Thanks, leo
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
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


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
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 ]

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
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

Joined: May 06, 2003
Posts: 2
Many thanks for your help. I used the way leo
posted, and solved the problem. thanks again
everyone.
 
 
subject: how to save as a java file