• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem in loading package classes by AppletViewer

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic