I know nothing about Java at all and I only need to run an applet on browser in localhost.
I only download the .class
file from the following website
http://isgwww.cs.uni-magdeburg.de/tspanner/TSpanner.html
and I need to run this .class
file on my localhost.
I tried every solution given in Java applet Error … What is wrong? but I failed to run it.
This is my HTML code
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<title>Visualization of Spanners - The Applet</title>
</head>
<body alink="#990099" bgcolor="#cccccc" link="#000099" vlink="#000099">
<applet code="gsn.TSpanner" align="BOTTOM" height="480" width="720"></applet>
</body></html>
In the directory where this .html
is placed, I created a folder and renamed it to gsn
and copied TSpanner.class
file in there, after going to the url of the .html
file Java throws the following error
NoClassDefFoundError
gsn/TSpanner (wrond name:TSpanner)
I also tried copying .class
file in the root directory and setting
<applet code="TSpanner.class" align="BOTTOM" height="480" width="720"></applet>
It didn't work again.
Is it possible to run this .class
in localhost? There is no more files (like .jar
) and if yes how?
Thanks.