[5651] in java-interest

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

Re: Basic hello world program -fails

daemon@ATHENA.MIT.EDU (df@cen.com)
Wed Feb 21 11:13:48 1996

From: df@cen.com
Date: Wed, 21 Feb 96 09:31:59 EST
To: Erik Sanchez <sancheze@rintintin.colorado.edu>
Cc: java-interest-digest@java.sun.com
In-Reply-To: <312A7A53.740B@rintintin.colorado.edu>
Reply-To: dfout@cen.com

>>>>> "Erik" == Erik Sanchez <sancheze@rintintin.colorado.edu> writes:

  Erik> < I recently bought the book "Teach yourself Java in 21 days", and
  Erik> am < experiencing a problem immediately at the beginning of the
  Erik> book. The basic < "Hello World" program compiles fine, but when I
  Erik> try to execute it with < "java HelloWorld", I get an error that says
  Erik> "can't find class/HelloWorld < class". What gives?

  Erik> Charles, I just bought the same book today and after working through
  Erik> the first "day," I thought about your question.  First of all, put
  Erik> the HelloWorld in quotes. Like this: java "HelloWorld" Since the
  Erik> class name is more than 8 characters some dos apps have a hard time
  Erik> with it.  Secondly, don't include the .class extension or else
  Erik> you'll get the same error message.  One more thing, I can't get the
  Erik> HelloWorldApplet to work (mine or the supplied code).  It compiles
  Erik> but won't display on netscape or the appletviewer. I can however get
  Erik> the second day app to work etc.. go figure?

  Erik> I hope this is timely enough to help a fellow java novice. Also,
  Erik> this is my first "reply" so if I'm doing something wrong someone
  Erik> PLEASE tell me.

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

Blush.  I did not have a </applet> tag after the <applet>.  I added it and
now everything works great.  I hope this can help some Java newbies.  It
seemes like an easy mistake.

----------------------------------------------------------------------
<> David G. Fout                        Phone:	(301) 953-3330 	    <> 
<> Century Computing			Phone:  (410) 792-4634      <>
<> 8101 Sandy Spring Road		Fax:  	(301) 953-2368 	    <>
<> Suite 200				Email: 	dfout@cen.com       <>
<> Laurel, MD 20707			URL:	http://www.cen.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