Results 1 to 4 of 4
  1. #1
    ElvisMachuca is offline Member
    Join Date
    Jan 2013
    Posts
    32
    Rep Power
    0

    Default Signing a JAR file, cannot get keytool to generate key

    Help, unless signing the jar file would not be required. Let me give you a background of what I am trying to do so you know why I am requiring to sign my jar file.

    I made an applet which will be use to save the content of a chess game (which I made myself) into a file. When I run the applet in eclipse, everything works fine. But when I load the applet in an html, I get an exception error, telling I need file permission.

    Now, I was searching online about a solution to this, and I found, and correct me if I am wrong, that in order to do what I need to do through an html, running an applet, I need to sign my JAR file from which I am running the applet from the html.

    For instance I am using this shell commands:

    keytool -keygen -keystore myStore -alias myself

    That seems to be fine, but when I run this line, I get a password prompt which does not allow me to enter anything. It is not that I don't know the password, because, I think it is asking me to enter a password I might want for the key certificate, and then, whats wrong is that the prompt does not allow for any character or number keys to be entered, it seems frozen. Not until I precess ^C (Ctrl C) to abort that function, that I am able to exit that, but nothing happens.

    Help, what am I doing wrong. Do I need to sign my JAR or how can I perform the above file access routie without getting the exception.
    Last edited by ElvisMachuca; 01-24-2013 at 09:32 AM.

  2. #2
    ElvisMachuca is offline Member
    Join Date
    Jan 2013
    Posts
    32
    Rep Power
    0

    Default Re: Signing a JAR file, cannot get keytool to generate key

    To be more specific,

    This is the exception that I am getting:

    AccessControlException acess denied (java.io.FilePermission)

  3. #3
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,889
    Rep Power
    8

    Default Re: Signing a JAR file, cannot get keytool to generate key

    When you're entering the password, the characters are hidden. Just enter a password and hit enter.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  4. #4
    ElvisMachuca is offline Member
    Join Date
    Jan 2013
    Posts
    32
    Rep Power
    0

    Default Re: Signing a JAR file, cannot get keytool to generate key

    Ok, I went through just fine...thanks.

    However, when I run the following command:

    jarsigner -keystore mykeystore -storepass keypass file.jar alias

    I get an error stating: Could not find or load main class sun.security.tools.JarSigner

    Anything on this?

Similar Threads

  1. Replies: 1
    Last Post: 01-08-2013, 07:33 AM
  2. Generate XML File
    By Gonzo1563 in forum NetBeans
    Replies: 0
    Last Post: 11-10-2012, 04:52 AM
  3. How to generate excel file from a JSP
    By malarkal in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 04-07-2010, 01:06 PM
  4. Generate a Class file
    By Daniel in forum New To Java
    Replies: 6
    Last Post: 04-20-2009, 05:37 AM
  5. KeyTool IUI 2.0
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 07-01-2007, 09:06 AM

Posting Permissions

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