views:

22

answers:

1

Hi All,

I am working in a Desktop application that provides Online Backup of data. In my application i am trying to implement automatic software update feature. For this i am using java web start. I have done the following process for using java web start.

1> created jar with all resources. 2> created jnlp file as :

      <?xml version="1.0" encoding="UTF-8"?>
     <jnlp spec="1.0+" 
               codebase="http://cmswebusa.com/kapil"
              href="PixelVaultJNLP.jnlp">
                <information>
                        <title>PixelVault</title>
                          <vendor>globussoft</vendor>
                           </information>
                        <resources>
                     <!-- Application Resources -->       
                          <jar href="PixelVault.jar" main="true" />

                     </resources>
                   <application-desc
                   name="PixelVault"
                   main-class="com.pixelvault.systemtray.SysTray">
                   </application-desc>
                   <update check="background"/>
                </jnlp>

where PixelVault.jar is jar of the application which is on http server location.

while i am trying to download my application using command prompt run option by typing : javaws , i am getting AWT Permission Exception as:

java.security.AccessControlException: access denied "java.awt.AWTPermission"

it says "java.awt.AWTPermissionException""accessSystemTray". I am not getting how can i allow my application to use system tray.

Please guide to make changes in jnlp file or making any other change in my application.

I thanks to your all valuable suggestions that will help me to solve this problem.

+2  A: 

To get rid of that error:

  • The JNLP will need to declare all-permissions within a security element.
  • The code will need to be digitally signed.

Note that the JNLP file has elements out of the correct order. Use JaNeLA to check the validity of the file as well as other aspects of the launch.

Andrew Thompson
Thanks for answering my question but i am having another problem with digital signature. i am following the process maintioned by http://wiki.plexinfo.net/index.php?title=How_to_sign_JAR_files and in the step 5> sign the JAR file with the test certificate i am getting error jarsigner: unable to open jar file: http://cmswebusa.com/kapil/PixelVault.jar. Is there any way to check what can be the reason for this error. Please guide me for this.
Toman
The message suggests that you are attempting to sign a Jar file that is already on the net. To be successful, the Jar must be on the local file system. Sign it there, then upload it.
Andrew Thompson
Thanks for your suggestions. Now it's working fine for me.
Toman