• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

AccessControlException

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?
 
Maya Naga
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
am new to glassfish..
so how to check whether it have been bundled or not?

 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
this s my jnlp file....


 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What am I supposed to do with the contents of your jnlp file?
 
Maya Naga
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry i didnot mention anything..
actually it contains the necessary jar file..
but still am getting the same problem
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
reply
    Bookmark Topic Watch Topic
  • New Topic