Solved

annoying problem

Posted on 2002-07-01
17
175 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java 1603 Error 3 50
groupNoAdj 7 86
What is the latest versions eclipse neon 2 139
ArrayIndexOutOfBoundException 9 68
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
The viewer will learn how to implement Singleton Design Pattern in Java.

920 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

12 Experts available now in Live!

Get 1:1 Help Now