This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
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

Without sandboxing?

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am designing a web-based GUI for the client side. I need the applet to access the local hard disk using JFileChooser. Also, I need to integrate CORBA stuff to my applet.

Is it possible to somehow set the java security policy file to allow applet to be able to do these tasks? I am not familar with java security. So could anyone tell me how to set the security file step by step.

Thanks very much.
 
Bartender
Posts: 9615
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is necessary to digitally sign an applet in order to work around the security limitations. The online book "Advanced Programming for the Java 2 Platform" has a chapter on Signed Applets.
 
Lin Shen
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The thing is I want to use a JFileChooser in the applet. But it seems the applet cant even be compiled... :-(

Anybody knows how to solve this problem. Or is there any other way to explore the client's file system?
 
Lin Shen
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I just tried to run the applet code in eclipse. I used to run Java programs in shell windows under Linux. This is the first time I run an applet in eclipse. And it works and can access the local file system. Why is that? Dosen't applets in eclipse have sandbox constraint?

I am rather confused now. Could anybody explain it?
 
Joe Ess
Bartender
Posts: 9615
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can run an applet as a local application. The most common way to do this is through the JDK tool appletviewer. When an applet is run as a local application, it is NOT sandboxed. Eclipse is probably using appletviewer to run your applet.
 
Surfs up space ponies, I'm making gravy without this lumpy, tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic