File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes AccessControlException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "AccessControlException " Watch "AccessControlException " New topic
Author

AccessControlException

Maya Naga
Ranch Hand

Joined: Nov 09, 2009
Posts: 79
hi ranches..

i created a new program to display files using jtree and jtable..
i have jdialog to select the directory or folder using jlabel...
when i run through netbeans no problem..
but when i try to start glassfish server and run it using webstart am getting the below exception :

Error:access denied (java.util.PropertyPermission java.home read)
Error:[Ljava.lang.StackTraceElement;@12c9557

and when i try to click on jlabel to select a new directory am getting :

Exception in thread "AWT-EventQueue-0" java.security.AccessControlException: access denied (java.util.PropertyPermission user.home read)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
at java.security.AccessController.checkPermission(AccessController.java:427)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285)
at java.lang.System.getProperty(System.java:628)
at javax.swing.filechooser.FileSystemView.getHomeDirectory(FileSystemView.java:369)
at javax.swing.plaf.metal.MetalFileChooserUI.installComponents(MetalFileChooserUI.java:260)
at javax.swing.plaf.basic.BasicFileChooserUI.installUI(BasicFileChooserUI.java:136)
at javax.swing.plaf.metal.MetalFileChooserUI.installUI(MetalFileChooserUI.java:139)
at javax.swing.JComponent.setUI(JComponent.java:653)
at javax.swing.JFileChooser.updateUI(JFileChooser.java:1757)
at javax.swing.JFileChooser.setup(JFileChooser.java:366)
at javax.swing.JFileChooser.<init>(JFileChooser.java:332)
at javax.swing.JFileChooser.<init>(JFileChooser.java:285)
at compression.dicomCompression.ChooseDirMouseClicked(dicomCompression.java:472)
at compression.dicomCompression.access$000(dicomCompression.java:17)
at compression.dicomCompression$1.mouseClicked(dicomCompression.java:115)
at java.awt.Component.processMouseEvent(Component.java:5520)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
at java.awt.Component.processEvent(Component.java:5282)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3984)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3819)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3901)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1791)
at java.awt.Component.dispatchEvent(Component.java:3819)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)




Below are the lines of codes where it traces the error for above exception:


can anyone suggest me what mistake am i doing?
why am getting these sorts of error?
thanks
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10246
    
    8

but when i try to start glassfish server and run it using webstart am getting the below exception :

So you have bundled your application in a jar file. Have you signed it?

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Maya Naga
Ranch Hand

Joined: Nov 09, 2009
Posts: 79
am new to glassfish..
so how to check whether it have been bundled or not?

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10246
    
    8

If you are trying to launch it using JWS, you should see a JNLP file which in turn should refer to a jar file which will be the bundled application.
Maya Naga
Ranch Hand

Joined: Nov 09, 2009
Posts: 79
this s my jnlp file....


Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10246
    
    8

What am I supposed to do with the contents of your jnlp file?
Maya Naga
Ranch Hand

Joined: Nov 09, 2009
Posts: 79
sorry i didnot mention anything..
actually it contains the necessary jar file..
but still am getting the same problem
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10246
    
    8

In my very first reply I asked you if you had signed the jar.
Are you going to share this information or is it top secret?
Maya Naga
Ranch Hand

Joined: Nov 09, 2009
Posts: 79
Sorry Maneesh,

The problem is first i don know how to check whether jar file is signed or not..
just now i cleared it and its all going fine..
thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AccessControlException