Solved

annoying problem

Posted on 2002-07-01
17
164 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
 

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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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 100 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

707 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now