Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I save a .java file in Notepad?

2,461 views
Skip to first unread message

liann...@gmail.com

unread,
Oct 8, 2008, 4:01:56 PM10/8/08
to
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

unread,
Oct 8, 2008, 5:01:25 PM10/8/08
to
In article
<0e8f653e-42c5-4d7c...@a29g2000pra.googlegroups.com>,
liann...@gmail.com wrote:

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

unread,
Oct 8, 2008, 5:38:07 PM10/8/08
to
> 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

unread,
Oct 9, 2008, 8:24:52 PM10/9/08
to
On Wed, 8 Oct 2008 13:01:56 -0700 (PDT), liann...@gmail.com wrote,
quoted or indirectly quoted someone who said :

>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

mamta.p...@gmail.com

unread,
Jul 28, 2017, 3:11:01 AM7/28/17
to

Tristan B. Kildaire

unread,
Oct 4, 2017, 10:12:46 AM10/4/17
to
Do you still need help with this?
0 new messages