• 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

File Access problem...

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've created an applet which needs to read a jar file from the server. Nothing I try is working, I keep getting SecurityExceptions. I don't understand why... all I'm trying to do is read a file on the server. Here's the code I'm using:
jarfile = new JarFile( jarfilepath );
jarfilepath is a String that contains the path to the JarFile on the server. I've tried using URI's and URL's to see if that would work, but with those I get many, many more errors.
Please help, this is my first attempt at creating an Applet.
Jeff
 
Jeff SmithX
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I figured out that I needed to use a JarURLConnection to load the file and so I got it working.
Jeff
[ April 06, 2002: Message edited by: Jeff Smith ]
 
Slideshow boring ... losing consciousness ... just gonna take a quick nap on this tiny ad ...
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic