File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Applets and the fly likes create a singed applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Applets
Bookmark "create a singed applet" Watch "create a singed applet" New topic
Author

create a singed applet

Michaela Fricker
Greenhorn

Joined: Oct 28, 2002
Posts: 16
I've got a problem. I've to write an applet for our intranet. I created an own certificate with keytool, added my applet to a jar file and singed this jar file with my certificate. Then I wrote my own policy file and added
policy.url.3=file:///C:/<file directory>/applets.policy to java.security.
But even now my IE6 doesn't open the JFileCHooser.
In the AppletViewer it does. (But it did even before I signed my applet.)
Everytime I press the "Load File" button the Java Console tells me this:
java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at java.io.Win32FileSystem.getUserPath(Unknown Source)
at java.io.Win32FileSystem.resolve(Unknown Source)
at java.io.File.getAbsolutePath(Unknown Source)
at sun.awt.shell.Win32ShellFolder.equals(Unknown Source)
at sun.awt.shell.Win32ShellFolderManager.get(Unknown Source)
at sun.awt.shell.ShellFolder.get(Unknown Source)
at javax.swing.plaf.metal.MetalFileChooserUI.installComponents(Unknown Source)
at javax.swing.plaf.basic.BasicFileChooserUI.installUI(Unknown Source)
at javax.swing.plaf.metal.MetalFileChooserUI.installUI(Unknown Source)
at javax.swing.JComponent.setUI(Unknown Source)
at javax.swing.JFileChooser.updateUI(Unknown Source)
at javax.swing.JFileChooser.setup(Unknown Source)
at javax.swing.JFileChooser.<init>(Unknown Source)
at javax.swing.JFileChooser.<init>(Unknown Source)
at extractprogram.ExtractProgramInput.jButton1_actionPerformed(ExtractProgramInput.java:287)
at extractprogram.ExtractProgramInput$1.actionPerformed(ExtractProgramInput.java:166)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

Can anybody help me???
[ October 28, 2002: Message edited by: Michaela Fricker ]
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
hmmmm . . . Applets? - Security? - Applets? - Security? . . .

Lets move this to Applets.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Are you already familiar with what The Security in Java 2 SDK 1.2 Trail of Sun's Java Tutorial has to say (especially the Quick Tour of Controlling Applets part)?


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Philip Ingvaldsson
Greenhorn

Joined: Nov 03, 2002
Posts: 6
I have exactly the same problem and I have gone through all the guides available!!! Should I ask for the permissions through the applet too or what? I get a message if I want to install the certificate and I do so, but the problem is still there. I can't get read permissions on a file.Can someone who knows make a template about how to sign an applet and what steps to take after that cause the guides on suns site are not that helpfull?
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
I haven't yet read it, but the article "Java security evolution and concepts, Part 3: Applet security" at JavaWorld looks promising.
 
GeeCON Prague 2014
 
subject: create a singed applet