Why need to sign the jar files ????

Hi
Why does i have to sign the jar files to run my app ??
are not another away to run the app???

U just have to sign your jar if your application needs full access to the client-resources.
http://java.sun.com/products/javawebstart/docs/developersguide.html
andreas

Similar Messages

  • Need to know the jar file...?

    Hi,Iam writing an java program which is going to send messages to the remote websphereMQ server,program compiled successfully while in execution it throws error.The prgram is
    com/ibm/jvm/ExtendedSystem/*
    Use source code downloads, example commands,
    and any other techniques at your own risk.
    No warranty is provided.
    import java.util.Properties;
    import javax.jms.JMSException;
    import javax.jms.TextMessage;
    import javax.jms.Queue;
    import javax.jms.QueueConnection;
    import javax.jms.QueueConnectionFactory;
    import javax.jms.QueueSender;
    import javax.jms.QueueSession;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import java.util.Hashtable;
    public class Sender {
         String url_;
         String name_;
         QueueConnection conn = null;
         QueueSession session = null;
         Queue queue = null;
         public Sender(String url, String name) throws JMSException, NamingException {
              url_ = url;
              name_ = name;
             this.initializeSender();
         private void initializeSender() throws JMSException, NamingException {
         /*      Properties props = new Properties();
              props.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
              props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming");
              props.setProperty("java.naming.provider.url", url_); */
              String icf = "com.ibm.websphere.naming.WsnInitialContextFactory";
              //String url="iiop://192.168.2.45:1421";
              // Initialise JNDI properties
              Hashtable env = new Hashtable();
              env.put("java.naming.factory.initial",icf);
              env.put("java.naming.factory.url.pkgs","com.ibm.ws.naming");
              env.put("org.omg.CORBA.ORBClass","com.ibm.rmi.iiop.ORB");
              env.put("org.omg.CORBA.ORBSingletonClass","com.ibm.rmi.corba.ORBSingleton");
              env.put("javax.rmi.CORBA.UtilClass","com.ibm.rmi.javax.rmi.CORBA.Util");
              env.put("javax.rmi.CORBA.StubClass","com.ibm.rmi.javax.rmi.CORBA.StubDelegateImpl");
              env.put("javax.rmi.CORBA.PortableRemoteObjectClass","com.ibm.rmi.javax.rmi.PortableRemoteObject");
              env.put("java.naming.provider.url",url_);
              InitialContext context = new InitialContext(env);
              QueueConnectionFactory qcf = (QueueConnectionFactory) context.lookup("QCF");
              conn = qcf.createQueueConnection();
              queue=(Queue)context.lookup(name_);
              session = conn.createQueueSession(false,QueueSession.AUTO_ACKNOWLEDGE);
              conn.start();
          public void send(String text) throws JMSException, NamingException {
              QueueSender send = session.createSender(queue);
              TextMessage tm = session.createTextMessage(text);
              send.send(tm);
              send.close();
         public void disconnect() throws JMSException {
              if(conn != null) {
                   conn.stop();
              if(session != null) {
                   session.close();
              if(conn != null) {
                   conn.close();
         public String getTopicName() {
              return name_;
         public String getTopicURL() {
              return url_;
         public static void main(String args[]) throws Exception {
              System.out.println("Starting JMS Example Sender");
                Sender sender = new Sender("iiop://192.168.2.45:1421", "ASMQUEUE");
                 System.out.println("Sending list of data");
                 sender.send("Krishna Moorthy");
                 sender.disconnect();
                      System.out.println("JMS Example Sender Complete - list sent");
    }During Execution followng error occurs,
    D:\jboss-4.0.5.GA\WebSphere_JMS>java Listener
    Starting JMS Example Listener
    performing lookup...
    Error creating listener: javax.naming.NamingException: Failed to initialize the
    ORB [Root exception is org.omg.CORBA.INITIALIZE: can't instantiate default ORB i
    mplementation com.ibm.CORBA.iiop.ORB  vmcid: 0x0  minor code: 0  completed: No]
    javax.naming.NamingException: Failed to initialize the ORB [Root exception is or
    g.omg.CORBA.INITIALIZE: can't instantiate default ORB implementation com.ibm.COR
    BA.iiop.ORB  vmcid: 0x0  minor code: 0  completed: No]
    at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:293)
    at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(Ws
    nInitCtxFactory.java:365)
    at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:102)
    at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:40
    8)
    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:131)
    at javax.naming.InitialContext.lookup(InitialContext.java:351)
    at Listener.initializeListener(Listener.java:78)
    at Listener.<init>(Listener.java:31)
    at Listener.main(Listener.java:112)
    Caused by: org.omg.CORBA.INITIALIZE: can't instantiate default ORB implementatio
    n com.ibm.CORBA.iiop.ORB vmcid: 0x0 minor code: 0 completed: No
    at org.omg.CORBA.ORB.create_impl(ORB.java:297)
    at org.omg.CORBA.ORB.init(ORB.java:336)
    at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:77)
    at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:174)
    at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:98)
    at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:74)
    at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:386)
    at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:284)
    ... 8 more
    Caused by: java.lang.NoClassDefFoundError: com/ibm/jvm/ExtendedSystem
    at com.ibm.rmi.util.JDKBridge.setCodebaseProperties(JDKBridge.java:226)
    at com.ibm.rmi.util.JDKBridge.<clinit>(JDKBridge.java:205)
    at com.ibm.rmi.util.RepositoryId.<clinit>(RepositoryId.java:122)
    at com.ibm.rmi.iiop.CDROutputStream.<clinit>(CDROutputStream.java:1077)
    at com.ibm.rmi.corba.ORB.<init>(ORB.java:250)
    at com.ibm.rmi.iiop.ORB.<init>(ORB.java:166)
    at com.ibm.CORBA.iiop.ORB.<init>(ORB.java:521)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at java.lang.Class.newInstance0(Class.java:350)
    at java.lang.Class.newInstance(Class.java:303)
    at org.omg.CORBA.ORB.create_impl(ORB.java:295)
    ... 15 more
    Done listening
    In my application classpath following jars are used : jms.jar,naming.jar,namingClient.jar,ibmorb.api,ibmorbapi.jar,jndi.jar
    I need to know the jar file name for this class : com/ibm/jvm/ExtendedSystem.And also tell me the solution to solve the above error.Anyone know the solution please reply as early as possible..Thanks in advance

    Have you checked if any of the jar files in your class path contains the missing class ?

  • Using System.getProperty in the app, but still not signing the jar file

    Is there a way to use the System.getProperty call in the app but not sign the jar? I get the security exception when launched using WebStart?
    Any help appreciated.

    Yes. Don't use Web Start, and you'll have no problems.
    Seriously, the security exception is there by design. If you must call System.getProperty, you need to sign your jars -- though personally, I think there are situations where signing your jars to make Web Start work is a needless complication.
    However, if you still need a tool to deploy updates and such, I recommend Deploy Director from Sitraka.

  • Can I progamatically sign a jar file?  i.e. w/o jarsigner tool

    Hi,
    I am new to development and am using Ant to build my packages.
    I need to sign the jar files that I produce, and now the only way I know how is with jarsigner.
    I'd like to find a way to do the signing within Ant, but can't find one.
    Is that possible?
    George

    I'm having trouble with the opposite: I'm trying to verify a signed jar programmatically.
    I've already read this article, and thought that I could do similar things in order to verify.
    However, this code uses classes from sun.security.util, and I couldn't find any documentation of this package.
    Any suggestion will be greatly appreciated!

  • Error not alloving sign my jar file - help needed

    hi guys i am getting the following error while trying to sign the jar file.
    unable to sign the jar ; jar.util.zip.zip exception: invalid entry compressed size .
    i got this while signing the msbase and msutil of MS jdbc jar files.
    what am i suppose to do.
    I am unable to understand one more thing. Do i need to have both jdbcodbc.dll library and msbase,msutil, mssqlserver jar files to connect using jdbc or its ok if i only have the jar files. I would appreciate if somebody can help me in this regard.
    thanks,
    ravi.

    hi guys i got the problem solved i unzipped the files and zipped them agian. Its working well .
    thanks,
    ravi.

  • 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

  • Signing a jar file

    Guys, I've googled the crap out of this one. I need some help signing a jar file.
    Here is what I'm doing:
    1. Generating a key:
    keytool -genkey -keystore myKeyStore -alias myName2. Trying to sign the jar file:
    jarsigner -keystore myKeyStore -storepass myPassword -keypass myNamePassword myJar.jar myNameHere is the error I'm getting:
    jarsigner error: java.lang.RuntimeException: keystore load: Invalid keystore formatI'm using Ubuntu Linux.
    I wrote and built my project with Netbeans.
    Any ideas?

    Here is what the latest process looks like. What am I doing wrong?
    thomasaaron@ubuntu:~/Desktop$ keytool -genkey -alias thomasaaron -keystore myKeyStore
    Enter key store password: password1
    Enter key password for <thomasaaron>: password2
    You are about to enter information that will be incorporated into
    your certificate request. This information is what is called a
    Distinguished Name or DN. There are quite a few fields but you
    can use supplied default values, displayed between brackets, by just
    hitting <Enter>, or blank the field by entering the <.> character
    before hitting <Enter>.
    Common Name (hostname, IP, or your name): Thomas Aaron
    Organization Name (company) [The Sample Company]: Tom's Company
    Organizational Unit Name (department, division): Tom's Department
    Locality Name (city, district) [Sydney]: TommyLand
    State or Province Name (full name) [NSW]: Colorado
    Country Name (2 letter code) [AU]: US
    thomasaaron@ubuntu:~/Desktop$
    thomasaaron@ubuntu:~/Desktop$
    thomasaaron@ubuntu:~/Desktop$ jarsigner -storepass password1 -keystore myKeyStore SupportManager.jar thomasaaron
    jarsigner error: java.lang.RuntimeException: keystore load: Invalid keystore format

  • Webstart : sign a jar file

    I have a desktop app that has to access local data files as well as network database server. At the moment, I have a executable jar file now when I try to run it with Webstart it complains about unsigned jar file asking for full access on a file. what do i need to sign a jar file. the jar file as is will work when someone double clicks the file icon but if the computer is not set up for java to open jar files, most likely if you have winzip , it will open the jar file. So other than the sdk what else do i need
    Thanks in advance

    thanks that was helpfull , but, I found a page on the suns web page which i found using another serch engine . I couldnt find it by searching this website.
    I apprectiat you taking the time, thanks

  • Digitally sign a jar file for distribution?

    I recently got a jar of mine hosted for client use though a web page.
    The problem is that the jar needs to access the internet for several functions. JWS prompts the user for security reasons every time it makes a connection to a new url endpoint. Since one operation alone can hit 56 url's i thought this could be a bit of a hassle to the users.
    The solution, as I understand it to be, is to digitally sign the jar file, so the user is prompted once on download.
    I found a site ascertia which offers free certificates, but for the life of me I canb not get this to work.n I have seen keytool generate numerous errors, none of which mean anything to me. (too long >59, cant read chain from reply, invalid cert)
    Does someone know a clear and thorough tutorial on digital code signing and certs? Or a CA that provides certs for free, and has some instructions to go along?
    Thanks so much.
    The step i have trouble on is turning the CSR into a cert, and importing the returned cert back into the keystore.

    Masterkeedu wrote: !! It worked.
    Congratulations. :-)
    Masterkeedu wrote: So it's not certified, but is signed.
    So as I understand this, it means the end-user has no way to know it was me that truly signed it. But relies on their common sense I suppose.
    That is correct. The CA has verified, and is certifying, that you are who you claim to be. If you or I use a 'self signed' certificate, it does not carry the same level of trust. As you might understand already, the dialogs are different between the two certificate types, and some users cannot accept trusted code from an unverified (self-signed) certificate.
    I have been meaning to write a page on the differences between the two certificates. It is well worth looking into getting a cert. from a CA.
    There was a stage when one of the major CAs were offering 'freemail' certificates that came emblazoned not with your name, but 'free mail' itself. I did not like them because of that, and continue to use a self-signed certificate.

  • Where i will get  the .jar files for JDBC connector for MSSQL Server

    Hi,
    i am trying to configure the JDBC connector for the MSSQL server. For this we need to add the .jar files for MSSQL Server. Can any body tell , where i will will get the jar files to finish this connection.
    Database version is MS SQL Server 2000
    Portal version is       Portal7.0 sp9
    Regards
    vijay

    Hi Vijay,
    If you are looking for the exact steps as to how we can configure the JDBC Connector for accessing the MS SQL Server, have a look at this document:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/b00917dc-ead4-2910-3ebb-b0a63e49ef10
    Follow the steps till page 12 of this doc.
    Bye
    Ankur
    Do reward points for helpful as well as solved answers!!

  • Alternative to specify the jar file location other than server classpath.

    Hi,
    We use weblogic 8.1 for our development purpose... and mostly work on ejb's. Every time a new ear file is created and deployed we need to specify the jar files needed to run that application in server classpath.... is there any alternate way so that v can avoid specifying these jar files in server classpath...

    vinod hadlee wrote:
    Hi,
    We use weblogic 8.1 for our development purpose... and mostly work on ejb's. Every time a new ear file is created and deployed we need to specify the jar files needed to run that application in server classpath.... is there any alternate way so that v can avoid specifying these jar files in server classpath...One alternative is you could bundle the jars in the EAR itself in APP-INF/lib.
    Gerald

  • How to modify the jar files information for Script Assets??

    Hi,
    I am using Open Script 9.2. We can add the external JAR files using Script->Script Properties--> Script Assets. I need to change the jar files when ever i am going to execute no of scripts. How can I modify them using JAVA Coding without manual handling. Is there any specific methods existed in OpenScript to serve the above scenario.
    Thanks in Advance.
    Thanks & Regards,
    Siva Thota

    Hi,
    When you say alter the jar file, do you mean alter the contents of the java code within the jar. If this is yes then the simple answer is no. As you are probably aware, a jar file contains pre-compiled java code, which you will not be able to alter. What is it you are trying to achieve?
    A simple answer maybe to use a child script which you can include into your main script. You can then change the code in the child script, and when you play back, this 'new' code will be compiled, and included within the replay.
    Regards
    Wayne.

  • Problem Signing midlet .jar file.

    Hi,
    Step - 1 :
    ======
    - I have created a keystore first like.
    - c:> keytool -genkey -alias <alias> -keystore c:/abcd.sks -keyalg RSA*
    o/p : So it created a keystore.
    Step - 2:
    ======
    - I imported my certificate from Verisign into the keystore..
    - keytool -import -alias <alias> -keystore c:/abcd.sks -file <CompanyCert.cer>
    o/p : The certificate imported successfully.
    Problem :
    =======
    Problem occurs at the time of signing the jar file with jarsigner
    jarsigner Myjar.jar <alias>
    o/p :Jar is signed and It says, "your certificate will expire in six months". But our certificate has an expiry in 2011.
    Also when the jar file installed in the mobile, it occurs as an invalid application.

    The following may help you..
    JavaJar(written by java) can compress and decompress jar,war, ear and.zip...
    it can deal with manifest file and executable .jar file .specially.
    may download from http://www.qwerks.com/download/4114/JavaJar.zip
    the tool is very verygood tool.
    but the homepage(www.pivotonic.com) of JavaJar cannot be accessed.
    it is funny.
    good lucky.

  • Signing of jar file

    Does it require to be sign the jar file only by a certificate authority?
    Will the self signed jars work in final deployment if the user trusts and is OK with it? (or the self signed is only for testing).

    Yes, self-signed jars will work in final production, if the user is willing to trust you. Keep in mind that the user will get a message specifically recommending that they not trust you.
    Chris

  • Signing webutil jar files

    We are making a install package for our developers here for 10.1.2 forms. We would like to add the final signing of the jar files to the script so after the install is done the developers dont have to do anything to get going. Can we just sign the frmwebutil.jar and jacob.jar once and make them part of the install package for everyone or do those jar files have to be signed on each individual pc? The key is set in sign_webutil.bat and everybody is using the same default key anyway when they do a manual install.

    What Im doing is making and an enterprise wide install package for Developer Suite which allows the Developers to click a button and oracle Forms Developer suite will get installed on their pc with the latest patch 10.1.2.2. Someone asked me if we could incorporate the final step of signing the jar files iin the install package so the developers dont have to do that after the install is done. So, I can either write the script so that the two jar files are signed on each pc after the install done or I can just sign them now on my pc, put them in the install package and deploy them to each developer already signed. It would be simpler to just sign them once and give them to each develolper. Will that work or do the jar files have to be signed on each pc after they are deployed. Like I said, when the developers do a manual install of developer suite everybody uses the default key in the sign_webutil.bat file anyway.

Maybe you are looking for