> I tried a simple tutorial and it won't work :(
> I am new to java and just installed: j2sdk1.4.2_05. This looks ok to me
[quoted text clipped - 7 lines]
> /**
> * The HelloWorldApp class implements an application that
Notice how you said 'applet not initialized' when it
is an *application*. Applet viewer was not designed
to run applications. You need to start them from the
command line, or a batch file (or other things that
are not AppletViewer)...
..
> java console:
> load: Hello.class is not public or has no public constructor.
..
> class Hello extends Applet {
public class Hello extends Applet {
HTH

Signature
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Mark - 29 Aug 2004 22:51 GMT
>><this is the tut>
>>/**
[quoted text clipped - 8 lines]
>
>..
? I am not sure what you mean. I make a .htm file with the applet and
then run appletviewer from the commandline. Is this not ok?
Get the same results (more or less) if i open the .htm file in a browser.
>
>
[quoted text clipped - 12 lines]
>HTH
>
Does not work. This gives the compiler: class Hello3 is public, should
be declared in a file named Hello3.java
What goes wrong? I run IIS also for .asp pages; does this conflict?
Thanks,
Mark
Paul Lutus - 29 Aug 2004 23:39 GMT
>>><this is the tut>
>>>/**
[quoted text clipped - 34 lines]
>
> What goes wrong?
The error message tells you exactly what the problem is. Your class "Hello3"
must be in a file named "Hello3.java".

Signature
Paul Lutus
http://www.arachnoid.com
Mark - 30 Aug 2004 16:26 GMT
><snip>
>
[quoted text clipped - 14 lines]
>
:0) all was good... almost.
It should all be case censitive files!
So, now i have a file: Hello3.java, containing:
<code>
import java.applet.*;
import java.awt.*;
public class Hello3 extends Applet {
public void paint(Graphics g) {
g.drawString("Hello, Web!", 10, 10);
}
}
</code>
and now i have a files: Hello3.class
This works fine (the .htm doesn't mind the H or h).
Anyway, my first java works now.
Thanks!
Mark
Paul Lutus - 30 Aug 2004 16:54 GMT
>><snip>
>>
[quoted text clipped - 15 lines]
> :0) all was good... almost.
> It should all be case censitive files!
Yes, just as in my example above. Java, and all civilized operating systems,
are case-sensitive. Windows is neither civilized nor is it case-sensitive.
> So, now i have a file: Hello3.java, containing:
>
[quoted text clipped - 12 lines]
>
> This works fine (the .htm doesn't mind the H or h).
Yes, but only on Windows. When you upload your HTML pages to the Web, where
there are civilized operating systems, if you had been locally ignoring the
case of your file names, once uploaded your site will suddenly and
inexplicably stop working.
Please remember this. It is the single most common problem for people who
develop Web content using Windows.

Signature
Paul Lutus
http://www.arachnoid.com