Different jar files access

I m facing an unknown problem in my jar file. My manifest file contains-
Manifest-Version: 1.0
Class-Path: lib/mysql-connector-java-5.1.5-bin.jar ntools.jar
Created-By: Tanvir
Main-Class: Logon
Yet, in my application a class can't be accessed which is in ntools.jar.If I just put - Class-Path: lib/ntools.jar , then it finds the class.I know that different jar file is separated by space.I did the same thing then why it is not finding classes in one jar but not classes in another jar.

remove the ntools from the Class-Path entries list.
it should only contain the external jar

Similar Messages

  • JDev10.1.2: Difference betwn same oracle.jbo.classes in different jar files

    Hello guys, does somebody knows the difference between these two JDeveloper 10.1.2 directories?
    JDEV_HOME/BC4J/lib
    JDEV_HOME/BC4J/jlib
    And more deeply, why are there different jar files both containing classes like oracle.jbo.domain.Number and oracle.jbo.domain.Date? I explain: you can find oracle.jbo.domain.Number in JDEV_HOME/BC4J/lib/bc4jdomorcl.jar and in JDEV_HOME/BC4J/jlib/bc4jdomgnrc.jar ?
    This is very strange.
    I ran into trouble because both oracle.jbo.domain.Number classes where being loaded, I was importing into my project the BC4J Generic Domains library which points to the BC4J/jlib/bc4jdomgnrc.jar, so I took it off of my project and added the BC4J/lib/bc4jdomorcl.jar as an additional path in the classpath because this is the one referenced by the embedded OC4J in the application.xml file.
    Thank you.

    Refer to the section BC4J Runtime Libraries
    If you are using the Oracle type mappings, use bc4jdomorcl.jar. If the application was built using "Java" type mapping, use bc4jdomgnrc.jar which is located in <jdev_install>/bc4j/jlib.
    http://213.35.38.54/otn_hosted_doc/jdeveloper/904preview/packaging_deploying/dbc_pldlibsappsvr.html

  • Can a unsigned jar file access the tmpdir (java.io.tmpdir)?

    Hello, according to the JNLP tutor, a signed jar file can access the local file system, but a unsigned one can not. My question is, can a unsigned jar file access the temp directory (the system property java.io.tmpdir)? I think the temp directory should be accessible even though it is part of the local file system.
    Thanks,
    LyLi

    no - unsigned application has no read/write access to the temp dir, but you can use the jnlp api to read and write files with the users permssion.
    see: http://java.sun.com/javase/6/docs/jre/api/javaws/jnlp/index.html for FileOpenService, FileSaveService, and ExtendedService.
    /Andy

  • Can I deploy the entity bean in different jar files?

    I have an application EAR, which contains several JARs. I have an entity bean A that has relationships with 2 other different entity beans B and C in the same DB. Now, I have to deploy this entity A together with B in AB.jar, and A with C in AC.jar. Both AB.jar and AC.jar are modules of the same application EAR file. They all use the same data sources to the same database, and named by different <ejb-name>.
    I have no problem with deploying the app to WebLogic 8.1. But the JSP page accessing entity A got errors. Sometime, it got error complaining that the container-generated ejbFindAccount mehtod is abstract.
    My questions are,
    Can an entity bean be defined twice in 2 different jars?
    When container load AB.jar and AC.jar, does it generate the finder methods twice?
    I guess there are some name conflicts going on here. What should I do to avoid it?
    Any comments are very much appreciated.

    Thanks for your answer, but how can I use it in connection with relationships?
    <!-- ********************************************************************** -->
    <!-- Relationship: View to FrameworkUser                                             -->
    <!-- ********************************************************************** -->
    <ejb-relation id="View-FrameworkUser">
         <description></description>
         <ejb-relation-name>View-FrameworkUser</ejb-relation-name>
         <ejb-relationship-role>
              <ejb-relationship-role-name>Views-have-FrameworkUser</ejb-relationship-role-name>
              <multiplicity>Many</multiplicity>
              <relationship-role-source>
                   <ejb-name>View</ejb-name>
              </relationship-role-source>
              <cmr-field>
                   <cmr-field-name>frameworkUser</cmr-field-name><!-#- getter/setter -#->
                   <cmr-field-type>java.util.Collection</cmr-field-type>
              </cmr-field>
         </ejb-relationship-role>
         <!-#- *************** -#->
         <ejb-relationship-role>
              <ejb-relationship-role-name>FrameworkUser-has-Views</ejb-relationship-role-name>
              <multiplicity>One</multiplicity>
              <relationship-role-source>
                   <!-#- *******REFERENCE******** -#->
                   <ejb-name>ejb_foo_jar2_ejb.jar#FrameworkUser</ejb-name>
                   <!-#- *******REFERENCE******** -#->
              </relationship-role-source>
         </ejb-relationship-role>
    </ejb-relation>
    ...this obviously doesn't work...
    Do I have to write a new <entity> where I define the referenced entity?

  • Jar file access

    Hello
    I've packaged my classes and relevent images and html help into a jar file in a structured directory format.
    I'm using the method this.getClass().getResource(String path) to access the files.
    On linux my program executes 100%, images load, html reads fine no problems
    On Windows 98 i cannot access the images in the jar, it throws a null pointer at the resource loader call
    Any explanations/solutions?

    omw, that makes so much sense i could kick myself :)
    eg:
    ImageIcon icon = new
    ImageIcon(getClass().getResource("images"+File.seperato
    Char+"icon.gif"));
    must the string be in URL format?Yes, it should be:
    ImageIcon(getClass().getResource("images/icon.gif");
    I dunno if it is just me, but I sometimes get problems using the getClass().getResource(...) method and usually end up using:
    getClass().getClassLoader().getResource("images/icon.gif");

  • Same source, different jar file sizes

    What could be creating this discrepancy in jar file sizes on two machines with exactly the same versions of SDK etc installed.
    Machine 1 - obfuscated jar size 148Kb
    Source moved to Machine 2 - obfuscated jar size 222Kb
    Source moved back to Machine 1, mods made, - obfuscated jar size 143Kb
    Source copied to Machine 2, NO mods, - obfuscated jar size 138Kb
    I want to retire Machine 1, and in fact Machine 2 is due to be re-purposed as well when my new shiny one arrives but I am worried I won't be able to get my file sizes as small as possible or at least cram as much as possible in so I would like to know what sort of things impact the packaging process.
    Thanks
    Kathydb

    When you sync photos with iTunes it automatically optimizes the photo size for the screen on the device it is syncing it to. Photo Stream also has some of this functionality built into it as well although a full resolution photo will be sent to iPhoto on Mac computers. Photos taken with different devices will also have different file sizes depending on how many megapixels the camera on the device has.

  • Multiple jar files from different locations

    Hello,
    I am having an applet that access code from two different jar files. Of them one is a common jar file for many applets. So I couldn't place it in the local dir as that of the applet's html. I am not using any web server.
         Just to give you a feel of it :
         <PARAM NAME = archive VALUE = "DVApplet.jar,DVVP.jar" > are the jar files my applet is dependant on. But DVVP.jar has to be accessed from a dir different from local dir.
         Will be glad if someone can throw some light on accessing different jar files from different dirs.
         Thanks for your time.
    Regards,
    Anantha

    [url=
    http://forum.java.sun.com/thread.jsp?forum=421&thread=425724&tstart=0&trange=100
    ]This question is a bit similar
    You can use a class loader to do such things.

  • Problems accessing resources in JAR Files

    Hi all,
    i'm using a third party software which isb trying to access a configuration file (xml file) residing inside its jar files.
    Without Webstart there are now problems, when deploying the software with Webstart, the resources could not be found.
    The software installs an streamhandler which handles all access to its resources.
    When this handler is instantiated, a Classloader is provided via Thread.currentThread()..getContextClassLoader().
    As i can see this classloader (and only this-) instance is used when resources are acessed.
    The classloader instance seems to me to be the correct one of type ...JNLPClassLoader.
    As i figured out the classloader is able to acess the resource In the Moment when the Handler is instantiated.
    But later in the code (inside of the Handler) any call of getResource() with identical parameter for the resource name fails.
    The classloader instance is the same as in the previous calls (which i have added for debug).
    The Handler class resides in a different jar file as the resource, but i have also tried to put them in one jar file achieving the same result.
    Has anyone an idea what is going wrong ?
    The application has "all-permissions" granted, but suprisingly i'm receiving an security exception when trying to call Class.getProtectactionDomain() inside of the Handler class.
    Could it be a security problem ?
    Thank you.
    Andrej
    Message was edited by:
    a.rippich
    Message was edited by:
    a.rippich

    Dear PCR Barry,
    I am afraid that I must agree with my colleague Kostas, who replied to your first teststand post. These are very tricky, indepth issues, and will require quite significant investigation. Furthermore, it will be very difficult for us to answer via the forums as we will likely need more input from yourself. As previously suggested, if you have a Standard Service Program (SSP), you can generate a Service Request by calling or e-mailing your local branch.
    Thank you for your time, and I am sorry that I have been unable to help you further,
    Best wishes,
    Rich R
    Applications Engineer
    National Instruments UK & Ireland

  • Problem using misc jar-Files in Composite Application

    Hi there,
    I want to use different jar-Files in my Composite Application on SAP Netweaver 7.3.
    I have created an external Lib DC where I have inserted the libs. After that I created an enterprise EAR and added the dependency to the PP of the external lib DC.
    After that I added the a dependency to my CAF-EAR. But I cannot access the mehtods and functions from my jar files.
    What's wrong there?
    Another question: Is it possible to add the jar-files directly to my CAF-EAR without creating the external library DC and adding a dependency?
    Any help would be greatly appreciated
    Thanks

    Hi, I've downloaded Jacob and got it running on my installation by doing the following:
    1. Download http://danadler.com/jacob/jacobBin_17.zip.
    2. Extract to Jdeveloper10g/jdev/lib/ext/Jacob
    3. Copy jacob.dll to c:/windows/system32
    4. Add JDeveloper10g/jdev/lib/ext/Jacob/jacob.jar to JDev user libraries, calling it 'Jacob'
    5. Add the 'Jacob' library to the project.
    6. Create a word document at c:/java/jacob/file_in.doc
    7. Create a new class with the following code:
    package view;
    import com.jacob.*;
    import com.jacob.activeX.ActiveXComponent;
    import com.jacob.com.Dispatch;
    import com.jacob.com.Variant;
    public class TestJacob
    public TestJacob()
    * @param args
    public static void main(String[] args)
    TestJacob testJacob = new TestJacob();
    testJacob.runTest();
    public void runTest()
    boolean tVisible = true;
    String sDir = "c:\\java\\jacob\\";
    String sInputDoc = sDir + "file_in.doc";
    ActiveXComponent oWord = new ActiveXComponent("Word.Application");
    oWord.setProperty("Visible",new Variant(tVisible));
    Object oDocuments = oWord.getProperty("Documents").toDispatch();
    Object oDocument = Dispatch.call(oDocuments, "Open", sInputDoc).toDispatch();
    }

  • JAR files just won´t run, multiple systems, JRE & JDK installed.

    Hi!
    I´ve been looking on many different places for an answer for this issue:
    I have to run different JAR files for applications, one is from Apache ActiveMQ, and the other is a hash calculating app. I´ve read on many topics that if you get error "Failed to load Main-Class" when running a JAR, the problem is how the JAR was packed (MANIFEST). Well, I find highly unlikely that two different JARs, from different sources, are wrongly packed. Also, I´ve installed JRE, JDK and even Java EE, on MS Server 2003 and on Windows 7 (on this last one only JRE), and no JAR runs. I´ve tried declaring PATH and JAVA_HOME environment variables... no use. Can anyone help me solve my problem?

    Hi,
    You might want to look in your control panel for 'Java' icon. It should give you an option to enable java plugin into your browser. Let me know if you still face the issue.
    Thanks!

  • Linking between jar files

    I'm trying to create links between topics of different jar files but cannot get it to work.
    have tried a few different ways to do this:
    <a href="jar:file://../jarfilenam.jar!/htmlfilename.htm">
    <a href= "../jarfilename.jar!/htmfilename.htm">
    <a href="/jarfilename/htmfilename.htm"> none work. Any insights?
    thanks
    Margaret

    Hey Margaret,
    we have the same problems. Did you found a solution?
    The funny thing is: sometimes a reference in the style
    works - but not constantly! We had three references in this style in one html-page and the first one of them works in our development environment. In the productive environment (with WebStart-technology) no link works. It's also not clear, to witch object the path should be relativ: from the folder, the HTML-page resides? Do you need one more "../" to step outside the jar?
    By the way: does anyone knows, how JavaHelp finds it resources like GIF's, wich are referenced from HTML-pages? If I have the same filename in more than one JAR, it's normaly not defined, which one is loaded with the getResource-method of the class loader, or am I wrong?
    We have different JAR-files with same resources, for example "hallo.gif". In each JAR-file is a HTML-page, wich loades this GIF. If I delete the GIF in one of the JARs, the HTML-page in this JAR doesn't display the GIF. The other HTML-page works still fine. It looks like the resources are only searched in the same JAR. Am I right??
    thanks
    Olaf

  • Double .jar files

    Hi,
    I have a problem while trying connection the cloudscape 10.1 database.
    For the connection a derby.jar file is required. i have include the file and I can connect the database via the class code. but when i try to connect by a jsp file, i get an error:
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:830)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:763)
         org.apache.jsp.Controller_jsp._jspService(Controller_jsp.java:68)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    root cause
    java.lang.ExceptionInInitializerError
         java.lang.Class.forName0(Native Method)
         java.lang.Class.forName(Class.java:164)
         PRM.Database.openDatabaseConnection(Database.java:26)
         PRM.Controller.(Controller.java:14)
         org.apache.jsp.Controller_jsp._jspService(Controller_jsp.java:47)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
    note The full stack trace of the root cause is available in the Sun-Java-System/Application-Server logs.
    Sun-Java-System/Application-Server
    when I debug I get an other error:
    Sealing violation loading org.apache.derby.jdbc.InternalDriver : Package org.apache.derby.jdbc is sealed
    According to an IBM site this means that I have 2 different derby.jar files
    The sealed jar error indicates that you are trying to load classes from the same package in two different jar files. (quote from the site)
    http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?message=13764581&cat=19&thread=98729&treeDisplayType=threadmode1&forum=370#13764581
    My classpath =
    "/C:/Program Files/Sun/jstudio_ent8/AppServ8.1UR2/domains/domain1/applications/j2ee-modules/BigTest2/WEB-INF/classes/;/C:/Program Files/Sun/jstudio_ent8/AppServ8.1UR2/domains/domain1/applications/j2ee-modules/BigTest2/WEB-INF/lib/derby.jar;C:/Program Files/Sun/jstudio_ent8/AppServ8.1UR2/domains/domain1/generated/ejb/j2ee-modules/BigTest2/;"
    The 2 locations ofthe derby.jar files are:
    C:\Program Files\Sun\jstudio_ent8\AppServ8.1UR2\domains\domain1\applications\j2ee-modules\BigTest2\WEB-INF\lib
    and
    C:\Documents and Settings\Administrator\BigTest2\build\web\WEB-INF\lib
    deleting one isn't a option, a new derby.jar will be placed back while compiling..
    What to do?

    Thanks but I've used that tutorial and others to learn how to make the jar file executable and its working if i use "java -jar hello.jar" at the command line.
    Unfortunatley i was messing around with the 'open with' command on the jar file trying to fix it and i've made it associated with some html help thing., and i have no idea how to unasociate it.
    Anyone know any way i can remove all associations with it?

  • 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

  • CMR between EJBs in different JARs

    Hi,
    how could I manage CMR between EJBs in different JAR-files (different deplyoment descriptors as well) ?
    THX
    Tim

    Hi Tim, You should post this question to EJB newsgroup not JNDI.
    The answer though is you cannot, please see this documentation,
    http://edocs.bea.com/wls/docs81/ejb/entity.html#1188656

  • Making JAR file visible to code in JDeveloper

    Hi. We're using JDeveloper 9.0.5 (planning soon to upgrade to latest version) and need to get a JAR file visible to code in a Java file. The JAR file is for the Java Advanced Imaging API, JAI_WINDOWS-I586.JAR
    What do we need to do to get this working? Thank you.

    Thanks, Frank. Finally got it working. The issue was this: The JAI API has 4 different JAR files for each platform. I'd downloaded one that contained an exe; I needed the one for the CLASSPATH installation.

Maybe you are looking for

  • Nokia N8 Symbian Belle - Mobile Data Auto Connecti...

    I have recently updated my n8 to symbian belle and I am having trouble in disabling the mobile data. For some reason the 3G connection icon keeps on beeping in the menu bar. It keeps on trying to connect to packet data even though i have disabled  th

  • load-on-startup 1 /load-on-startup not working in Weblogic 9.1

    Hi           I have the following xml tag in web.xml file           <load-on-startup>1</load-on-startup> for some servlets, i have given then sequence 1 to 5, but for some reason 5 is loading first and the whole application crashes because of this.  

  • At Craig's suggestion: Why Invoke PERL functionality from WD-ABAP?

    Craig - This is response to your suggestion that I post my own reasons for thinking that it would be useful to be able to invoke PERL functionality from WD-ABAP. Please note at the outset that these reasons are based on my own personal belief that th

  • Charm Reporting issue

    Hi Friends When I try to schedule the ChaRM reporting (in dswp -> solution reporting -> Change management). I am getting the below error. we are in sps 23. Job started Step 001 started (program /TMWFLOW/REP_CHANGE_MANAGER, variant REP_VARIANT, user I

  • Can I arrange the order of my accounts in order of my priority use

    I have various email accounts they are in the order I added them. is there any way I can move the account up or down the order