Results 1 to 7 of 7
  1. #1
    spikenigma is offline Member
    Join Date
    Jan 2012
    Posts
    6
    Rep Power
    0

    Default /.keystore (No such file or directory)

    hi,

    so, I'm trying to sign a JAR file connected to an applet.

    I got to creating the keystore and had a "where do you want to store it? and what do you want to call it?" message.

    I saved it as .keystore and was warned by the system that files beginning with '.' are invisible.

    I clicked ok (thinking the compiler should be able to 'see' it) and now whenever I try to sign anything the Terminal tells me:

    jarsigner error: java.lang.RuntimeException: keystore load: /Users/spikenigma/.keystore (No such file or directory)

    It doesn't matter how many other keystores I create, it looks for it in said directory and throws up an error.

    I've tried everything

    HELP

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

    Default Re: /.keystore (No such file or directory)

    Go back to the tutorial on how to sign a jar file and make sure you are following the instructions.

  3. #3
    spikenigma is offline Member
    Join Date
    Jan 2012
    Posts
    6
    Rep Power
    0

    Default Re: /.keystore (No such file or directory)

    Perhaps I wasn't clear enough, if that was the case, I apologise.

    As I said "It doesn't matter how many other keystores I create, it looks for it in said [default] directory and throws up an error." - i.e. I am able to create keystores at any location in the system architecture. However, when I try to sign .jar files with them it says that the keystore in the default location cannot be found, which I cannot seem to change.

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default Re: /.keystore (No such file or directory)

    There have been lots of people that sign their jar files without problems that they have reported. So I assumed that if you follow the instructions it should work.
    So what is different about your system and technique that is causing the problem?

  5. #5
    spikenigma is offline Member
    Join Date
    Jan 2012
    Posts
    6
    Rep Power
    0

    Default Re: /.keystore (No such file or directory)

    Unsure,

    let me be as specific as possible and maybe you can tell where I am going wrong. I am on a Mac.

    1)

    I have a JAR file called csvjdbc.jar . It is a driver that enables offline SQL operations of sorts on tabular data.

    It works perfectly when loaded in the classpath both dynamically and at runtime.

    The contents of it's manifest file are, as expected:

    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.8.1
    Created-By: 1.6.0_22-b04 (Sun Microsystems Inc.)


    2)

    A test of csvjdbc.jar to check if it is already signed returns that it is not, as expected:

    (input)
    jarsigner -verify csvjdbc.jar
    (input)

    (output from terminal)
    jar is unsigned. (signatures missing or not parsable)
    (output from terminal)



    3)

    I want to sign the jar file so that I can load said JAR file in an applet I have not yet created.

    4)

    My steps are:

    (navigate to the folder via the terminal)
    cd desktop
    cd progamming
    cd java
    etc….
    (navigate to the folder via the terminal)


    (try to sign the jar)
    jarsigner csvjdbc.jar spikenigma
    (try to sign the jar)


    (response from terminal)
    Enter Passphrase for keystore:
    (response from terminal)

    (entered passphrase)
    ************** (censored)
    (entered passphrase)

    (response from terminal as previously mentioned)
    /Users/spikenigma/.keystore (No such file or directory)
    (response from terminal as previously mentioned)


    (Ok, let's create another keystore in a different location)
    keytool -genkey -alias signFiles -keystore thekeystore
    (Ok, let's create another keystore in a different location)


    (answer standard questions)
    Enter keystore password:
    Re-enter new password:
    What is your first and last name?
    What is the name of your organizational unit?
    What is the name of your organization?
    What is the name of your City or Locality?
    What is the name of your State or Province?
    What is the two-letter country code for this unit?
    (answer standard questions)


    (so, we try signing again)
    jarsigner csvjdbc.jar spikenigma
    (so, we try signing again)

    (enter the passphrase)
    Enter Passphrase for keystore:
    (enter the passphrase)

    (response from terminal as previously mentioned)
    jarsigner error: java.lang.RuntimeException: keystore load: /Users/spikenigma/.keystore (No such file or directory)
    (response from terminal as previously mentioned)

  6. #6
    spikenigma is offline Member
    Join Date
    Jan 2012
    Posts
    6
    Rep Power
    0

    Default Re: /.keystore (No such file or directory)

    Should add that I can see the keystore files I create successfully, I just can't seem to sign the jar file using them

  7. #7
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default Re: /.keystore (No such file or directory)

    Sorry, I'm not familiar with the steps. I know that they work, as I said before.
    Others have followed the steps in the tutorial and had success.

Similar Threads

  1. Replies: 1
    Last Post: 09-28-2011, 07:30 PM
  2. How to create a Keystore file
    By Tulsa in forum Advanced Java
    Replies: 3
    Last Post: 02-16-2011, 03:09 PM
  3. How to create a Keystore File
    By Tulsa in forum New To Java
    Replies: 0
    Last Post: 02-13-2011, 11:04 PM
  4. Replies: 2
    Last Post: 05-11-2009, 10:07 AM
  5. [SOLVED] File chooser selecting file from directory...?
    By prabhurangan in forum AWT / Swing
    Replies: 12
    Last Post: 06-18-2008, 04:08 AM

Tags for this Thread

Posting Permissions

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