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

Unable to Save Java in Notepad

2,211 views
Skip to first unread message

Clifton McEnnis

unread,
Jan 8, 2001, 6:55:03 AM1/8/01
to
Please help.

I wrote an application in notepad and tried saving in HelloWorldApp.java, in
c:\java folder but it saves in HelloWorldApp.java.text. It keeps saving as.
text, I can't seem to save in java. When I first saved this source it worked
ok, but then I deleted to make changes to the source and tried saving I have
problems. I also notice when I try to get into Word, Excel, Access I cannot
open, I get "Not enough memory or disk space unable to open".

I am using jdk1.2.2, downloaded to C:\jdk1.2.2 do you think there is a bug.

path set to C:\PROGRAM""1\OFFICE;%PATH%;C:\jdk1.2.2\BIN\
SET CLASSPATH= C:\PROGRAM""1\APPLETS\C:\jdk1.2.2\bin\

Is this correct.

Clifton


Chris Smith

unread,
Jan 8, 2001, 7:28:12 AM1/8/01
to
Clifton McEnnis <cli...@mcennis.freeserve.co.uk> wrote ...

> I wrote an application in notepad and tried saving in HelloWorldApp.java,
in
> c:\java folder but it saves in HelloWorldApp.java.text. It keeps saving
as.
> text, I can't seem to save in java. When I first saved this source it
worked
> ok, but then I deleted to make changes to the source and tried saving I
have
> problems.

There are two ways to stop Notepad from doing that.

1. Turn off the "Hide File Extensions for Known Types" option from the
"View -> Folder Options" screen.
2. Put the filename in quotes when you save

> I also notice when I try to get into Word, Excel, Access I cannot
> open, I get "Not enough memory or disk space unable to open".

That's an entirely different matter, and probably fixable with a reboot.

Chris Smith

steveh...@my-deja.com

unread,
Jan 8, 2001, 7:58:52 AM1/8/01
to
In article <93cada$6m7$3...@newsg2.svr.pol.co.uk>,

Rename the file after saving it.

You can stop notepad putting a gratuitous .txt at the end by putting
double quotes round the file name in the Save As dialog box.

It will help you a lot if you can get an editor that does syntax
highlighting. You cluld look at jedit
(http://www.git.org/~sp/jedit.html)
but there are loads of others worth a look too.

I don't know about your memory problems, though.

Steve.


Sent via Deja.com
http://www.deja.com/

Jung Rak Kim

unread,
Jan 8, 2001, 8:41:33 AM1/8/01
to
I had the same problem before.

You'd better try to use the quotation mark,

for instance, "HelloWorldApp.java"


Weel

unread,
Jan 8, 2001, 9:48:25 AM1/8/01
to
I suggest you use edit.com
It should be in your c:\windows\command folder
1. It accepts big files (notepad doesn't)
2. It accepts UNIX or Macintosh files (notepad doesn't do this
properly)
3. It doesn't have the .txt problem
4. It keeps your indentation. This mean that if you indent a piece of
code, and press <enter>, the rest will stay indented.

Jaap Weel

Daniel J. Woods

unread,
Jan 8, 2001, 10:24:39 AM1/8/01
to
Clifton McEnnis wrote:

> Please help.
>
> I wrote an application in notepad and tried saving in HelloWorldApp.java, in
> c:\java folder but it saves in HelloWorldApp.java.text.

This would be because .java isn't a recognized filetype on your machine.

In order to prevent the saving with the .txt extension in notepad, you need to
add the type to your system:

* From explorer, select View -> Options.
* Select the File Types tab, then New Type. The description doesn't matter,
although 'Java Source File' would be sensible. Extension is .java, and content
type is text/plain.

You can then specify actions that are to be available under right-clicking (and
the
default one that comes into play when you double-click). Personally, I prefer to
use Xemacs for editing, but I have an 'Open with Notepad' option for speed. You
probably want to have some kind of icon as well (a lot of executables have some
icon that you might want to use).

In the 'New Action' dialog, type the name you want to appear, then browse for
Notepad. Then hit ok to get rid of everything.

PS. I've assumed here that you're running Windows 95, 98 or NT. As far as I
know, Windows Millennium has something slightly different, and I've no idea what
2000's got.

--
Danny Woods
Software Engineer
BT CDMC Data Quality
-- Unless otherwise stated, what's in this mail is purely my opinion,
-- not that of BT.


Gary Labowitz

unread,
Jan 9, 2001, 3:44:09 PM1/9/01
to
Notepad defaults to text. In the Save as type combobox select All Files.
Then type the name and extension of the file you want to save:
"Yourclass.java" and it will save it with that name.
Gary
"Clifton McEnnis" <cli...@mcennis.freeserve.co.uk> wrote in message
news:93cada$6m7$3...@newsg2.svr.pol.co.uk...
0 new messages