Results 1 to 9 of 9
  1. #1
    Agri is offline Member
    Join Date
    Sep 2008
    Posts
    7
    Rep Power
    0

    Arrow Signing Java Applet

    Hello,

    I have made an applet that works fine in Netbeans IDE but when I embed it in a webpage it does not work and gives an Access Denined because it is trying to do an action that is only allowed if an applet is signed.

    How do I sign it? and do i need to then embed the .jar or .class?

    Thanks,

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,271
    Rep Power
    25

    Default

    There is an example on the forum for signing jar files. Use a search for it.

    What are you trying to do that requires Permission?

  3. #3
    Agri is offline Member
    Join Date
    Sep 2008
    Posts
    7
    Rep Power
    0

    Default

    I will have a look,I am trying to download and write a file.

  4. #4
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    in Command propmt:

    Java Code:
    keytool -genkey -keyalg rsa -keysize 1024 -alias <your key> -validity 365 -keystore key.keystore
    
    
    jarsigner *.jar <yourkey>

  5. #5
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,271
    Rep Power
    25

    Default

    trying to download and write a file
    There should be no problem with the applet reading a file from its server.
    Writing a file to the local system's disk will require permission.
    Can you do the download to disk with HTML via the browser?
    What capabilities do you have on the server? Servlets? or cgi?

  6. #6
    Agri is offline Member
    Join Date
    Sep 2008
    Posts
    7
    Rep Power
    0

    Default

    It needs to download a file from the server where the webpage with the embeded applet to the client computer who is visiting the webpage.

    I get this error when using the prompts posted by serjant -

    Java Code:
    C:\Program Files\Java\jdk1.6.0_07\bin>jarsigner JavaLibrary2.jar key
    Enter Passphrase for keystore:
    jarsigner: Certificate chain not found for: key.  key must reference a valid Key
    Store key entry containing a private key and corresponding public key certificat
    e chain.
    I entered key for <yourkey> alias.

    Please help,

    Thanks,

  7. #7
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    Can you show all the steps you have done?

  8. #8
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    Watch the steps:
    1.
    Java Code:
    keytool  -genkey -keyalg rsa -keysize 1024 -alias 12345 -validity 365 -keystore myKey.keystore
    Enter keystore password:
    type here for example password: iloveyou
    Java Code:
    Re-enter new password: 
    What is your first and last name?
      [Unknown]:  David Baum
    What is the name of your organizational unit?
      [Unknown]:  E-Banking
    What is the name of your organization?
      [Unknown]:  Bank Discount
    What is the name of your City or Locality?
      [Unknown]:  Bat-Yam
    What is the name of your State or Province?
      [Unknown]:  Tel-Aviv
    What is the two-letter country code for this unit?
      [Unknown]:  IL
    Is CN=David Baum, OU=E-Banking, O=Bank Discount, L=Bat-Yam, ST=Tel-Aviv, C=IL correct?
      [no]:  y
    Here type a password another one ,for instance :123456
    Java Code:
    Enter key password for <12345>
            (RETURN if same as keystore password):  
    Re-enter new password:

    Type here the password which you defined for the myKey.keystore file: iloveyou
    2.
    Java Code:
    jarsigner -keystore myKey.keystore  Sampad.jar 12345
    
    Enter Passphrase for keystore:
    Then type the password : 123456
    Java Code:
    Enter key password for 12345:
    And "Voila" you have it.

  9. #9
    Agri is offline Member
    Join Date
    Sep 2008
    Posts
    7
    Rep Power
    0

Similar Threads

  1. Replies: 3
    Last Post: 07-23-2008, 08:07 AM
  2. applet and signing
    By Preethi in forum New To Java
    Replies: 0
    Last Post: 06-05-2008, 03:17 PM
  3. signing applets for a period of time
    By sandeepk84@gmail.com in forum Java Applets
    Replies: 0
    Last Post: 12-04-2007, 01:34 PM
  4. Signing An Applet!!!!! Me Need Help!!!!! Plz!
    By marco in forum Java Applets
    Replies: 3
    Last Post: 07-29-2007, 05:45 PM
  5. Unknown publisher / Signing standalone tomcat.exe
    By millross in forum New To Java
    Replies: 1
    Last Post: 06-14-2007, 02:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •