URL: http://www.softwarespecialties.com/cgi-bin/rpgforum/dcboard.cgi
Forum: DCForumID2
Thread Number: 167
[ Go back to previous page ]

Original Message
"Question for the Java folks"

Posted by Llevram on Oct-27-02 at 08:23 AM
What all do I need to set up on a website (say mine) to be able to run an applet, like I do on my PC? I know on the pc, I have to set up class paths and that stuff.

If I just put my .html file (that runs the applet) and the stand alone class on my web site and thry and run it, it give me an error: java.lang.NoClassDefFoundError: javax/swing/JApplet

Do I need to load up my web site with JAR files? If so, which ones? I wouldn't have thought so, I thought it should look to the local PC for those ...

Tools for Wizardry(r) 7


Table of contents

Messages in this discussion
"Walking before I crawl ... :)"
Posted by Llevram on Oct-27-02 at 08:47 AM
OK, so maybe I should get the applet to work in a web page on my PC first.

It works in appletviewer, but running the .html file in my browser on my PC, same error. What am I missing?

Tools for Wizardry(r) 7


"RE: Walking before I crawl ... :)"
Posted by Dragon2k on Oct-27-02 at 09:29 PM
Probably just the embed SRC tag. I've had trouble with using it, to edit web pages on my computer, but when uploaded, it works fine.
Weird how IE ignores the /sounds/kk.mid thing. doesn't seem to like web folders on your local hard drive.
You are only as brave as the challenges you take on

"So, do you have a working example?"
Posted by Llevram on Oct-28-02 at 08:25 AM
I would just like to see the HTML needed to take a simple "hello world" applet, put them both on my web site and have it work ... I thought this should be easy ....

Do I need more, like a webserver (Apache, Tomcat, etc.) running and serving a particular directory (i.e. localhost on my PC for testing)?

Thansk for any insight you can provide.

Tools for Wizardry(r) 7


"Thou Art A Brave Man"
Posted by Lady_Adrexia on Oct-28-02 at 06:45 PM
Yes you are...and if you figure it out...could you teach me.

*GRIN*

I would really like to stick a applet on my webspace...



"Hey, Hey ... this is a family site"
Posted by Llevram on Oct-28-02 at 07:41 PM
Watch that talk of where you want your applets stuck

I know it can be done, but am starting to suspect it should maybe be a servlet, in lieu of an applet, since it is going on a server ... ?

Tools for Wizardry(r) 7


"wish I could"
Posted by Dragon2k on Oct-28-02 at 10:39 PM
but I only tried standard HTML, with images and sounds. I have no idea of Java or Javascript programming. I'm learning HTML first, the hard way.

"Success"
Posted by Llevram on Oct-30-02 at 09:59 PM
LAST EDITED ON Oct-30-02 AT 10:03 PM (Pacific)

(Though a bit underwhelming)

The problem was I was trying to do abit too much (extending from JApplet which required javax, instead of Applet). but really, hardly anybody is doing anything with applets any more, it is more JSP and Servlets.

Though clicking on this link (to display the awesome "Hello World" application) locks things up ... why was it I wanted to do this in the first place

http://www.softwarespecialties.com/SimpleApplet.html

Tools for Wizardry(r) 7


"cool"
Posted by Dragon2k on Oct-30-02 at 10:08 PM
looks good. neat.
and, when did you change the main site? I've got these forums bookmarked, so I don't usually see the main site.
I like the new look, makes me hungry.

"Hardly cool"
Posted by Llevram on Oct-30-02 at 10:12 PM
LAST EDITED ON Oct-30-02 AT 10:15 PM (Pacific)

.... but I did it. Glad that is behind me

As for the new look (http://www.softwarespecialties.com), I worked on it for a while (dragging my feet for six months or a year, on what was really about 4-5 days or real work) and finally put it in place a several (5?) months ago.

Tools for Wizardry(r) 7


"Weird lock up"
Posted by Llevram on Oct-30-02 at 11:43 PM
Since it only occurs in Netscape ... here I am, one of the last Netscape users (inadvertantly) writing Netscape-hostile code

Tools for Wizardry(r) 7


"That's alright"
Posted by Dragon2k on Oct-31-02 at 02:57 AM
Netscape itself is not a completely Standards-compliant browser, so it does have issues with standard HTML coding. some pages look different or Netscape will produce a false error about what it deems unfit for use.
Netscape 4.0 is considered better than the newer versions.
MoZilla and Opera are both better than Netscape's latest versions (6.0?)
and, as strange as it may seem, Internet Explorer is the most standards-compliant browser there is, mostly due to the fact almost everyone uses it.
I wouldn't worry too much about it not working in Netscape. there aren't a whole lot of people using it anymore.
Should anyone with other alternative browsers have problems with the applet, post here.

"*raises hands* Netscape user here"
Posted by Lady_Adrexia on Oct-31-02 at 08:00 PM
I use Netscape for my browser...all three versions. I prefer it for making webpages and stuff like that. But don't feel bad...I am a die hard, last of the good browser, Netscape user.

Ta Da!!



"Or there are the easier ways"
Posted by Llevram on Nov-02-02 at 07:36 AM
(aside from straight HTML)

Like Javascript ... which took me minutes (to search the web, download examples, test and implement) as opposed to days of frustration with the Java Applet/Class method.

Embedded Javascript: http://www.softwarespecialties.com/HelloWorldembed_js.html

JavaScript called in another file: http://www.softwarespecialties.com/HelloWorldjs.html

Like I said before, part of my problem was using the wrong tool for the job, but it was really just an exercise to see it could be done (or what had to be done to make it work).

Tools for Wizardry(r) 7