Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code 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
  • 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

can an applet make a network connection to the host computer

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
can an applet make a network conectin to the host computer.iam using JRE1.3 in my applet.my applet reads a file in the host computer.but iam getting
an erro which looks like
eror:java.security.AccessControlException:AccessDenied(java.io.FilePermission/hostcomputer/applicationfolder/*.dat)
iam unable to read the file from the host computer.
anyone please help.this is very urgent.
thanks and regards,
ravikumar
 
Saloon Keeper
Posts: 22104
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You didn't say how you were getting the data, so I'm assuming that you are attempting to open the file from a LAN server rather than download it from an HTTP server.
Not only can you not do this, you also can't open a file local to your own computer -- the "sandbox" rules forbid this. To do so, you must digitally sign the applet.
Alternatively, if the file in question is accessible from the HTTP server from which you downloaded the applet, you can use an HttpURLConnection to cause the HTTP server to pass you a copy of the data. If you wish to update it, you also have to write server-side code to accept the updated data (via a HttpURLConnection POST request) and do the writing.
 
This looks like a job for .... legal tender! It says so right in this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic