Solved

annoying problem

Posted on 2002-07-01
17
208 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 

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

Industry Leaders: 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

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…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

691 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