How to sign a .jar file in java 6?

I know how to do it in java 5. One I have generated myKeystore I do this:
keytool -selfcert -alias mySelf -keystore myKeyStore
but, selfcert parameter doesn't exit in java 6, What i have to do?.
Thanks, everybody.

According to http://java.sun.com/javase/6/docs/technotes/tools/windows/keytool.html the -selfcert option does still exist, it's just no longer documented.

Similar Messages

  • How to sign multiple jar files using the same certificate..?

    hi,
    I want to run my application using Java Web Start.. i am using around 16 different jar files out of which around 13 are 3rd party component jars. I want to sign these jars using the same certifcate..., i am using the follwing code to sign the jars:
    (for the jar file ischeduler.jar)
    keytool -genkey -alias signFiles91 -keystore dtss -keypass dtss1351 -dname "cn=dtss" -storepass decisioncraft
    jarsigner -keystore dtss -storepass decisioncraft -keypass dtss1351 -signedjar signedischeduler.jar ischeduler.jar signFiles91
    keytool -export -keystore dtss -storepass decisioncraft -alias signFiles91 -file ischeduler.cer
    keytool -import -alias DCA2 -file ischeduler.cer -keystore Impischeduler -storepass ischeduler
    (for the jar file ischedulerclient.jar)
    keytool -genkey -alias signFiles92 -keystore dtss -keypass dtss1351 -dname "cn=dtss" -storepass decisioncraft
    jarsigner -keystore dtss -storepass decisioncraft -keypass dtss1351 -signedjar signedischedulerclient.jar ischedulerclient.jar signFiles92
    keytool -export -keystore dtss -storepass decisioncraft -alias signFiles92 -file ischeduler.cer
    keytool -import -alias DCA3 -file ischeduler.cer -keystore Impischeduler -storepass ischeduler
    but when i use the above signed jars in my application i get an error saying:
    "jars not signed by the same certificate"
    can someone plz tel me wher is the error....thanx
    andy

    Well for mulitple signing of jar files you can use ANT tool. Its easier and faster.
    Regarding the present problem -- hmm.. well it looks like you are using 2 different alias names for signing the jar file. Try using the same alias name and that might solve your problem.
    regards
    Saby

  • How can i put Jar Files in Java Runtime.?

    HI,
    how can i put jar files in JRE so that they are accessible every where.? is there some way.?
    Regards,
    AA

    Closest you could get to this I think is to explode all your jars into the same parent directory. Then if you put that directory on the classpath, you should be able to access all classes in all jar files

  • How to run a jar file using Java application.

    Hi all,
    I know that jar file can run using the following command, using the command prompt.
    java -jar jar-fileBut I don't know how to run that command through a Java code. Hope it's clear to you.
    So can you please explain how can I do it.
    Thanks,
    itsjava

    rayon.m wrote:
    The solution given by ropp appears to have nothing to do with what you asked about.Ok sir, I got the point.
    I've try a test as follows. But it doesn't give any output. Even not an exception.
            try {
                String[] temp = new String[]{"java", " -jar", " MainApp.jar"};
                Runtime rt = Runtime.getRuntime();
                Process proc = rt.exec(temp);
                int exitVal = proc.waitFor();
                System.out.println("ExitValue: " + exitVal);
                System.out.println("Temp_Values");
            catch(InterruptedException ex) {
                System.out.println(ex.getMessage());
            catch (IOException ex) {
                System.out.println(ex.getMessage());
            }I've debug and see, but the exitValue is even not exist at run time. Can you tell me where I'm going wrong.

  • How to run exe (jar) file in java?

    hello,
    i can retrieve jar file but can't run from outside of JBuilder ..why?
    can u help me, pls?
    nway nge

    Multipost.

  • How to run a jar file

    hi
    can anybody tell me how to run a jar file in java,is there any need to unzip a jar file before running it?
    Thanks in advance.

    Set the classptha, if you want to run it by double clicking.
    I assume that you know, how to set the classpath.I though that if it is an executable jar, the classpath environment variable will be completely ignored. Are you saying something to the contrary?

  • How to call a .jar file from a java bean?

    any body knows how to call a .jar file from a java bean?

    Crosspost!
    http://forum.java.sun.com/thread.jspa?messageID=4349619

  • How to make a jar file from a java file?

    how to make a jar file from a java file, is there any one tht can help me thank you;

    You can study this.
    http://java.sun.com/docs/books/tutorial/jar/basics/index.html

  • How to execute jar file in java project

    hi,
    i have made a proj in java in which i have put all my files in a jar file.
    can somebody help me how to execute this jar file??
    thanks

    u can put that jar file in ur class path,,
    regards
    shanu

  • How to run .jar on linux & how to create .jar file using java?

    hi, may i know how to run .jar on linux & how to create .jar file using java? Can u provide the steps on doing it.
    thanks in advance.

    Look at the manual page for jar:
    # man jar
    Also you can run them by doing:
    # java -jar Prog.jar

  • OpenScript/How to add .jar file to Java Code in relative path

    Hi all,
    I want to add a .jar file which can be executed separately (like "java -jar A.jar") to my recorded Java Code.I've read this wiki http://everest2.us.oracle.com/wiki/Generic_JAR_Project about how to add a .jar file to "Assets", however, I cannot figure out how to use the .jarr file in Java code,I mean , how to get this .jar file like the method the databank added in "Assets"?
    Things I did are as followed:
    1.Execute my .jar file in OpenScript Java code with absolute path like this:
    String cmd = "C:\Users\A.jar";
    Runtime.getRuntime().exec(cmd);
    This does work, but must set a absolute path in Java code like "C:\User\A.jar" ,which is not the workaround I want (I need my scripts can be run on other machines).
    2.Try to get its current path with following codes:
    File directory = new File(".");
    String currentPath=directory.getCanonicalPath();
    However,though this can get its absolute path (which is the the project path) in Eclipse like "C:\Users\Workspace\testProject", this only gets "C:\OracleATS\openScript" in OpenScript.
    I thought to copy my .jar file to the project path , got its current path in java code first,then can know the path of .jar file, but this workaround failed because of the above reason.
    I notice that in the "Assets" there are "Databanks","Object Libraries","JAR Files","Scripts". Since the databanks and scripts that added to "Databanks" and "Scripts" can be got or run in Java Code like:
    *getDatabank("DatabankName").getNextDatabankRecord(); String data = eval("{{db.DatabankName.data}}");*
    *or getScript("ScriptName").run();*
    *Is there a method to get and run the jar file added to "Assets\JAR Files" like the above?*
    Thank you very much!
    Regards,
    Angyoung

    Hi DM,
    Thanks for your reply!
    I've found a workaround,which is calling OpenScript's APIs ,such as this.getScriptPackage().getRepository() and this.getScriptPackage().getWorkspace(),etc to locate the .jar file.
    And this workaround can still work even though the script is run on other machine.
    Sorry to reply you so late!
    Regards,
    Angyoung

  • How to Transfer a JAR file from PC to a Java enabbled mobile?

    The project (creation of the JAR file) is developed in our local PC and transfer the JAR file to a mobile using Bluetooth. How to transfer the JAR file to a remote mobile?

    The situation is like this.
    We are transfering the JAR file from the PC to the Mobile using Bluetooth.
    Our J2ME project is already install on Nokia's 6600 and given to the salesman's on the field. Now i have updated my software and i want to upgrade the same on their mobiles. For this i can't call all the 2000 salesman's who are all over the country (India) to my place to get the latest software installed and configure.
    If i have a GPRS like solution for transfering my file from my PC to the remote mobile. I would be better. If you know any this related to this kindly reply me.

  • How to call a jar file from oracle forms (6i)

    Hi,
    I'm working with oracle 6i. I want to know that how to call a .jar file from forms menu. when I use HOST('<path>\test.jar') it is working in 'Client Server' any way. but the problem is I use application server in order to run my form. so my form is in the server and I run the form via clients web browser. in that case above solution will not work. if any body knows how to overcome this problem please reply.
    thanks.
    duminda

    I created a bean area and set the class name as implementation class. within that java bean class I called to a bat file which consists of the execution command of the jar file ( because i don't know how to call .jar file from my bean class directly).
    then i tried to run it in application server. its still not running.
    can you tell me what i have to do within my bean class? or can you suggest any solution?
    thank you.

  • How to open a .JAR file on the Z30

    Hi,
    Would anyine know how to open a .JAR file on the Z30?
    I get a message saying "Unable to open" when I click on the .jar file i want to open in my blackberry & install.
    Cheers
    Mario

    JAR files are for older java phones, they dont work on BB10
    maybe you should look into using SNAP to get some apps yoru looking for
    http://supportforums.blackberry.com/t5/Downloaded-Applications-for/You-Upgraded-to-OS-10-2-1-and-wan...
    Click here to Backup the data on your BlackBerry Device! It's important, and FREE!
    Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up
    Click to search the Knowledge Base at BTSC and click to Read The Fabulous Manuals
    BESAdmin's, please make a signature with your BES environment info.
    SIM Free BlackBerry Unlocking FAQ
    Follow me on Twitter @knottyrope
    Want to thank me? Buy my KnottyRope App here
    BES 12 and BES 5.0.4 with Exchange 2010 and SQL 2012 Hyper V

  • How to call a .jar file in JSP

    Hi Folks,
    I would like to know how to call a .jar file in a JSP page..
    Thanks in adv.

    Any web app creating tutorial can. You know, if this doesn't ring a bell with you at all, I don't really feel inclined to explain it to you because I think you shouldn't yet be dealing with JEE in the first place.
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/WebComponents3.html

Maybe you are looking for

  • Copy data Between different servers.

    Hello Floks! I´m trying to migrate my essbase server to another machine. All is done, planning is installed and is working. When I copy the database folders (in my case Hyperion\Essbase\App\...) to the new server and i want to start the database, it

  • My iPod touch no longer charges from my wall adapter after the. 5.0.1 iOS update. Any help ?

    So that is the problem. It is possible to downgrade ? Because it worked just fine before the update.

  • Apple TV as computer display?

    I want to show my computer screen on a 46" 1080p display while others watch me work with mapping programs to plan trips. I put a marker on the map on my computer, it shows on the 46". I think Apple TV cannot do this because what I am showing does not

  • Blue boxes with question marks

    I am trying to use a site that is my WEbsite host and when I navigate to that site I get all of these little blue boxes wiht quesiton marks and it is usually the items like .. "click here"places that are inportant. I have tried to use IE and the same

  • Titler program causes cs5 premium pro to crash

    I was in the middle of a project using cs5 premium pro and using titler with no problems.  There was a momentary power outage (don't know if this had anything to do with the problem) and computer rebooted without issue.  Next day when I went to use t