How to include libraries properly in an application

Hello,
I am working on a project that uses an external device.
I installed software for this device that includes drivers and libraries (.dlls) to be used with LabView.
To communicate with the device, I use the "create Active-X object" block.
As the Active-X input, I create a new input and pick the right class from the drop down list.
This does not add any dll files to the dependencies of the project.
LabView seems to be assuming that the necessary files are there.
I want to install this application on another computer that does not necessarilay have the software for the device installed.
My application fails. There's no error message of any missing library whatsoever.
I have to add the necessary libraries manually.
How should I do this?
1) I could add the library files to the project directly.
2) I could add the library files to the installer off my application, so that they are properly installed along with my application.
I'm not sure how to do this.
How do I tell the installer to install* the library files?
(* what I mean with that is to place them in the proper folder. Sure, the application folder is also searched for dlls upon execution but that means every application has its own dll, which seems to be a bad approach)
3) I could add the Redistributable .exe file to the installer of my application as an installer.
I'm not sure how to do this either.
Should I add the .exe file to the project, copy it to some location(which one?)  during installation and then execute that file after the installer finished?
Or should I add this installer to the list of "additional installers"? It seems like one can only add NI installers. How do I add mine?
Or is there another way I should do this?
Thank you for your help.
Solved!
Go to Solution.

Nope, files in Temp are not automagically deleted by default. What you could do instead is either invoke the installer directly from your install media using a relative path or you could write a good 'ol batch file and invoke that instead at the end of your installer. This would start the actual driver installer and wait for it to finish. Then cleanup whatever needs to be cleaned up afterwards.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions

Similar Messages

  • How to include resource files in the application and how to retrieve ?

    Hi,
    I want to include resource file in my application jar file and retrieve data from the file ......Is there any way for it? How i create these resources files and how i include them?.........Which classes shall i use for retrieving the data from these files?.........Any kind of help would be appreciated........Iam using NetBeans IDE 6.1,CLDC1.0 and MIDP 2.0........Thanx,in advance..........

    How i create these resources files and how i include them?How you create the files will depend on what resources you need to include.
    [How to ask questions the smart way|http://catb.org/~esr/faqs/smart-questions.html]
    db

  • How to include another msi with LV application builder?

    I can use LV application builder to create an installer for my application. But my application relies on a 3rd part msi, which should be run after my application is installed.  So how to include this msi with LV app builder? Thanks in advance.

    I would recommend executing a batch file that launches your other installers after your LabVIEW executable finishes installing. The process of doing this (in addition to other suggestions about including 3rd party installers) can be found in the Knowledgebase linked here.
    Kind Regards,
    E. Sulzer
    Applications Engineer
    National Instruments

  • How to configure libraries seperately from the application in the server

    Hi,
    As per my knowledge we need not keep all the external libraries required for an application with in the application libraries, rather we can copy them inside the server libraries so that at run time the server will find and use them to run your application. I tried this principle in container like tomcat and it worked for me.
    My basic intention here was the size of the EAR file (particularly in weblogic) for my application. its growing big when i use third party utilities and the biggest problem i faced is sending this ear file to deployment team everytime i create a new one...this is hell in my case (unfortunately).
    Is there a way i can copy these libraries inside the server path (any path) so that the server will find them at run time? Or setting any classpath to server...etc
    Please suggest me few options?
    Many thanks
    Govind

    The best way to do this under WLS is to use WebLogic Shared Libraries facility. You can read about this in these docs pages:
    http://e-docs.bea.com/wls/docs92/programming/libraries.html
    - Konstantin

  • How to include jsps's of one application into another

    Hi people,
    I want to include a jsp from one web application into another. I have specified in the web.xml in Tomcat/conf directory that both the applications are "crosscontext=true". But tomcat fails to include the jsp from the other web application. It always tries to look for that resource with respect to the context of the current application.
    Any idea how do I go about it. Any suggestion will be greatly appreciated.
    Thanks,
    Subhadeep De.

    In the standard Sun JSTL tag library there is a tag that will include the output of the jsp in your jsp. I beleive the tag is called "include" or "import" but I forget the exact name. I also believe that you'll have to pass any needed parameters.

  • How to include page fragment for JSF application deployed on WebSphere?

    Hi all,
    I have the following urgent JSF problem, I hope that you can support me in solving it;
    - I have JSF application need to be deployed on IBM WebSphere 6.0.1 Application Server.
    - I have the tag:
    <jsp:directive.include file="Actions.jspf"/>
    which includes a page fragment.
    - This is working file with Tomcat 5.5 & Sun Application Server 9, but it didn't work on WebSphere and each time the page fragment contents rendered as text, I mean that the JSF components in the fragment doesn't converted to html controls.
    Please help...
    Message was edited by:
    AHmadQ

    We use:
    <%@ include file="../WEB-INF/jspf/head.jspf" %>where the head.jspf is a jsp fragment like:
    <% response.addHeader("Cache-Control", "no-cache"); %>
    <% response.addHeader("Pragma", "no-cache"); %>
    <% response.addIntHeader("Expires", -1); %>
    <html>
    <head>
         <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
         <meta http-equiv="Pragma" content="no-cache" />
         <meta http-equiv="Expires" content="-1" />
         <title><%= pageTitle %></title>
         <link href="../style/style.css" rel="stylesheet" type="text/css" />
    </head>Cheers,
    Illu

  • How to Include libraries (Jar's/Packages/ClassNotFoundException/Classpath)

    Ive spent hours looking for a solution, So maby i making a simple human error which i cant find.
    Im unfamiliar with using packages.
    I have created a program that use the JDBC libary. However i need to distribute this program and keep getting a ClassNotFoundException which is throw by:
    String s = "com.mysql.jdbc.Driver";
    Class.forName(s);I would like to have the "mysql-connector-java-bin.jar" file inside my main jar file However I think this may be very complex so i assume it would be easier to have it in the same directory as the main jar file.
    I create my main jar file with:
    jar cmf mainClass.txt Main.jar *.class mysql-connector-java-bin.jarI also jarsigner but i wouldn't expect this to case this problem.
    mainClass.txt
    Main-Class: MyClassFile
    Class-Path: mysql-connector-java-bin.jar
    Sealed: trueAny ideas what im doing wrong? or How i could solve this problem?
    Do i need to write a program which installs the JDBC on their system?
    Is there an easy solution?
    Any advice would be greatly appriacted.
    Thanks,

    ty for the reply
    I now create my jar file with:
    jar cmf mainClass.txt Main.jar *.classand the "mysql-connector-java-bin.jar" is still in same directory as my main.jar file
    Ive also replaced the "mysql-connector-java-bin.jar" to make sure it hasnt been corrupted somehow.
    However i still get the same error.
    the stackTrace is:
    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClassInternal(Unknown Source)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Unknown Source)
            at SQLConnection.<init>(SQLConnection.java:18)SQLConnection a class i have created.and the lines 17 and 18 are posted in my first post.
    Anyideas?

  • How to include md5 package in application

    Hi All,
    First of all sorry I posted in another users thread. In the thread http://forums.sun.com/thread.jspa?threadID=5426671 the person used org.bouncycastle.crypto.digests.MD5Digest for doing md5.
    I need some help here on how you include the org.bouncycastle.crypto.digests.MD5Digest library in my java code as I want to use the md5.
    I am also working on something similar like that but without the web application part and a detail which consists on OTP part using md5.
    As the md5() doesn't work in j2me so was also searching for something which will work on MIDP.
    package com.abc; //package define
    public class messDig5 //class define
        private String generateHash(String OTP, int loopNum) {
            byte[] secretBytes = OTP.getBytes();
            for (int x = 0; x < loopNum; x++) {
                byte[] tempStore = new byte[16];
                tempStore = hash(secretBytes);
                secretBytes = tempStore;
         //   return convertToHex(secretBytes);
            return byteArrayToHexString(secretBytes);
        public byte[] hash(byte[] secretBytes) {
           org.bouncycastle.crypto.digests.MD5Digest digest = new org.bouncycastle.crypto.digests.MD5Digest();
            digest.reset();
            // Update MD5 digest with user secret in byte format
            digest.update(secretBytes, 0, secretBytes.length);
            // get length of digest to initialise new md5 byte array
            int length = digest.getDigestSize();
            // create md5 byte array using length
            byte[] md5 = new byte[length];
            // calculate MD5 hash, using md5 byte array, 0 for buffer offset
            digest.doFinal(md5, 0);
            return md5;
    //    private static String convertToHex(byte[] data) {
    //        StringBuffer buf = new StringBuffer();
    //        String Hex;
    //        String formattedHex;
    //        for (int i = 0; i < data.length; i++) {
    //            int halfbyte = (data[i] >>> 4) & 0x0F;
    //            int two_halfs = 0;
    //            do {
    //                if ((0 <= halfbyte) && (halfbyte <= 9)) {
    //                    buf.append((char) ('0' + halfbyte));
    //                } else {
    //                    buf.append((char) ('a' + (halfbyte - 10)));
    //                halfbyte = data[i] & 0x0F;
    //            } while (two_halfs++ < 1);
    //        Hex = buf.toString();
    //        formattedHex = "\n" + Hex.substring(0, 4) + " " + Hex.substring(4, 8) + " " + Hex.substring(8, 12) + " " + Hex.substring(12, 16) + " " + Hex.substring(16, 20) + " " + Hex.substring(20, 24) + " " + Hex.substring(24, 28) + " " + Hex.substring(28, 32);
    //        return formattedHex;
        static String byteArrayToHexString(byte byteValues[]) {
            byte singleChar = 0;
            if (byteValues == null || byteValues.length <= 0) {
                return null;
            String entries[] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
                "a", "b", "c", "d", "e", "f"};
            StringBuffer out = new StringBuffer(byteValues.length * 2);
            for (int i = 0; i < byteValues.length; i++) {
                singleChar = (byte) (byteValues[i] & 0xF0);
                singleChar = (byte) (singleChar >>> 4);
                // shift the bits down
                singleChar = (byte) (singleChar & 0x0F);
                out.append(entries[(int) singleChar]);
                singleChar = (byte) (byteValues[i] & 0x0F);
                out.append(entries[(int) singleChar]);
            String rslt = new String(out);
            return rslt;

    Camellia,
    I take you already added bouncycatsle to your project as a compile dependency, since it compiles (unless it does not).
    All you have to do for your code to work on the phone, you need to build your JAR file (that you use to distribute your MIDlet) with bouncycastle packaged in. This will all depend on the method you use to build your JAD and JAR files.
    I use antenna tool, which provides me with ant tasks to compile, build jar, package external libraries etc. Your scenario can be different, but all you have to do is to search manuals and/or google for methods on how to package external libraries with your build.
    Daniel

  • Adobe Creative Cloud (Desktop) does not work properly. The application is blocked : it could not be launch neither stopped. I'm on MAC Yosemite OS, does anyone know how to remove it properly or to force its stop. It does not appear in the launched applica

    Adobe Creative Cloud (Desktop) does not work properly. The application is blocked : it could not be launch neither stopped. I'm on MAC Yosemite OS, does anyone know how to remove it properly or to force its stop. It does not appear in the launched applications.

    I received no error message. The application was just trying to find applications unsuccessfully.
    I am using MAC OS 10.10.1
    I tried to uninstall the application  but it seems that a kind of deamon is still installed thus providing me to reinstall properly. Do you know where are the elements to remove in order to get my machine just like before ?
    Otherwise I would have to reinstall everything and this would be a pain.
    Thanks for your help.

  • My computer was hacked I had to install an earlier version of the disc provided for my mac and I have lost all of my applications already existing on my mac including iPhoto, and all other application. I am wondering how to get them back? I am in Japan

    My computer was hacked using a softbank pocket wifi, I had to install an earlier version of the disc provided for my mac reset my user password and I still need to recover my administrator password that was altered. I have lost all of my applications already existing on my mac including iPhoto, and all other applications. I am wondering how to get them back? I am in Japan and I have proof of purchase in my iTunes, but on my computer all the allplications are blocked. I have no idea what to do to get them back. It is very annoying.
    Thank you for your help.
    Erika K.

    Reinstall from the original source - the restore disks that came with the computer or from the App store if the computer did not come with disks
    LN

  • How to include custom application.xml in JDev9i project

    Can anybody explain to me how to include a custom application.xml file when deploying to an .ear file? I need to include application wide security roles, and I can't see where in Jev9i how to do this.
    After searching this forum, I see that jdev9i can't include the orion-application.xml, but I want to include just the standard J2EE application.xml. Is this possible?
    Thanks,
    matt

    The standard application.xml file unfortunately can't be customized in JDev 9.0.2. The reasons why this capability was left out of JDev 9.0.2 are same reasons why the other EAR-level XML files were excluded. The OTN thread
    Re: Regarding 11i and E-business suite
    has a summary of those reasons, which you've probably seen. We know this is an area in need of improvement and will be adding this functionality in the JDev 9.0.3 release. Until then, you'll have to go with a work-around like an Ant build file, batch file, Java application, or some other kind of script.
    Below is a sample Java application which can be used to insert <security-role> elements into an EAR file's application.xml. Modify the main() method to customize for your purposes, and put xmlparserv2.jar on the classpath (in a JDev project, add the "Oracle XML Parser v2" library):
    package mypackage4;
    import java.io.*;
    import java.util.*;
    import java.util.zip.*;
    import oracle.xml.parser.v2.*;
    import org.w3c.dom.*;
    import org.xml.sax.SAXException;
    public class PostProcessEAR
    public static void main( String[] args ) throws IOException
    final String earFile = "C:\\temp\\myapp.ear";
    final PostProcessEAR postProcess = new PostProcessEAR( earFile );
    postProcess.addSecurityRole( null, "first_role" );
    postProcess.addSecurityRole( "Description for the second role", "second_role" );
    postProcess.commit();
    System.out.println( "Done." );
    private final File _earFile;
    private final ArrayList _securityRoles = new ArrayList();
    public PostProcessEAR( String earFile )
    _earFile = new File( earFile );
    public void addSecurityRole( String description, String roleName )
    if ( roleName == null )
    throw new IllegalArgumentException();
    _securityRoles.add( description );
    _securityRoles.add( roleName );
    * Write out modified EAR file.
    public void commit() throws IOException
    if ( _securityRoles.size() == 0 )
    return;
    final ZipFile zipFile = new ZipFile( _earFile );
    final Enumeration entries = zipFile.entries();
    final File outFile = new File( _earFile.getAbsolutePath() + ".out" );
    final ZipOutputStream out = new ZipOutputStream( new BufferedOutputStream( new FileOutputStream( outFile ) ) );
    while ( entries.hasMoreElements() )
    final ZipEntry entry = (ZipEntry) entries.nextElement();
    final InputStream in = zipFile.getInputStream( entry );
    if ( "META-INF/application.xml".equals( entry.getName() ) )
    final XMLDocument modifiedApplicationXml = insertSecurityRoles( in );
    final ByteArrayOutputStream byteOutput = new ByteArrayOutputStream();
    modifiedApplicationXml.print( byteOutput );
    final int numBytes = byteOutput.size();
    entry.setSize( numBytes );
    if ( entry.getMethod() == ZipEntry.STORED )
    entry.setCompressedSize( numBytes );
    final CRC32 crc32 = new CRC32();
    crc32.update( byteOutput.toByteArray() );
    entry.setCrc( crc32.getValue() );
    out.putNextEntry( entry );
    byteOutput.writeTo( out );
    else
    // Copy all other zip entries as they are.
    out.putNextEntry( entry );
    copy( in, out );
    in.close();
    out.close();
    private XMLDocument insertSecurityRoles( InputStream in ) throws IOException
    final DOMParser domParser = new DOMParser();
    domParser.setAttribute( DOMParser.STANDALONE, Boolean.TRUE );
    try
    domParser.parse( in );
    final XMLDocument doc = domParser.getDocument();
    final Element docElem = doc.getDocumentElement();
    final Iterator iter = _securityRoles.iterator();
    while ( iter.hasNext() )
    final String desc = (String) iter.next(); // might be null
    final String roleName = iter.next().toString(); // must not be null
    final Element securityRoleElem = doc.createElement( "security-role" );
    if ( desc != null )
    securityRoleElem.appendChild( createPcdata( doc, "description", desc ) );
    securityRoleElem.appendChild( createPcdata( doc, "role-name", roleName ) );
    docElem.appendChild( securityRoleElem );
    return doc;
    catch ( SAXException e )
    e.printStackTrace();
    return null;
    private Element createPcdata( XMLDocument doc, String elemName, String pcdata )
    final Element elem = doc.createElement( elemName );
    elem.appendChild( doc.createTextNode( pcdata ) );
    return elem;
    private final byte[] buffer = new byte[4096];
    private void copy( InputStream in, OutputStream out ) throws IOException
    while ( true )
    final int bytesRead = in.read( buffer );
    if ( bytesRead < 0 )
    break;
    out.write( buffer, 0, bytesRead );

  • How to include html page or html code in adobeflex 4 web application please give me a solution.

                     How to include html page or html code in adobeflex 4 web application please give me a solution.
                       Thank you
                       Chandra Sekhar

    hi,
    go thru this link, may be of some help for you
    About IFrames
    http://www.deitte.com/archives/2006/08/finally_updated.htm
    IFrame Src
    http://code.google.com/p/flex-iframe/
    About the IFrame Approach
    http://www.deitte.com/archives/2008/07/dont_use_iframe.htm

  • How to include help file in application

    Hello,
    i developed an application using java swing. i need to include help file in my application. How to include it?
    Thanks,
    Sri

    Hi Sri,
    Use Java Help....
    There is some thing called as Help set. In a button action listener u have to call that.
    HelpSet helpSet = getHelpSet("path");
    HelpBroker helpBroker = helpSet.createHelpBroker();
    CSH.setHelpIDString (jButton,"filename");
    jButton.addActionListener(new CSH.DisplayHelpFromSource(helpBroker));
    Regards,
    Kumar

  • How can i fix the Error "The application failed to initialize properly (0xc00001d)...."

    How can i fix the error "The application failed to initialize properly(0xc00001d). Click Ok to terminate the application"?
    I've tried to re-install twice the program and also restarted my PC several times and it still shows this error whenever i try to run it.

    Read the other threads on the same topic, or just install the 12.0.1 update.

  • How to include required hardware drivers (eg Agilent E5515C) to installer?

    Please advice how to include the reqiured instrument driver to the installer?

    Hi Eva,
    Many instrument drivers that are specifically for LabVIEW are simply a group of VIs. Most of the time, when you use these VIs in a project, they are automatically included under Dependencies. LabVIEW should add only the VIs you used in your project and you can see what gets added by expanding Dependencies.
    I’m not sure about the E5515C, but if it is similar to most drivers for Agilent equipment, you can probably manually add the libraries (.LLB) to the project under My Computer. By dragging and dropping a .LLB on My Computer in your project, you should see a folder created and that folder should contain all the VIs in that .LLB. These can then be set as source files in the installer and will be place on the target machine.
    Finally, if your ultimate goal is to have the instrument driver installed on the target machine in the same way as it is on your development machine, this is probably best left as a separate install. The information in the two above paragraphs is relevant to simply distributing a working application not recreating a development environment.
    Charlie M. CLD

Maybe you are looking for

  • Photoshop Elements 11 with Windows 8 64 bits

    I have seen that Photoshop Elements 11 and Premiere Elements 11 are compatible with Windows 8.1; is that correct also for Windows 8.4 64 bits or only for the 32 bits version? Thank you. MM

  • Tomcat 4.1.x not working under JDK 1.2.2

    We are trying to test our web application on all versions of JDK starting from 1.2.2. We use Tomcat as the servlet engine and after upgrading from Tomcat 3.2.x to 4.1.24 (we've tried 4.1.18 as well) we have noticed that the new Tomcat does not start

  • Change date format from DD.MM.YYYY to DD.MM in query

    Hi, In one partical query/web application we would like to change the display format of 0CALDAY from 01.01.2010 to 01.01 (without the year) because the data is in the columns and the analysis grid therefore is too wide. Changing this via SU01 is not

  • I can't sync my ipod, it's stuck on the second step

    when i plug my ipod in and try to sync the music i get from cd's, my ipod gets stuck on the 2nd step of the syncing process. I always get an error message that says to reconnect or try again later because the syncing services aren't working. pleeeeea

  • How to make connection to ORACLE 7.1.6

    Hi, May I have suggestions on how to make connection to ORACLE 7.1.6 on UNIX box? Thank you very much for help! Jane