[4924] in java-interest

home help back first fref pref prev next nref lref last post

Re: The Hello World Example

daemon@ATHENA.MIT.EDU (Fritz N. Francis)
Mon Jan 22 18:23:53 1996

To: bkirby@mnsinc.com (Bill Kirby)
From: fritz@environs.com (Fritz N. Francis)
Cc: java-interest@java.sun.com
Date: Mon, 22 Jan 1996 14:26:38 -0500

Hello Bill,

The Problem with Win95 Notepad is that it adds a .txt extension after you
save your sourcecode. So when you thought you saved it as HelloWorld.java,
you saved it as HelloWorld.java.txt. One option is to go into the MS-DOS
Prompt and type the following:

rename  HelloWorld.java.txt  HelloWorld.java

I personally think that the MS_DOS edit program is better for inputting the
source, rather than 
Wordpad, Notepad, and Microsoft Word.

To get in to this program, Go to the Start Button of Windows 95, go to
Programs, then select MS-DOS. At the prompt type in,

edit <whatever your file is.with its extension>.

Let me know if this helps.

>In article <19960110152124010.AAA128@23079-news.pluto.environs.com>, 
>fritz@environs.com says...
>>
>>Hello,
>>
>>I have been trying the Hello World example given at
>>http://java.sun.com/tutorial/getStarted/applet/index.html. and I am quite
>>confused why it does not work.
>>
>>I typed the following in my MS-DOS edit:
>>
>>import java.awt.Graphics;
>>               public class HelloWorld extends java.applet.Applet {
>>                   public void init() {
>>                       resize(150,25);
>>                   }
>>                   public void paint(Graphics g) {
>>                       g.drawString("Hello world!", 50, 25);
>>                   }
>>               }
>>
>>as instructed from the web page.
>>I then compiled at my DOS prompt by typing:
>>
>>javac HelloWorld.java
>>
>>I received no compile errors. I then typed: " java HelloWorld"  and I
>>received the following error message:
>>
>>In class HelloWorld: void main(String argv[]) is undefined.
>>
>I've had an even more basic problem.  I type the code as above (on Win95 
>NotePad) and type "javac HelloWorld.java" in DOS and get the message"cannot 
>read HelloWorld.java"
>
>I am obviously a non-programmer and am baffled.  Can anyone help?
>
>
-----------------
Fritz N. Francis
Vice-President of Operations
Online Environs, Inc.
38 Sidney Street Suite 350
Cambridge, MA 02139
Tel: (617) 225-0449
Fax: (617) 225-0677
E-mail: fritz@environs.com
URL: http://www.environs.com

-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post