?
Solved

annoying problem

Posted on 2002-07-01
17
Medium Priority
?
211 Views
Last Modified: 2011-09-20
im new to java, and i just uploaded my applet to my IIS webserver.

i have an html file with the following code:

<applet
  codebase = "."
  code     = "heartscan.HeartScan.class"
  name     = "TestApplet"
  width    = "453"
  height   = "252"
  hspace   = "0"
  vspace   = "0"
  align    = "middle"
>
</applet>

and then i have a subdirectory called "heartscan" with all my class files in it.

when i visit the heartscan.html file on the web, on the machine i developed the applet on, everything shows up correctly.  However, when anyone else goes to that page they get a "class cannot be found" error or just a grey box.

what is going on??

thanks.
0
Comment
Question by:xorcrack
  • 7
  • 4
  • 3
  • +3
17 Comments
 
LVL 2

Expert Comment

by:nir2002
ID: 7123903
Hi,

It seem to be as http server configuration problem.
try that the directory heartscan will be define as
server "root" diectory (or will be at that directory)

Best regards
Nir
0
 
LVL 9

Expert Comment

by:Venci75
ID: 7123936
try this:
code     = "heartscan/HeartScan.class"
0
 
LVL 92

Expert Comment

by:objects
ID: 7124137
Which class is not found?
Is the applet visible on the web to have a look at?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Expert Comment

by:ucero007
ID: 7124670
I think that the codebase 'parameter' in the applet tag should be set to the directory where the classes are in.

You could try:
codebase = "heartscan/"
0
 
LVL 1

Author Comment

by:xorcrack
ID: 7124792
the applet's path is:

http://medlink.airstreamws.com/HeartScan.html

i have already tried changing the codebase parameter.
0
 
LVL 2

Expert Comment

by:xxMariusxx
ID: 7124849
Applet starts fine for me...I just get a SQLException when it tries to connect to its database.  Probably my security settings though...I'm behind the firewall from hell:-)
0
 
LVL 9

Expert Comment

by:Venci75
ID: 7124902
that is what I got in the java console:
java.lang.ClassNotFoundException: javax.swing.JApplet

Are trying to use Swing without having it installed?
0
 
LVL 1

Author Comment

by:xorcrack
ID: 7125154
where do i have to do to install swing?

again, im new to java programming. i assumed whatever basic libraries i imported would be included automatically.

this could be the problem.
0
 
LVL 92

Expert Comment

by:objects
ID: 7125463
Looks like it's possibly a Java2 applet.
In which case users will need the plugin from Sun installed to run it.
Converting your HTML using the htmlconverter to use the OBJECT tag instead of the APPLET tag will also be required for some browsers.
0
 
LVL 1

Author Comment

by:xorcrack
ID: 7125483
what would my <applet> tag code look like in the form of an <object> tag?

also, i built applet in jbuilder 6, is there a way to tell it not to use java 2?
 
0
 
LVL 92

Accepted Solution

by:
objects earned 400 total points
ID: 7125503
SOmething like this:

<OBJECT
classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH = "453" HEIGHT = "252" NAME = "TestApplet" VSPACE = "0" HSPACE = "0"
codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4-win.cab#Version=1,4,0,0">
<PARAM NAME = CODE VALUE = "heartscan.HeartScan.class" >
<PARAM NAME = CODEBASE VALUE = "." >
<PARAM NAME = NAME VALUE = "TestApplet" >
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">
<COMMENT>
<EMBED
type="application/x-java-applet;version=1.4"
CODE = "heartscan.HeartScan.class"
CODEBASE = "."
NAME = "TestApplet"
WIDTH = "453"
HEIGHT = "252"
VSPACE = "0"
HSPACE = "0"
pluginspage="http://java.sun.com/products/plugin/index.html#download">
<NOEMBED>

</NOEMBED>
</EMBED>
</COMMENT>
</OBJECT>
0
 
LVL 92

Expert Comment

by:objects
ID: 7125508
0
 
LVL 92

Expert Comment

by:objects
ID: 7125513
> i built applet in jbuilder 6,
> is there a way to tell it not to use java 2?

Not sure, but I doubt it.
And it's more of a case of you not using Java 2 capabilities in your development. The default VM in most browsers only supports Java 1.

0
 
LVL 9

Expert Comment

by:Venci75
ID: 7126314
... or if you need only swing, you can find a swing installation at:
http://java.sun.com/products/jfc/download.archive.html#install
0
 
LVL 92

Expert Comment

by:objects
ID: 7126322
> ... or if you need only swing,
> you can find a swing installation at:

Would make it a pretty fat applet :)
0
 
LVL 1

Author Comment

by:xorcrack
ID: 7128124
it was the fact that people needed the Java 2 plugin...thanks!
0
 
LVL 92

Expert Comment

by:objects
ID: 7128264
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month16 days, 4 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question