How to use a third party jar, which is added to classpath at runtime.

Hi
I'm using the classpathhacker posted on the forums somewhere, and want to use the jexcel driver.
What I want is to be able to use the excel functions only if the excel driver is availlable.
The problem now is that to be able to use the excel functions the driver has to be in the classpath, and it has to be imported when compiling.
That way the app will crash at startup if the driver isn't availlable...
Is there a way around this?

Wouldn't it be possible to catch the error thrown when the JVM can't find the used classes? That would prevent the program to exit, or not?
e.g.:
try {
  // things that aren't available...
} catch (Exception ex) {
  // error occured
}

Similar Messages

  • ADF mobile: How to pack a third party jars into apk

    Hi Expert,
    I am using Jdeveloper + ADF mobile 11.1.2.4 to develop an android application. In this application, I need to call some functions in the third party jar files.  I need to add the third party jars into my apk so that those classes can be found during runtime.
    I followed section 17.1.1.1 to add the libraries into my project. However, after I deployed my app to the emulator and tried to run it, it reported "encountered error: classes not found". And I also found that the third party jars don't exist in libs/ directory of the apk. Do you know how to solve the problem: How to reference a third party jar files in my app and make sure it works?
    Thanks,
    Yan

    Create a /libs directory within  Android project directory and copy the JAR files to /libs.
    To build.properties add
    external.libs.dir=libs

  • How to add new third party jars into JDev - quick question

    Hi All
    We have some additional jars needed to include for use with our current ADF application.
    These jars are not for ADF components.
    These jars are for API calls to other 3rd application.
    We're using standalone weblogic to run our ADF app.
    How do we include our 3rd party jars in JDev ?
    Do we need to include new paths in standalone WLS to pick up these new 3rd party jars in order for our app to work ?
    Thanks

    You can add libraries to WLS classpath, but this is not good approach if you need to replace them later(because you must restart WLS to pick new version)
    To include jars to ADF deployment, open Model or ViewController project properties and include path(s) in Project Source Paths->Java Source Paths.
    Then edit your deployment profile (right click on application -> Application Properties... ->Deployment -> Your Deployment Profile), go to Application Assembly and mark these libraries(also, for each library you can specify target folder, for example "lib")
    Dario

  • How to use the third party apps?

    I see Apple has put some third party apps on their site, but how do you download them and use them for itouch?

    I think you are talking about WebApps?(http://www.apple.com/webapps/). If you are they cannot be downloaded, but can be bookmarked to your homescreen if you purchased the update. If you didn't purchase the update they can be added to your Bookmark section. To access them you will need an internet connection.
    Message was edited by: connorbj

  • How to use a Third Party DAQ evaluation board/ module

    Hi to everyone,
     This question may have occuerd earlier but I have never got a clear and direct answer for this.
    ISSUE : I have a High Speed DAQ module DC1371A evaluation board from Linear technology [ http://cds.linear.com/docs/Demo%20Board%20Manual/d​c1371A.pdf ].
    Question: Since DAQ/DAQmx allows only Ni devices to be interfaced, how can I configure this module to work with labview.This module has a software Pscope [ http://www.linear.com/designtools/software/ . How do I proceed.
    Thank you guys,
    Abhi
    Labview 11
    Abhilash S Nair
    Research Assistant @ Photonic Devices and Systems lab
    [ LabView professional Development System - Version 11.0 - 32-bit ]
    LabView Gear:
    1. NI PXI-7951R & NI 5761
    2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021
    OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
    CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
    MEMORY - [ 16.0 GB RAM ]
    GPU - [ NVIDIA GeForce GT 530 ]

    I asked her and she told Linear Technology wont provide any kinda drivers to communicate with LV. If needed I have to use their PSCOPE program that displays the signals etc.
    This is bad.
    Can you guys please suggest any other DAQ module with ADC ( 14 bit and 250 msps) and a DSP board with it to process the data, Both of which I can communicate with LV without any hassle.
    I am tired of waiting for other companies to offer some way to communicate with LV. or Please advice HOW TO GO ABT SETTING UP A HIGH SPEED ADC AND DAQ MODULE. I think its better I start from scratch.
    Thank you
    Abhilash S Nair
    Research Assistant @ Photonic Devices and Systems lab
    [ LabView professional Development System - Version 11.0 - 32-bit ]
    LabView Gear:
    1. NI PXI-7951R & NI 5761
    2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021
    OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
    CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
    MEMORY - [ 16.0 GB RAM ]
    GPU - [ NVIDIA GeForce GT 530 ]

  • How to use a third party datasource in java se use toplink jpa?

    because i am working on a desktop app, i don't have a container.So i can't use a JNDI provider;
    but i want to use proxool or dbcp connection pool instead of toplink's connection pool.
    how can i handle this?
    thx for your help

    Define a SessionCustomizer that assigns your data source::
    public class MySessionCustomizer implements oracle.toplink.tools.sessionconfiguration.SessionCustomizer {
        public void customize(Session session) throws Exception {
            session.getLogin().setConnector(new oracle.toplink.jndi.JNDIConnector(myDataSource));
    }Pass it to createEntityManagerFactory method as a property
    Map props = new HashMap();
    props.put("toplink.session.customizer", "MySessionCustomizer");

  • How to use a third party automation server

    I would like to use the methods of another application. The application exposes the methods through an automation server. How can I use this automation server in Labview?
    Do or do not, there is no try

    Well, I am referring specifically to an application called RapidFET from FetCorp. The rapidFet probe is a box they sell that allows the user to access (SRIO) networks, "serial rapid IO". There is a large API with many methods that can used with SRIO and once you start the application I guess they run a automation server that exposes the methods for use in programs written in languages like visual basic, visual c++ and others; is that considered active x?
    Do or do not, there is no try

  • Plz suggest me How to use Third party jar files in ODI

    Hi all,
    I need to know how to use the third party jar files or our own customised jar file in ODI.
    regards
    palash

    Hi all,
    I am unable to implement..................
    I have one question, if I add any type 4 coneection supported jar file in my ODI_CLASSPATH can I use them in writing procedure to connect Databases
    I am trying to connect Oracle database by putting Ojdbc14.jar in the class path of ODI_CLASSPATH so that in my procedure I can use it .............but failed I dont know how to solve this problem.
    another thing Open Tools are delivered as a Java package (.zip or .jar) containing several files:
    A compiled Java .class file
    Other resources, such as icon files is it so ..............Then I can use full java apllication by preparing required bunch of classes and by set them appropriately in open tool
    need ur suggestion....
    regards
    palash

  • Where should the third party JAR files be placed ?

    Hi,
    We have a requirement to perform encryption / decryption of supplier bids. In this case we require to use third party provider JAR files with OA framework code. Where should the JAR files generally be placed in such a scenario ?
    Thanks and Regards,
    Sandhya

    Checkout this post.
    How to inclue a third party .jar file in OA fwk classpath Class not found

  • Problems with the ActiveX bridge for Java beans when using third-party .jar

    I encountered the following problem when using the ActiveX bridge for a java bean:
    I am using JDK 1.4.2_09 and MS Visual Basic 6.0 (SP6). I wrote a java bean called ProcessViewer (my class ProcessViewer inherits from JComponent and implements the interfaces Serializable and AdjustmentListener) which I would like to use within a VB 6.0 application. I used the ActiveX bridge (packager.exe) to generate a DLL (ProcessViewer.dll) and registered it successfully. The java bean GUI-control works fine within my VB 6.0 application unless my java bean (ProcessViewer.jar) uses any third-party .jar files.
    But when I tried to add a reference to some third-party class (com.sap.xxx.xxx....) I got some problems. I could solve the problem with packager.exe by setting the correct CLASSPATH. But at runtime my VB 6.0 application does not work. It crashes or it reports an error like this: "The control ... could not be loaded from axbridge.dll" (although I deployed my .jar file correctly to the directory C:\Programme\Java\j2re1.4.2_09\axbridge\bin and lib). Setting the CLASSPATH environment variable before calling my VB 6.0 application (exe) did not solve the problem.
    How can I teach my VB 6.0 application (containing the Java bean ActiveX control) where to find the third-party .jar file? Copying the third-party .jar file to the JRE lib-folder or to the axbridge\lib folder did not solve the problem either.
    I studied the documentation about the ActiveX bridge given at:
    http://java.sun.com/j2se/1.4.2/docs/guide/beans/axbridge/developerguide/index.html
    but I am missing informations on how the third-party .jar files can be found during runtime of the ActiveX container (e. g. a VB 6.0 application).

    See how to solve your problem with JNI:
    http://codeproject.com/cpp/OOJNIUse.asp
    More examples (for SWING) in tools setup:
    http://www.simtel.net/product.php[id]95126[SiteID]simtel.net
    http://www.simtel.net/product.php[id]94368[SiteID]simtel.net
    http://www.simtel.net/product.php[id]93174[SiteID]simtel.net

  • Create a JAR including third party JARS

    How can I export my project into a JAR file also including the third party JARs being used from my application (project)?
    I think Eclipse does not support this, does it?
    The problem is, that when I export my project into a JAR and then manually put the required JARs into the JAR using WinZip I do get such an Exception:
    java.lang.NoClassDefFoundError: oracle/ucp/jdbc/PoolDataSourceFactory
    In my project I have a class (Runner.java) with a main method which the user can invoke from command line. Furthermore I have a GUI also with a main method which internally invokes Runner.java. How can I start either of themain methods/classes both in the same JAR?
    Thank you.

    hi, i have a question.
    i have an application that uses different third party
    jars. For the moment i make my jar like this :
    a) i include all my third party jars (it is working)
    or is it better to
    b) include the jars in the jnlp file
    this is best, leaving the third party jars alone.
    if b is better should i :
    b1) link to them to another jnlp file, like this :
    <extension name ....
    If you app needs all-permissions, it is best to do it this way, you can, for example, sign your jar, and then ask for all-permissions in the main jnlp file, then not ask for all-permissions in the extension jnlp file. Or you can ask for all-permission in the extension as well, if the third party jars are signed, and need all-permissions to run properly.
    or
    b2) just put them as resources
    if you don't need all-permissions anywhere, this is easiest.
    If you do need all-permissions everywhere, you could also do this, but you would need to sign the third party jars with the same certificate chain as you signed your jar.
    If the third party jars are allready signed by the third party, or if all-permissions are only needed in some of the jars, the b1 is beter.
    >
    Another question :
    i sign my jar, but can't access the local file
    system. if i use solution a from above, do i have
    also to sign the jars that i include in my jar...
    You need to add :
    <security> <all-permissions/> </security>
    to your jnlp file. In that case, all the jars listed as resources in that jnlp file need to be signed, and by the same certificate.
    for solution b i think i will have to sign all the
    jars... right ?
    yes
    Thx for your help/Andy

  • Best format to export in order to encode using a third party tool?

    Hello,
    I am trying to export a movie I cut. I want to have a high quality uncompressed file that I can transcode using a third party app (which I've had better luck with than AME). So far I have tried AVI's with 100 quality, no compression, RLE, and they look terrible. FIle size is not an issue at this point. Its a 3 minute clip that looks horrible and blocky and 2 gigs large. Sorry I am still learning premiere.

    Well I have been encoding clips for web since CS3. At the time I was trying
    to encode h.264 mp4's or quicktimes from premiere or from after effects.
    Perhaps I wasn't setting the encoding right but I was getting relatively
    larg files and or disappointing quality encodes. I then learned to export a
    quicktime with animation codec, at high quality, and transcode it using MPEG
    streamclip or Handbrake. They did a superb job and I had an easier time and
    a lot of control with the  h264 settings in these programs. It was just an
    extra step.
    Now that I am on CS5, its actually the first time I use Adobe Media Encoder.
    So perhaps it does a good job, and I just haven't figured it out yet. I am
    testing out some settings at the moment, trying to find a similar
    configuration from Handrake, to see how AME handles it, because if it works
    well it would be sweet.
    Oh and I realized that to export clean AVI I needed to use microsoft
    uncompressed AVI with uyuv. The other AVI settings looked horrible. Is that
    what people send to tape?
    Edit:
    I have taken and transcoded an uncompressed AVI clip at 720x480 using AME's h264 and then taken the same clip into Handbrake to compare results. It was hard to assign similar H264 quality settings as the options in AME are very basic. You can basically choose Variable bit rate or Constant bit rate, and then ascribe a target bit rate. And that seems to be about it. In handbrake, the codec settings are much more granular. So I set off to create an encode that would have the same file size. Here are my results:
    In AME I ended up with a 46 mb clip (it is over 3 minutes long) that looked pretty good. The render time was HALF of Handbrakes. With Handbrake, my clip was 45 mb, and it looked about the same as the AME clip, except that when there was a lot of fast movement on screen, the image quality was better, less blocky. While I really appreciate the speed from AME, the extra 2 minutes it took to transcode in Handbrake are worth the extra image quality and high end finish. It is hard to tweak the setting much more, in the absence of options inside of AME. Again, Handbrake is made to encode h264 from the ground up, and I also recognize that AME can be very useful in encoding other formats as well. Unless someone can show me otherwise, I think Handbrake will get you a better h264 encode than AME.

  • Best way to make a jar with third party jars

    hi, i have a question.
    i have an application that uses different third party jars. For the moment i make my jar like this :
    a) i include all my third party jars (it is working)
    or is it better to
    b) include the jars in the jnlp file
    if b is better should i :
    b1) link to them to another jnlp file, like this :
    <extension name ....
    or
    b2) just put them as resources
    Another question :
    i sign my jar, but can't access the local file system. if i use solution a from above, do i have also to sign the jars that i include in my jar...
    for solution b i think i will have to sign all the jars... right ?
    Thx for your help

    hi, i have a question.
    i have an application that uses different third party
    jars. For the moment i make my jar like this :
    a) i include all my third party jars (it is working)
    or is it better to
    b) include the jars in the jnlp file
    this is best, leaving the third party jars alone.
    if b is better should i :
    b1) link to them to another jnlp file, like this :
    <extension name ....
    If you app needs all-permissions, it is best to do it this way, you can, for example, sign your jar, and then ask for all-permissions in the main jnlp file, then not ask for all-permissions in the extension jnlp file. Or you can ask for all-permission in the extension as well, if the third party jars are signed, and need all-permissions to run properly.
    or
    b2) just put them as resources
    if you don't need all-permissions anywhere, this is easiest.
    If you do need all-permissions everywhere, you could also do this, but you would need to sign the third party jars with the same certificate chain as you signed your jar.
    If the third party jars are allready signed by the third party, or if all-permissions are only needed in some of the jars, the b1 is beter.
    >
    Another question :
    i sign my jar, but can't access the local file
    system. if i use solution a from above, do i have
    also to sign the jars that i include in my jar...
    You need to add :
    <security> <all-permissions/> </security>
    to your jnlp file. In that case, all the jars listed as resources in that jnlp file need to be signed, and by the same certificate.
    for solution b i think i will have to sign all the
    jars... right ?
    yes
    Thx for your help/Andy

  • Third Party Jars

    Hi folks,
    Just wondering if anyone has used any third party jars in conjunction
    with your applications. If so where do U put it....I tried putting in the
    lib directory as well as a startup class, but my application just doesn't
    pick it up. Anyone has any ideas ? Thanks for the help
    Len

    Hi Lennard,
    You have to put all these jars in the iAS classpath. To do that open
    kregedit, then,
    Application Server-> 6.0->java->classpath.
    Add the full path of the 3rd party jars here and rerun the application.
    Please get back, if it helped you or if you have any questions further.
    Thanks,
    Rakesh,
    Developer-Support Team, iAS.
    Lennard Low wrote:
    Hi folks,
    Just wondering if anyone has used any third party jars in conjunction
    with your applications. If so where do U put it....I tried putting in the
    lib directory as well as a startup class, but my application just doesn't
    pick it up. Anyone has any ideas ? Thanks for the help
    Len

  • How to Deploy the third party EJB 3.0 jar in web application

    I have a web application which calls services provided by EJB 3.0 beans packaged in third party jar. How do a configure the ViewController project to deploy the beans to the weblogic server when I run the application rather than deploy the EJB ear as a stand application to the server?
    The jar file has already referenced by the project. In the "EJB Module" of project properties I've set the EJB Version property to 3.0, but the Annotated EJB 3.0 Bean Classes list remains empty, presumably because I have no beans defined in the sources of the application. When running the project the EJB jar did not deploy automatically. Is there something wrong? How can I achive this goal?
    Best Wishes~
    ELeven.Xu
    IDE: JDeveloper 11g (11.1.1.2.0)
    OS: Linux

    I don't think this technique will work. I added a META-INF/ejb-jar.xml file to the application, and added a <session> section for one of the EJB 3.0 beans from my third party jar. I specified values for <ejb-name>, <ejb-class>, and <session-type> hoping the rest of the configuration would be determined from the annotations in the class. When the server starts, this warning message is displayed:
    Oct 30, 2009 12:06:41 PM com.evermind.server.ejb.logging.EJBDeploymentMessages warningSessionBizInterfaceNotDefined
    WARNING: \[current-workspace-app: ... \] - The session bean does not has at least one business interface defined for client access. The bean is not accessiable and usable at runtime.
    Ready message received from Oc4jNotifier.
    Embedded OC4J startup time: 11042 ms.
    \[sic\]
    EJB 3.0 beans are not required to define business interfaces, as they are supposed to be generated by the container.
    Good idea, but still cannot deploy beans from the third party EJB 3.0 jar referenced by my project to the embedded OC4J container. Still investigating.
    Thanks,
    Steve
    By the way, I have been able to use your technique to deploy EJB 2.1 beans from third party jars in other projects, just not EJB 3.0 beans that do not provide ejb-jar.xml deployment descriptors, nor business interfaces.
    Edited by: user10375549 on Oct 30, 2009 9:51 AM - Added relevant comment regarding technique described for solving problem. It works for EJB 2.1 beans but not EJB 3.0 beans.

Maybe you are looking for

  • Time Machine not recognizing seagate back up plus external hard drive

    Please somebody save me!!! My computer was running really slow and decided to take in to the Apple store.  They recommended that i needed a new a hard drive.  I've beeen using the Seagate back up plus model srd0sd0 3tb drive and before i disconnected

  • How do I use the commands to start and restart the jmqbroker normally?

    How do I use the commands to start and restart the jmqbroker normally? Because I have tried to use "jmqcmd shutdown bkr" and then tried to type "jmqbroker" to start up. My screen hangs up and seems that the process hangs up. The message is [28/Jun/20

  • Forcing HTTP comm between BPEL and ESB

    Hi all, for demo purposes, I'd like to disable the internal and non-HTTP communication between BPEL and ESB when both are deployed on same OC4J container. I do not want to modify any WSDL but, if possible, disable somehow such internal communication.

  • Significance of XML_Flag in PO_HEADERS_ALL

    Hello Friends, I am facing an issue , where user reported that some PO's are not going to supplier. When i checked for those PO's , they belong to one supplier and for all of them XML_Flag is 'N'. I want to understand the siginificance of XML_Flag. H

  • Restrict users from editing and deleting not owned items

    Hello guys. I'm trying to restrict users from editing and deleting items created by other users. I know, that it can be achieved by using SPList.WriteSecurity parameter, but if I change its value to 2 or 4 - nothing happens...  May be there are some