• Post Reply Bookmark Topic Watch Topic
  • New Topic

applet doesn't get gif in browser from jar  RSS feed

 
rich werth
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there
I'm having an issue with swing applet getting gif from jar file. I have a jar file that contains all classes and gif files needed. I am using plug-in 1.3.1_02. The html and the jar file are in the same dir of the http server. this is the path to the files. I have used the applet converter and this applet works fine without the pics in a browser coming from the http server.
  • /htdocs/swing/index.html
  • htdocs/swing/test.jar

  • in my applet code i access the gif files like this
  • ImageIcon picDie1 = new ImageIcon("/die1.gif");
  • ImageIcon picDie2 = new ImageIcon("/die2.gif");

  • I can make the applet work in applet viewer but I can't get the path right for the applet to get them out of the jar file.
    Can someone show me the code how to access binary files from a class that gets downloaded to a client workStation?
    I don't want to mess with the security file since I do not have access to all of the client machines that will be using this applet.
    Thanks
    [ February 16, 2002: Message edited by: rich werth ]
    [ February 19, 2002: Message edited by: rich werth ]
     
    It is sorta covered in the JavaRanch Style Guide.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!