Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

applet doesn't get gif in browser from jar

 
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 ]
     
    Consider Paul's rocket mass heater.
      Bookmark Topic Watch Topic
    • New Topic