Results 1 to 3 of 3
  1. #1
    diamonddragon is offline Senior Member
    Join Date
    Jan 2012
    Posts
    210
    Rep Power
    3

    Default Applet can not see jar file

    I have run time classpath variable set to point on specific jar file, that holds necessary class for my applet.
    But, applet can not see jar file, so can not access class insade that jar.

    I'v tryed to unpack jar and put its context where classpath variable points, and in that case, applet is accessing that class.
    But, that's not the solution, just something in between.

    To be more specific, an applet is accessing class inside jar through this statement:

    Java Code:
    Class.forName(classX).newInstance();
    where classX is class inside jar, specified by run time classpath variable.

    Any idea how to solve this problem?

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,589
    Rep Power
    23

    Default Re: Applet can not see jar file

    I don't think an applet running in a browser will see or use the PC's classpath.
    You need to use the <APPLET tag's attributes to point to the jar file. Maybe the archive= ??

  3. #3
    diamonddragon is offline Senior Member
    Join Date
    Jan 2012
    Posts
    210
    Rep Power
    3

    Default Re: Applet can not see jar file

    Quote Originally Posted by Norm View Post
    I don't think an applet running in a browser will see or use the PC's classpath.
    You need to use the <APPLET tag's attributes to point to the jar file. Maybe the archive= ??
    Yes, that's true.

Similar Threads

  1. Generate Applet from XML file
    By parag_patil in forum Java Applets
    Replies: 11
    Last Post: 03-08-2011, 03:31 PM
  2. Applet: Can't write a file
    By DaanDwars in forum Eclipse
    Replies: 6
    Last Post: 09-03-2009, 01:26 PM
  3. how to run jar file into applet
    By rakesh_n_mehta in forum Java Applets
    Replies: 4
    Last Post: 02-20-2009, 01:27 PM
  4. Applet and remote file
    By Preethi in forum Java Applets
    Replies: 0
    Last Post: 06-03-2008, 05:54 AM
  5. Applet File Upload
    By genette in forum Java Applets
    Replies: 2
    Last Post: 03-09-2008, 02:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •