Applet signing - How to use jarsigner tool?

Posted on 2009-04-21
Last Modified: 2012-06-21
This is such a 'noob' type question I hate myself for asking it. Basically i'm wanting to use the keytool/jarsigner tool provided in the JDK (1.6 update 13) to sign an applet I have. I have the .jar and know the method of actually signing the applet.

Yet using the command line, how do I access the tools? The tools are in the JDK folder while my classes or jar is in my workspace, so on the command line how do I get access to the jarsigner/other tools in my workspace?

I tried setting the CLASSPATH to the directory but no luck there...I was born when I didn't need to use the command line so never really have :p
Question by:Lexx87
    LVL 92

    Accepted Solution

    you need to add the bin directory to your PATH


    Author Comment

    I've done that already!

    It's what I meant by setting my classpath to the directory. Why I got confused in what I was supposed to do :)
    LVL 92

    Expert Comment

    you don't need to touch the classpath to run jarsigner

    LVL 86

    Expert Comment

    >>I've done that already!

    Can you post the result of the following at the command line?

    echo %PATH%

    Open in new window


    Author Comment

    No I was wrong, I assumed they were actually the same thing :) Classpath and path. Should be fine now, i'll post back with the result.

    Path is now C:\Program Files\Java\jdk1.6.0_13\bin
    LVL 92

    Expert Comment

    no they are different, PATH is a list of locations for the os to look for executables
    CLASSPATH is a list of locations for the java vm to look for classes

    > Path is now C:\Program Files\Java\jdk1.6.0_13\bin

    that should do it :)


    Author Closing Comment

    Told me exactly what I needed to know :)

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    abstract class with all non abstract mentods 6 58
    changeXy challenge 13 40
    strCount chalenge 3 35
    word0 challenge 4 37
    Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
    Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
    Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
    The viewer will learn how to implement Singleton Design Pattern in Java.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now