Discussion:
How do I save a .java file in Notepad?
(too old to reply)
l***@gmail.com
2008-10-08 20:01:56 UTC
Permalink
I have an assignment and the textbook has us create code in Notepad.
The file is HelloWorld.java (in the C: prompt)
Anyhow the book states "save the source code". Now I'm in Notepad and
the file is saved in Dos C: prompt as .java but if I save it in
Notepad it changes the file format to .txt.

How do I save it after creating the source code in Notepad?
Steve W. Jackson
2008-10-08 21:01:25 UTC
Permalink
In article
Post by l***@gmail.com
I have an assignment and the textbook has us create code in Notepad.
The file is HelloWorld.java (in the C: prompt)
Anyhow the book states "save the source code". Now I'm in Notepad and
the file is saved in Dos C: prompt as .java but if I save it in
Notepad it changes the file format to .txt.
How do I save it after creating the source code in Notepad?
Aside from an obvious curiosity about why you *must* use the particular
editor your textbook says...

I had no trouble doing it. When I put some code in Notepad and then
chose Save, the resulting dialog let me say where to put it and change
the "type" from txt files to "All Files" so that I could put a .java
extension on it.
--
Steve W. Jackson
Montgomery, Alabama
Real Gagnon
2008-10-08 21:38:07 UTC
Permalink
Post by l***@gmail.com
How do I save it after creating the source code in Notepad?
Use double-quotes around the filename, ex. "HelloWorld.java"

Bye.
--
Real Gagnon from Quebec, Canada
* Java, Javascript, VBScript and PowerBuilder code snippets
* http://www.rgagnon.com/howto.html
* http://www.rgagnon.com/bigindex.html
Roedy Green
2008-10-10 00:24:52 UTC
Permalink
Post by l***@gmail.com
I have an assignment and the textbook has us create code in Notepad.
The file is HelloWorld.java (in the C: prompt)
Anyhow the book states "save the source code". Now I'm in Notepad and
the file is saved in Dos C: prompt as .java but if I save it in
Notepad it changes the file format to .txt.
You can use any text editor or ide.

see http://mindprod.com/jgloss/editor.html
http://mindprod.com/jgloss/ide.html

Just do Save As SomeProg.java

If the fool thing is changing that to some thing else, rename it with

rename SomeProg.java.txt SomeProg.java
--
Roedy Green Canadian Mind Products
http://mindprod.com/politics/harper.html
Anyone but Harper for Prime Minister of Canada
m***@gmail.com
2017-07-28 07:10:56 UTC
Permalink
Post by l***@gmail.com
I have an assignment and the textbook has us create code in Notepad.
The file is HelloWorld.java (in the C: prompt)
Anyhow the book states "save the source code". Now I'm in Notepad and
the file is saved in Dos C: prompt as .java but if I save it in
Notepad it changes the file format to .txt.
How do I save it after creating the source code in Notepad?
Tristan B. Kildaire
2017-10-04 14:12:43 UTC
Permalink
Post by l***@gmail.com
I have an assignment and the textbook has us create code in Notepad.
The file is HelloWorld.java (in the C: prompt)
Anyhow the book states "save the source code". Now I'm in Notepad and
the file is saved in Dos C: prompt as .java but if I save it in
Notepad it changes the file format to .txt.
How do I save it after creating the source code in Notepad?
Do you still need help with this?

Loading...