How to include JAR file in NetBean library?

i have downloaded JavaMail jar file and now i want to include this file into NetBean library. pls help me out.

You can add the jar file to Netbeans as an external library by choosing 'Tools' on the menu bar and then selecting 'Library Manager'. In there you can give it a name and the path to the jar file. Once it is setup, if you go to your project properties, and click the 'Libraries' option on the left you will be able to add it. Select 'Add Library' and choose the one that you just created, it will now be part of your project.
Alternatively, if you don't want to set it up as a library in Netbaeans, go straight to the project properties, select 'Libraries' and then select the 'Add Jar/Folder' option, now you can navigate to your jar file and add it to your project.
For other info about JavaMail: http://java.sun.com/products/javamail/FAQ.html#install

Similar Messages

  • How to include .jar files in coldfusion code 

    To Integrate our cfm code with paypal jar files we do the
    following steps with our local coldfusion server ,and to run and
    integrate the paypal Java SDK jar files, I think we need to do the
    same process on the server, can you suggest any thing to do the
    following setting for my domain on the server, without setting the
    class path in coldfusion administrator.
    The ColdFusion application server must be configured to know
    the location of the PayPal JAR
    files, and your ColdFusion Markup (CFM) pages must be
    configured with the absolute path to
    the PayPal API certificate for the PayPal API user on whose
    behalf the calls are made.
    1. Install the PayPal Java SDK “Installing the
    SDK”.
    2. Copy a subset of the Java SDK JAR files to a location
    accessible by the ColdFusion
    application server. The JAR files are in SDK_root\lib and
    their exact names are as
    follows:
    – bcmail-jdk14-128.jar
    – bcprov-jdk14-128.jar
    – paypal_base.jar
    – paypal_stubs.jar
    sax2.jar
    – xerces.jar
    – xpp3-1.1.3.4d_b4_min.jar
    – xstream.jar-1.1.3.jar
    3. With the ColdFusion Application Server Administrator, add
    the absolute path of the
    location you determined in Step 2 to the Java and JVM
    CLASSPATH environment variable.
    4. Restart the ColdFusion Application Server.
    Suggest me how to include .jar files without setting
    classpath.

    > Suggest me how to include .jar files without setting
    classpath.
    Copy them to {CF_HOME}\lib, where {CF_HOME} is, for example,
    C:\CFusionMX7. Restart Coldfusion.

  • How to include jar files in jdk1.7

    Please can anybody tell me that how can i include jar files in jdk1.7

    You mean to add a library in NetBeans? If so, click here

  • How to include JAR file as package

    I am trying to code for passing data from an Applet to javascript. It appears the preferred method involves a package netscape.javascript to include support for the JSObject class. found a download of a jar file which contains this package. I am using Sun Creator and JCreator but dont know where to or how to install this package to be available to the compiler. Sorry for the beginner level question but any help is greatlyt appreciated. TIA

    You need to create a project and add the jar to the classpath. Then you can import the required libraries.

  • How to include jar file ??

    Hi,
    I want to use some classes from a .jar file in my application. In NT I
    have placed the .jar file in ....iplanet/ias6/ias/lib/java and included
    the path in CLASSPATH variable in .../iplanet/ias6/ias60/lib/IAB .
    I am facing problem in doing the same in Sun Solaris. Can anyone tell me
    where to place the .jar file and how to set the path ? I am using iAS
    SP2 in Sun Solaris.
    Look forward for a reply. Thanks,
    Regards,
    Brijesh

    Modify the kjs script in the .../iplanet/ias6/ias60/bin directory. Look for
    the CLASSPATH= and add your jar accordingly.
    hth
    "brijesh" <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    I want to use some classes from a .jar file in my application. In NT I
    have placed the .jar file in ....iplanet/ias6/ias/lib/java and included
    the path in CLASSPATH variable in .../iplanet/ias6/ias60/lib/IAB .
    I am facing problem in doing the same in Sun Solaris. Can anyone tell me
    where to place the .jar file and how to set the path ? I am using iAS
    SP2 in Sun Solaris.
    Look forward for a reply. Thanks,
    Regards,
    Brijesh

  • How to includ jar files?

    Hi,
    I am having jar file and iam running that jar file in command prompt using java -jar WorkFlow.jar command. I have to include some additional jar files in classpath while running this WorkFlow.jar file... Anyone please tell me how to include the jar files in java command??
    Thanks,
    Sathish

    Sathishkumar.D wrote:
    Hi,
    I am having jar file and iam running that jar file in command prompt using java -jar WorkFlow.jar command. I have to include some additional jar files in classpath while running this WorkFlow.jar file... Anyone please tell me how to include the jar files in java command??
    Thanks,
    SathishYou can't. The WorkFlow.jar you have them specified in the class path entry in the manifest file.

  • How to include jar files in ant script for compiling

    i am trying to manually include j2ee.jar for compiling, here is the entire build.xml:
    <?xml version="1.0"?>
    <!--PRIMARY build file for all of dev modual -->
    <project name="com" default="compile.all" basedir="../">
    <path id="project.class.path">
    <pathelement location="lib/"/>
    <pathelement path="${java.class.path}/"/>
    <pathelement path="${additional.path}"/>
    <pathelement path="${CLASSPATH}" />
    <pathelement path="${classpath}" />
    </path>
    <property name="SRCDIR" value="${basedir}/java" />
    <property name="DSTDIR" value="${basedir}/classes" />
    <property name="LIBDIR" value="${basedir}/libs" />
    <property name="JARDIR" value="${basedir}/jars" />
    <property name="DOCDIR" value="${basedir}/docs" />
    <property name="ORACLE.JAR" value="${LIBDIR}/orcl/8.1.7/classes12.zip" />
    <property name="JUNIT.JAR" value="${LIBDIR}/junit/3.7/junit.jar" />
    <property name="CLASSPATH" value="z:/tools/java;${SRCDIR};${DSTDIR};${JUNIT.JAR};${ORACLE.JAR}" />
    <property name="POLICYFILE" value="${SRCDIR}/com/leader/cti/main/ctimain.policy" />
    <property name="DEBUG_FLAG" value="on" />
    <property name="OPTIMIZE_FLAG" value="off" />
    <property name="DEPRECATION_FLAG" value="off" />
    <property name="RMI_VERSION" value="1.2" />
    <!-- builds everything -->
    <target name="compile.all">
    <antcall target="compile.cti"/>
    </target>
    <target name="compile.vbsf" description="Compiles files for vbsf.jar.">
    <mkdir dir="${DSTDIR}"/>
    <copy file="${SRCDIR}/VBSFELK5UD3SWQ2E.class" todir="${DSTDIR}"/>
    <javac srcdir="${SRCDIR}" destdir="${DSTDIR}" classpath="${CLASSPATH}" debug="${DEBUG_FLAG}" deprecation="${DEPRECATION_FLAG}" optimize="${OPTIMIZE_FLAG}" >
    <include name="com/objectmatter/**/*.java" />
    </javac>
    </target>
    <target name="compile.persist" description="Compiles files for persist.jar." depends="compile.vbsf" >
    <javac srcdir="${SRCDIR}" destdir="${DSTDIR}" debug="${DEBUG_FLAG}" deprecation="${DEPRECATION_FLAG}" optimize="${OPTIMIZE_FLAG}" >
    <classpath refid="project.class.path"/>
    <include name="com/leader/persist/**/*.java" />
    <include name="testcom/leader/persist/**/*.java" />
    </javac>
    </target>
    <target name="compile.cti" description="Compiles files for both cti jars." depends="compile.persist,compile.cti.only" />
    <target name="compile.cti.only" description="Compiles files for both cti jars." >
    <javac srcdir="${SRCDIR}" destdir="${DSTDIR}" debug="${DEBUG_FLAG}" deprecation="${DEPRECATION_FLAG}" optimize="${OPTIMIZE_FLAG}" >
    <classpath refid="project.class.path"/>
    <include name="com/leader/cti/**/*.java" />
    <include name="testcom/leader/cti/**/*.java" />
    </javac>
    <rmic classpath="${CLASSPATH}" base="${DSTDIR}" stubversion="${RMI_VERSION}" >
    <include name="com/leader/cti/main/RMICTIService.class" />
    <include name="com/leader/cti/main/RMIConferenceCall.class" />
    <include name="com/leader/cti/main/RMIConferenceCallReservation.class" />
    <include name="com/leader/cti/main/FakeRmiCtiService.class" />
    <include name="com/leader/cti/main/FakeRmiConferenceCall.class" />
    <!--include name="com/leader/cti/main/DerivedQueueReceiver.class"/-->
    </rmic>
    </target>
    <!-- build all dev jars -->
    <target name="jar.all"
    description="Create all jar files"
    depends="jar.vbsf, jar.persist, jar.jeti, jar.service"/>
    <!-- build vbsf.jar -->
    <target name="jar.vbsf"
    description="Create client distribution jar for vbsf code"
    depends="compile.vbsf" >
    <mkdir dir="${JARDIR}" />
    <jar jarfile="${JARDIR}/vbsf.jar"
    basedir="${DSTDIR}" >
    <include name="VBSFELK5UD3SWQ2E.class"/>
    <include name="com/objectmatter/**/*.class" />
    </jar>
    </target>
    <!-- build persist.jar -->
    <target name="jar.persist"
    description="Create client distribution jar"
    depends="compile.vbsf,compile.persist" >
    <mkdir dir="${JARDIR}" />
    <jar jarfile="${JARDIR}/persist.jar"
    basedir="${DSTDIR}" >
    <include name="com/leader/persist/**/*.class" />
    </jar>
    </target>
    <!-- build jeti.jar -->
    <target name="jar.jeti"
    description="Create client distribution jar"
    depends="compile.vbsf,compile.persist,compile.cti" >
    <mkdir dir="${JARDIR}" />
    <jar jarfile="${JARDIR}/jeti.jar"
    basedir="${DSTDIR}" >
    <include name="com/leader/cti/rmiint/*" />
    <include name="com/leader/cti/main/*Stub*" />
    <include name="com/leader/cti/util/**" />
    <include name="com/leader/cti/vru/*" />
    <include name="com/leader/cti/interfaces/*" />
    <include name="com/leader/cti/history/*" />
    <include name="com/leader/cti/autodial/*" />
    </jar>
    </target>
    <!-- build jeti_service.jar -->
    <target name="jar.service"
    description="Create the jar file for the service"
    depends="compile.vbsf,compile.persist,compile.cti" >
    <mkdir dir="${JARDIR}" />
    <copy file="${basedir}/vbsf/cti.schema" tofile="${DSTDIR}/cti.schema" />
    <copy file="${basedir}/vbsf/cti.schema" tofile="/tools/java/com/leader/osapplication/persist/cti.schema" />
    <jar jarfile="${JARDIR}/jeti_service.jar"
    basedir="${DSTDIR}" >
    <include name="com/leader/cti/**" />
    <include name="cti.schema" />
    </jar>
    </target>
    <!-- build jeti.jar, jeti_service.jar -->
    <target name="jar.cti"
    description ="Create client/server jars for cti"
    depends="jar.jeti,jar.service" />
    <!-- clean everything. -->
    <target name="clean">
    <delete dir="${DSTDIR}" />
    <delete dir="${JARDIR}" />
    <delete dir="${DOCDIR}" />
    </target>
    <target name="clean.cti" description="clean cti class files (not jars)">
    <delete dir="${DSTDIR}/com/leader/cti" />
    <delete dir="${DSTDIR}/testcom/leader/cti" />
    </target>
    <!-- Run the gui CTI tests -->
    <target name="test_cti_gui">
    <java classname="junit.swingui.TestRunner" classpath="${CLASSPATH}" fork="yes">
    <arg value="testcom.leader.cti.CTIPackageTest"/>
    <sysproperty key="leader.unique_number_generator.file" value="unique_number_generator_file_test" />
    <sysproperty key="vbsf.repository" value="/tools/java/dev/vbsf" />
    <sysproperty key="vbsf.enableGlobalCaching" value="false" />
    </java>
    </target>
    <target name="test.cti.gui"
    depends="test_cti_gui" />
    <!-- Run the text version of CTI tests -->
    <target name="test">
    <java classname="junit.textui.TestRunner" classpath="${CLASSPATH}" fork="yes">
    <arg value="testcom.leader.cti.CTIPackageTest"/>
    <sysproperty key="leader.unique_number_generator.file" value="unique_number_generator_file_test" />
    </java>
    </target>
    <!-- Run CTI service -->
    <target name="run.service"
    description="run the service normally"
    depends="compile.all" >
    <java classname="com.leader.cti.main.CTIMain"
    classpath="${CLASSPATH}"
    fork="yes" >
    <sysproperty key="java.security.policy"
    file="${POLICYFILE}" />
    <sysproperty key="config.dir"
    value="${SRCDIR}/com/leader/cti/main/" />
    </java>
    </target>
    <!-- Run fake CTI service -->
    <target name="run.service.fake"
    description="run the fake service"
    depends="compile.all" >
    <java classname="com.leader.cti.main.FakeCtiMain"
    classpath="${CLASSPATH}"
    fork="yes" >
    <sysproperty key="java.security.policy"
    file="${POLICYFILE}" />
    <sysproperty key="config.dir"
    value="${SRCDIR}/com/leader/cti/main/" />
    </java>
    </target>
    <!-- Run CTI service emulator -->
    <target name="run.service.emulator"
    description="run the service normally"
    depends="compile.all" >
    <java classname="com.leader.cti.main.CTIMain"
    classpath="${CLASSPATH}"
    fork="yes" >
    <sysproperty key="java.security.policy"
    file="${POLICYFILE}" />
    <sysproperty key="config.dir"
    value="${SRCDIR}/com/leader/cti/main/" />
    <sysproperty key="vru.propertyfile"
    value="emulator.properties" />
    </java>
    </target>
    <!-- Runs the CTI service and emulator -->
    <target name="run.emulator"
    description="run the service and the emulator"
    depends="compile.all" >
    <java classname="testcom.leader.cti.vru.emulator.VRUEmulator"
    classpath="${CLASSPATH}"
    fork="yes" />
    </target>
    <!-- Runs the gui CONCALL testss -->
    <target name="run.gui"
    description="run the concall test gui"
    depends="compile.all" >
    <java classname="testcom.leader.cti.main.SwingClient"
    classpath="${CLASSPATH}"
    fork="yes" >
    <sysproperty key="java.security.policy"
    file="${POLICYFILE}" />
    </java>
    </target>
    <!-- Fires the maptool up. Defaults to CTI`s Schema file. -->
    <target name="maptool" >
    <java classname="com.objectmatter.bsf.mapping.toolgui.MapTool"
    fork="yes"
    classpath="${CLASSPATH}" >
    <sysproperty key="vbsf.repository" value="${basedir}/vbsf" />
    </java>
    </target>
    <target name="javadoc_cti">
    <mkdir dir="${basedir}/docs"/>
    <javadoc packagenames="com.leader.*" classpath="${CLASSPATH}" sourcepath="${SRCDIR}" destdir="${DOCDIR}\cti" author="true" version="true" use="true" windowtitle="Leader CTI API" doctitle="Leader Technologies, Inc" bottom="Copyright &#169; 2005 Leader Technologies Incorporated.<BR>All Rights Reserved." maxmemory="128m">
    <group title="Leader CTI Packages" packages="com.leader*"/>
    </javadoc>
    </target>
    <target name="javadoc_vbsf">
    <mkdir dir="${basedir}/docs"/>
    <javadoc packagenames="com.objectmatter.* " classpath="${CLASSPATH}" sourcepath="${SRCDIR}" destdir="${DOCDIR}" author="true" version="true" use="true" windowtitle="VBSF by ObjectMatter API" doctitle="Leader Technologie, Inc" bottom="Copyright &#169; 2005 Leader Technologies Incorporated.<BR>All Rights Reserved." maxmemory="128m">
    <group title="Objectivity Packages" packages="com.objectmatter.*"/>
    </javadoc>
    </target>
    </project>
    i am getting this:
    compile.all:
    compile.vbsf:
    compile.persist:
    compile.cti.only:
    Compiling 1 source file to C:\Projects\Leader\dev\classes
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:14: package javax.jms does not exist
    import javax.jms.*;
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:17: package javax.jms does not exist
    import javax.jms.Queue;
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:18: package javax.jms does not exist
    import javax.jms.JMSException;
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:19: package javax.jms does not exist
    import javax.jms.Message;
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:28: cannot find symbol
    symbol: class MessageListener
    public abstract class BasicMQReceiverAsyncR implements Runnable, MessageListener
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:44: cannot find symbol
    symbol : class QueueConnectionFactory
    location: class BasicMQReceiverAsyncR
    QueueConnectionFactory queueConnectionFactory = null;
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:45: cannot find symbol
    symbol : class QueueConnection
    location: class BasicMQReceiverAsyncR
    QueueConnection queueConnection = null;
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:46: cannot find symbol
    symbol : class QueueSession
    location: class BasicMQReceiverAsyncR
    QueueSession queueSession = null;
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:48: cannot find symbol
    symbol : class QueueReceiver
    location: class BasicMQReceiverAsyncR
    QueueReceiver queueReceiver = null;
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:49: cannot find symbol
    symbol : class TextMessage
    location: class BasicMQReceiverAsyncR
    TextMessage message = null;
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:406: cannot find symbol
    symbol : class QueueConnectionFactory
    location: class BasicMQReceiverAsyncR
    queueConnectionFactory = (QueueConnectionFactory)
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:408: package javax.jms does not exist
    queue = (javax.jms.Queue) jndiContext.lookup(QUEUE_NAME); //queue1 = (javax.jms.Queue)jndiContext.lookup("MyQueue1");
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:433: cannot find symbol
    symbol : variable Session
    location: class BasicMQReceiverAsyncR
    Session.AUTO_ACKNOWLEDGE);
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:447: cannot find symbol
    symbol : class JMSException
    location: class BasicMQReceiverAsyncR
    catch (JMSException e)
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:461: cannot find symbol
    symbol : class JMSException
    location: class BasicMQReceiverAsyncR
    catch (JMSException x)
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:482: cannot find symbol
    symbol : class BytesMessage
    location: class BasicMQReceiverAsyncR
    if (m instanceof BytesMessage)
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:488: cannot find symbol
    symbol : class BytesMessage
    location: class BasicMQReceiverAsyncR
    BytesMessage bytesMsg = (BytesMessage)m;
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:488: cannot find symbol
    symbol : class BytesMessage
    location: class BasicMQReceiverAsyncR
    BytesMessage bytesMsg = (BytesMessage)m;
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:501: cannot find symbol
    symbol : class QueueSession
    location: class BasicMQReceiverAsyncR
    QueueSession queueSession2 = null;
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:502: cannot find symbol
    symbol : class QueueSender
    location: class BasicMQReceiverAsyncR
    QueueSender queueSender2 = null;
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:510: cannot find symbol
    symbol : variable Session
    location: class BasicMQReceiverAsyncR
    Session.AUTO_ACKNOWLEDGE);
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:514: cannot find symbol
    symbol : class BytesMessage
    location: class BasicMQReceiverAsyncR
    BytesMessage bytesMessage = queueSession.createBytesMessage();
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:523: cannot find symbol
    symbol : variable DeliveryMode
    location: class BasicMQReceiverAsyncR
    DeliveryMode.PERSISTENT,
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:524: cannot find symbol
    symbol : variable DEFAULT_PRIORITY
    location: class com.leader.cti.vru.Message
    Message.DEFAULT_PRIORITY,
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:525: cannot find symbol
    symbol : variable DEFAULT_TIME_TO_LIVE
    location: class com.leader.cti.vru.Message
    Message.DEFAULT_TIME_TO_LIVE);
    C:\Projects\Leader\dev\java\com\leader\cti\msgqueue\BasicMQReceiverAsyncR.java:529: cannot find symbol
    symbol : class JMSException
    location: class BasicMQReceiverAsyncR
    catch (JMSException x)
    26 errors
    C:\Projects\Leader\dev\java\build.xml:34: The following error occurred while executing this line:
    C:\Projects\Leader\dev\java\build.xml:56: Compile failed; see the compiler error output for details.
    BUILD FAILED (total time: 8 seconds)
    my class path is:
    .;C:\Projects\Leader\prototype\jms\build\classes;C:\Projects\Leader\dev\libs\persist.jar;C:\Projects\Leader\dev\classes;%OPENJMS_HOME%\lib;%OPENJMS_HOME%\lib\antlr-2.7.2.jar;%OPENJMS_HOME%\lib\castor-0.9.5.jar;%OPENJMS_HOME%\lib\commons-codec-1.3.jar;%OPENJMS_HOME%\lib\commons-collections-2.1.jar;%OPENJMS_HOME%\lib\commons-dbcp-1.2.1.jar;%OPENJMS_HOME%\lib\commons-logging-1.0.4.jar;%OPENJMS_HOME%\lib\commons-pool-1.2.jar;%OPENJMS_HOME%\lib\concurrent-1.3.4.jar;%OPENJMS_HOME%\lib\derby-10.1.1.0.jar;%OPENJMS_HOME%\lib\jdbc-2.0.jar;%OPENJMS_HOME%\lib\jms-1.1.jar;%OPENJMS_HOME%\lib\jndi-1.2.1.jar;%OPENJMS_HOME%\lib\jta-1.0.1.jar;%OPENJMS_HOME%\lib\log4j-1.2.11.jar;%OPENJMS_HOME%\lib\openjms-0.7.7-beta-1.jar;%OPENJMS_HOME%\lib\openjms-common-0.7.7-beta-1.jar;%OPENJMS_HOME%\lib\openjms-net-0.7.7-beta-1.jar;%OPENJMS_HOME%\lib\openjms-tools-0.7.7-beta-1.jar;%OPENJMS_HOME%\lib\oro-2.0.8.jar;%OPENJMS_HOME%\lib\spice-jndikit-1.2.jar;%OPENJMS_HOME%\lib\xerces-2.4.0.jar;%OPENJMS_HOME%\lib\xml-apis-1.0.b2.jar;%J2EE_HOME%\lib\j2ee.jar;%J2EE_HOME%\lib
    as you can see j2ee.jar is in %J2EE_HOME%\lib, but still doesn't work. can someone help me?

    <property name="messaging.client.jar.path" value="Location in your local drive" />
    <property name="messaging.client.jar.name" value="nameOfYourFile.jar" />

  • How to include .jar file in our classpath

    I want to do serial communication.I have one demo program but in it they mention that set comm.jar file in your class path.Then how can I set comm.jar file in my class path?

    Javapedia: Classpath
    How Classes are Found
    Setting the class path (Windows)
    Setting the class path (Solaris/Linux)
    Understanding the Java ClassLoader
    java -cp .;<any other directories or jars> YourClassName
    javac -classpath .;<any additional jar files or directories> YourClassName.java

  • How to include jar files in WS assembling

    HI, There:
    I have a webservice project works well except I canot include lib files in WEB-INF. I need following dir in war files
    WEB-INF
    --classes/com.xyz.....
    --lib/my.jar
    I use following target in build.xml
    <target name="webservice-setup" depends="setup,compile-webservice">
    <echo message="-----> Assembling the webservice"/>
    <oracle:assemble appName="${app.name}"
    serviceName="${app.name}"
    interfaceName="com.ivgn.protomineWS.service.ProtomineService"
    className="com.ivgn.protomineWS.service.ProtomineServiceImpl"
    input="${bld.webservice.dir}"
    output="${out.dir}"
    ear="${lib.dir}/${ear.name}.ear">
    <classpath>
    <pathelement location="${OC4J_HOME}/webservices/lib/wsa.jar"/>
    </classpath>
    </oracle:assemble>
    </target>
    where can i add the lib directory so that many jar files for this application can get into lib directory. Looks like this "assemble" command has no argument for "lib". The "input" argument only handle the classes files.
    Thanks
    TZhang

    There are two way to do this.
    1) you assemble the .ear file, expand it's content, make modification and re-package using jar command (plain ant style).
    2) instead of using the -ear option, you can use the -war option. It will leave the content in is expanded form, and you can then do the packaging in your own way, after making modifications.
    You may also want to take a look at the 'appendToExistingDDs' flag of the assemble command (see chapter 16 of the user's guide [1]).
    appendToExistingDDs <true|false>
    Determines whether entries for a new Web service will be appended to the existing
    deployment descriptors or whether they will be overwritten. The deployment
    descriptors that can be affected by this argument are oracle-webservices.xml,
    web.xml, and webservices.xml.
    Beware; this style of assembly is a little hard to use, as you cannot re-run the same target twice, without to restore the original files.
    Hope this helps,
    Eric
    [1] http://download-west.oracle.com/otn_hosted_doc/ias/preview/web.1013/b14434.pdf

  • How to include jar files in exporting an .jar with Eclipse

    I would like to add jar libraries into my jar exported in that they are referenced in my java code . how can i do it with Eclipse?
    Thanks for your response.

    You mean to add a library in NetBeans? If so, click here

  • How can I get a single jar file with NetBeans?

    How can I get a single jar file with NetBeans?
    When I create the project I get these files:
    dist/lib/libreria1.jar
    dist/lib/libreria2.jar
    dist/software.jar
    The libraries that have been imported to create the project are in separate folders:
    libreria1/libreria1.jar
    libreria2/libreria2.jar
    libreria1, libreria2, dist folders are all located inside the project folder.
    I added the following code to the build.xml:
    <target name="-post-jar">
    <jar jarfile="dist/software.jar">
    <zipfileset src="${dist.jar}" excludes="META-INF/*" />
    <zipfileset src="dist/lib/libreria1.jar" excludes="META-INF/*" />
    <zipfileset src="dist/lib/libreria2.jar" excludes="META-INF/*" />
    <manifest>
    <attribute name="Main-Class" value="pacco.classeprincipale"/>
    </manifest>
    </jar>
    </target>
    Of course there is also the project folder:
    src/pacco/classeprincipale.form
    src/pacco/classeprincipale.java
    Can you tell me what is wrong? The error message I get is as follows:
    C:...\build.xml:75: Problem creating jar: archive is not a ZIP archive BUILD FAILED (total time: 2 seconds)

    This is not a NetBeans forum, it is a JDeveloper forum. You might want to try http://forums.netbeans.org/. I also saw your other question - try looking in the New to Java forum: New To Java

  • Creating an exacutable jar file in netbeans

    Hey, how can i create an exacutable jar file in netbeans ?

    i guess you already have a project created, if you don't create a new java application project.
    Then you need to do the following:
    1. Set the main class. This is the class that will run first.
    for this you need to right click in the project node, select properties, then run and in the Main Class field put the main class.
    2. Set the classpath: you need to put all the libraries or resources you use in your project.
    to do that right click the libraries node, select properties, then add library and add all the libraries that your project needs
    by doing this steps netbeans will create your manifest file and the jar that will create will be executable.
    Hope this helps.
    Escobar5

  • Help! How to create Jar file for a packaged class?

    Hi!
    I am new in jar complexities. I made a swing frame that just prompts a JOptionPane when executed. I accomplished the same using jar without packaging my class SwingTest.
    But when i package it, it doesn't run. Can any one tell me how to make jar file of packaged classes and include images in the jar files too!
    Really Thanx!

    Call the Jar from the commandline to see the exceptions thrown.
    java -jar <jarFileName> <className>

  • How to include .jars?

    Hello,
    I have been unable to find out how to include in the .ear file generated by wsgen the supporting .jar files that my Web Service EJB needs.
    I thought this could be done with the "classpath" parameter in the wsgen tag in build.xml, but it doesn't seem to do anything.
    Can someone please provide a hint?
    Thanks,
    Pere

    Hi Pete,
    You mentioned the <wsgen> Ant task, so I'm assuming that you're using WLS 6.1
    An automated way to do this, is to include a series of <exec> Ant tasks after
    the <wsgen> one. These <exec> Ant tasks would call the jar.exe and look something
    like this:
    <exec
    dir="."
    executable="jar.exe"
    failonerror="yes"
    >
    <arg line="xvf ${APPLICATIONS}/MyWS.ear myEJB.jar"/>
    </exec>
    <delete dir="myEJB-jar"/>
    <mkdir dir="myEJB-jar"/>
    <exec
    dir="myEJB-jar"
    executable="jar.exe"
    failonerror="yes"
    >
    <arg line="xvf myEJB.jar"/>
    </exec>
    <copy todir="myEJB-jar">
    <fileset dir=".">
    <include name="jar1-used-by-EJB.jar"/>
    <include name="jar2-used-by-EJB.jar"/>
    </fileset>
    </copy>
    <copy todir="myEJB-jar/META-INF">
    <fileset dir=".">
    <include name="MANIFEST.MF"/>
    </fileset>
    </copy>
    <jar jarfile="myEJB.jar" basedir="myEJB-jar" />
    <exec
    dir="."
    executable="jar.exe"
    failonerror="yes"
    >
    <arg line="uvf ${APPLICATIONS}/MyWS.ear myEJB.jar"/>
    </exec>
    I realize this seems like a lot of steps, but they are at least automated :-)
    Note that the contents of the MANIFEST.MF that you copy in must look like this:
    Manifest-Version: 1.0
    Created-By: Ant 1.4
    Class-path: jar1-used-by-EJB.jar jar2-used-by-EJB.jar
    in order for the EJBs to find the newly included .jar files.
    HTH,
    Mike Wooten
    Pere Torrodellas <[email protected]> wrote:
    Hello,
    I have been unable to find out how to include in the .ear file generated
    by wsgen the supporting .jar files that my Web Service EJB needs.
    I thought this could be done with the "classpath" parameter in the wsgen
    tag in build.xml, but it doesn't seem to do anything.
    Can someone please provide a hint?
    Thanks,
    Pere

  • How to make jar files availabe for deployed EJBs

    Hi,
    I'm interested on how to make jar files availabe for deployed EJBs.
    My EJB is packed in an ear. It uses a util jar. I now just add the jar to the
    classpath, but I think that shouldn't be the way. Is there somthing in the admin
    console to make jars available or do I have to insert it in the ear file? And
    if so, where do I hve to place it?
    Thanks
    Claudia

    Put the util.jar in the ear with your ejb jars - at the same level (i.e. in
    the root) - but do not include them in the manifest.xml.
    Also each ejb jar that refers to util.jar must have util.jar on its internal
    classpath in the manifest.
    "Claudia" <[email protected]> wrote in message
    news:3d537db5$[email protected]..
    >
    Hi,
    I'm interested on how to make jar files availabe for deployed EJBs.
    My EJB is packed in an ear. It uses a util jar. I now just add the jar tothe
    classpath, but I think that shouldn't be the way. Is there somthing in theadmin
    console to make jars available or do I have to insert it in the ear file?And
    if so, where do I hve to place it?
    Thanks
    Claudia

Maybe you are looking for

  • Using document() function in xsl - first iteration is OK; second iteration is Empty.

    I am processing an input xml file (say input.xml) via (report.xsl) to generate a report. report.xsl in turn loads another *xml file (schema.xml) through document() function so as to process the input.xml. <schema.xml> contains some look-up informatio

  • External account

    Hi, after several months of PHD syncing nightmares I recently opted for an external account on a portable firewire drive. It seems to be working very nicely, allowing me to switch from a portable macbook pro to an imac rapidly and without problems. t

  • Download file thru excel with password

    Hello ABAPers, I used the EXCEL_OLE_STANDARD_DAT with password protected...my problem is .once this fm executed...the excel file appeared and sheets are not read only..Id like to do,once the file is downloaded to excel...and FM was executed...the exc

  • EXPRESS DOCUMENT UPDATE WAS TERMINATED

    I am getting this error in case of sales order.I know we can use transaction code SM13 to see the reason.But still even after making many changes the error still exists.Is there any specific reason why this error occurs?

  • Why does my EA4500 restrict my top speed to 28MB? Modem alone does 65MB.

    I recently upgraded my Charter Internet speed to 60 meg. But when I speed tested it I still got 28 just like I had been for the last year. I called them and they said I should be getting 60 so they asked me to bypass my router (EA4500) which I did. A