• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in loading package classes by AppletViewer

 
sudhakar Rao
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
I have created a package with a applet class(directedGraph.class) in it. I have set classpath properly. I have created another class(DijkstraAlgo.java)
which inherits (extends) the directedGraph class in some other directory.
When I compiled the DijkstraAlgo.java file, it has compiled without any errors.
But when I run it using appletviewer or IE, it is giving error that directedGraph.class is not found. It is not loading the package.
Can u suggest me the solution to solve this problem.
-Sudhakar
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi sudhakar,
Your HTML code must point to the required classes. If you have more than one class in different locations you would be better off placing them all into one jar file and pointing your HTML code to the jar file with the ARCHIVE tag.
Regards,
Manfred.
 
sudhakar Rao
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have tried by keeping archive also. But it is not loading the package.
<APPLET CODE="DijkstraAlgo.class" ARCHIVE="C:\pack\directedGraphs.jar" WIDTH="600" HEIGHT="600"> </APPLET>
C:\pack\directedGraphs.jar is my package and my class is DijkstraAlgo.class.
It is not loading even then.
 
sudhakar Rao
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want the Package directory at some location, not to copy it to the present directory. I want to use it like a library.
I want HTML code to point to that directory where package is there or check in CLASSPATH.
Can u help me in this.
-Sudhakar
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sudhakar,
I think the ARCHIVE tag is relative. The "C:" reference would only work on PC so I am certain that it is not supported by the APPLET tag.
You should try to specify the path as relative to where you are at with the HTML file itself. It may be a full URL though ...
Regards,
Manfred.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic