Jar files exporting

Hi all,
I have a jar file that works along with some C plus plus dll s.
I need to package the jar in such a way that it should have the necessary files
for the jar to open and there is no need for the client to again install java.
I mean my jar should work in any system irrespective of the OS and software
requirements.Can anyone please help me
Thanks in advance.

o ya you will have to for the JNI application, actually java application need not to be installed they can be directly used by putting them in a directory structure, if you have idea of nix architecture then you will understand the concept.
well why not make a bat file and include the directory address for the jvm installation file and put them all together in a package,
just take care of the licensing part of java :)
you can also redirect the user to the sun site if he dont have a jvm..,

Similar Messages

  • Java application to jar file

    I use eclipse and i have a java program which run without any problem,
    but when I export this program to jar file(export->java->jar file)
    I get the jar file and when I run this jar file ,it run for few seconds then it stop to run,despite in eclipse it run .
    I don't know what is the problem

    netcom_ wrote:
    I found the error;I have a file.txt under the bin of the project,but when I export the project this file
    don't appear so when I run the jar it doesn't find the file.this file is neccessery for the project.
    I will read the content of this file,So I think after exporting the project I make it with the jarfile and I use this code to read the file.
         String lin= is.read(buffer);
    Huh?!? Since InputStream.read(byte[]) returns an int, I do not understand how that compiles, let alone runs.
    But any way you cut it, that I/O code was utter rubbish.
    but also it doesn't find the file.When reporting problems, please [copy/paste any error messages|http://pscode.org/javafaq.html#exact] you are getting.

  • Cannot make executable jar file for swt application

    hi to all!!! i have started learning swt library and it seems nice to me, but i have one problem, i cannot run my application. The problem is that i cannot make executable jar for it.
    i'm using ecilpse_3.1.2 and have pluggined the visual editor for swt! yesterday i found one topic where was described the process of making the swt executable jar, i followed the instructions in the topic, but didn't resolve my problem, so if anybody knows how to achieve this , please help!!!!!!
    the instructions in the mentioned topic are :
    1. Make sure the SWT jar file is included in the Eclipse project build path
    a. Download the standalone SWT jar file from eclipse.org even if you already have the ones that come with Eclipse. It is called ?swt.jar? and you will package it with the executable JAR. Make sure it is the same version of SWT that you used to make your program.
    b. In Eclipse, import swt.jar via Project Properties::Java Build Path::Libraries::Add External JARs. (Make sure to include the source .zip file). Also make sure to select the swt package in the ?Order and Export? tab.
    c. At this point, you should be able to compile and run your SWT application in the Eclipse SDK.
    2. Do a standard Eclipse jar file export
    a. Right click on the main .java project file and select ?Export??.
    b. Choose ?JAR File? from the list.
    c. Select the relevant packages and .classpath and .project resource files
    d. Make sure ?Export generated class files and resources? is selected and browse to the location where you want the JAR file to be created.
    e. Specify ?Generate the manifest file? and don?t seal the JAR or any packages. Choose the class containing the main method as the ?Main class?.
    3. Change the manifest file
    a. Navigate to the JAR file you created and open it with WinZip.
    b. Open the MANIFEST.MF file inside and copy the contents.
    c. Create a new file called ?MANIFEST.MF? and paste in the contents of the old manifest file.
    d. Add the line ?Class-Path: <swt jar file path>?. For simplicity, you can just keep a copy of the swt.jar file in the same folder as the executable jar, in which case, the line is ?Class-Path: swt.jar?. Make sure there is a carriage return after the last line in the manifest file, or that line will not be parsed.
    4. Replace the manifest file
    a. Make sure the manifest file and the executable jar are in the same folder.
    b. Open the command prompt and navigate to the containing folder.
    c. Enter the command ?jar umf MANIFEST.MF <executable jar name>? to update the manifest file with the class path information.
    5. Package the JAR with SWT files
    a. Put the updated executable JAR file, swt.jar, and the associate DLL in the same folder. The DLL can be pulled out of swt.jar and should have a name like ?swt-win32-####.dll? on Windows.
    b. The JAR file should now successfully execute. On Windows, you can usually just double click the JAR file in explorer and it will open. If that does not work, the command ?java ?jar <executable jar name>? on the command line has the same effect.
    but a few steps aren't exact for me , for example : first, which jar i have to include in build path : downloaded or from plugins folder, second
    i have to incude source.zip too??? but it is only in downloaded zip file which includes both swt.jar and src.zip, and finally can anyone clarify next :
    "5. Package the JAR with SWT files
    a. Put the updated executable JAR file, swt.jar, and the associate DLL in the same folder. The DLL can be pulled out of swt.jar and should have a name like ?swt-win32-####.dll? on Windows."
    what does this mean, put these in folder or make jar from them????

    wolve634 wrote:
    but a few steps aren't exact for me , for example : first, which jar i have to include in build path : downloaded or from plugins folder, secondTry it both ways. If neither works, then ask again. In a suitable forum, though. An Eclipse forum or an SWT forum or something related to where you got those instructions would make a lot more sense than asking here.
    i have to incude source.zip too???No, of course you don't have to distribute the source code.
    a. Put the updated executable JAR file, swt.jar, and the associate DLL in the same folder. The DLL can be pulled out of swt.jar and should have a name like ?swt-win32-####.dll? on Windows."
    what does this mean, put these in folder or make jar from them????It says "Put (them) in the same folder". You're asking whether that means to put them in a folder? Yes, it does.

  • Creating a JAR file in RAD

    Hello, I am creating a simple JAR file containing a group of Java classes. It is not an executable JAR file and is simply a way for me to zip up a bunch of classes I want to use in another project. The problem is, after I create it in RAD using the JAR File Export and drop it into WEB-INF/lib in my other project, it shows as a text file in my Java perspective and I can't see any of the classes.
    Is there something else I need to do with my classpath or anything like that? I recently put the Jakarta Commons JAR in the same folder and after a refresh, it showed ready to go. What am I missing here?

    Rational Application Developer, IBM's IDE. It has a
    Create JAR file utility which supposedly makes it
    easy. I'd like to use this if I can because there
    are a ton of files. I just don't know what I'm doing
    wrong after I create it.Not many people here can help with a question related specifically to an IDE. I had a problem in the past when I tried to create a JAR file with Eclipse. After trying to create the JAR file using the command line utility, I was able to better figure out my error. I strongly recommend you do the same, and post any error message(s) you receive here.

  • How to call a function from a JAR file

    Hi ALL,
    I am trying to call a Public function from a JAR file from my JAVA
    file. Can you please provide an example or suggest a good resource?
    Basically my java file Test.Java should call a function called 'export_a_doc' from a JAR file Export.jar. How do I refer this in my Java file and call 'export_a_doc'?
    Thanx

    Hi,
    HERE IS MY JAVA FILE
    // We need this for Starting our Export Process
    import com.newexport.Myclass;
    public class MyTest {
         // Our function to Start Export
         protected static void test(String[] args) {
         System.out.println("Starting. \n---------------------");
         Myclass p = new Myclass();
         try {
    p.Start_Export(args);
    System.out.println("Finished. \n---------------------");
         } catch(Exception e) {
    e.printStackTrace();
         public static void main(String[] args) {
         test(args);
    HERE IS THE BATCH FILE TO BUILD AND RUN
    cd \JNI\Srcs
    echo "-------------"
    c:\JBuilder7\jdk1.3.1\bin\javac -classpath C:\JNI\Export.jar MyTest.java
    echo "-------------"
    \JBuilder7\jdk1.3.1\bin\java.exe -classpath c:\JNI\Export.jar MyTest
    The Export.jar uses other jar files
    Raj

  • OIM 11g Using exportMetaData.sh to export the jar files error

    Env OIM 11g (11.1.1.5.0) with iPlanet Connector installed on Linux 32-bit.
    When running the exportMetaData.sh with the filter for configuration for the Jars files as “*”.
    The error output is:
    /home/oracle/exportData/exportPackage/Jars/JavaTasks/SJSDSProv.jar
    java.io.FileNotFoundException: /home/oracle/exportData/exportPackage/Jars/JavaTasks/SJSDSProv.jar (No such file or directory)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
    at oracle.iam.OIMMigration.util.OIMMigrationUtility.main(OIMMigrationUtility.java:206)
    java.util.zip.ZipException: ZIP file must have at least one entry
    at java.util.zip.ZipOutputStream.finish(ZipOutputStream.java:304)
    at java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:146)
    at java.util.zip.ZipOutputStream.close(ZipOutputStream.java:321)
    at oracle.iam.OIMMigration.util.OIMMigrationUtility.createZipFile(OIMMigrationUtility.java:429)
    at oracle.iam.OIMMigration.util.OIMMigrationUtility.main(OIMMigrationUtility.java:242)
    Export Package created : /home/oracle/exportData/exportPackage_2012:03:26::11:22:04.zip
    Exiting...
    The config.xml file used is (as provided in the document)
    <?xml version="1.0" encoding="utf-8"?>
    <MigrationDetails operation="Export">
    <entityDetails>
    <EntityType>Jars</EntityType>
    <FilteringCriteria>
    <Attribute>
    <Name>Jar_Type</Name>
    <Filter>*</Filter>
    </Attribute>
    </FilteringCriteria>
    </entityDetails>
    <entityDetails>
    <EntityType>Plugins</EntityType>
    <FilteringCriteria>
    <Attribute>
    <Name>Plugin_Name</Name>
    <Filter>*</Filter>
    </Attribute>
    </FilteringCriteria>
    </entityDetails>
    <entityDetails>
    <EntityType>CustomResourceBundles</EntityType>
    <FilteringCriteria>
    <Attribute>
    <Name>Resource_Type</Name>
    <Filter>*</Filter>
    </Attribute>
    </FilteringCriteria>
    </entityDetails>
    </MigrationDetails>
    The exportMetaData.sh is correctly configured and those directories exist on the system.
    CONTEXT_FACTORY="weblogic.jndi.WLInitialContextFactory"
    PACKAGE_LOCATION=/home/oracle/exportData
    TEMP_LOCATION_TO_EXTRACT=/home/oracle/exportTemp
    CONFIGURATION_FILE=/odrive/oracle/oim11g_MWH/Oracle_IDM1/server/bin/config.xml
    MODE="export"
    Any help to resolve this issue would be much appreciated.
    Regards,
    Shane

    Hi Shane,
    The problem appears to be an issue where the directory created is called "JavaTask" but the jars are trying to be placed into "JavaTasks".
    Note the "s" appended at the end.
    If you manually create the JavaTasks directory then run the tool, it should work.

  • Jar files are not exported while PAR Export

    Hi Experts,
    When  I am exporting as PAR file, in the par file  I am not getting the jar files, which I am adding as external jar files in the java build path - Libraries
    Please tell me the solution. urgent...
    Regards,
    Shyam

    Step 6 makes your third party jars available during runtime on your server since you put the dependency to runtime. I don't think you need/can reference your j2ee server dc in the portalapp.xml.
    Summary of the link I sent you:
    1. Create an External Library DC
    2. Copy all of the Jars I needed to the libraries folder of this DC
    3. Create two Public Parts (right click on the jar files in Package Explorer)
          i) compilePart (with purpose compilation)
          ii) assemblyPart (with purpose assembly)
    4 Create a new DC of type J2EE Server Component / Library
    5. Add a Used DC to the J2EE Library, reference the compilePart from previous step, and set Dependency type to Build
    6. Add another Used DC, reference the assemblePart, this time select both Build and Runtime Dependency Types
    7. Build and deploy.
    Br
    Göran

  • Exporting JOGL project in Eclipse to an executable jar file

    I'm currently using Eclipse on Windows as my IDE and I've gotten [JOGL |https://jogl.dev.java.net/] to work on it, however if I try to export the project (I've just got a simple example that runs perfectly through eclipse) to an jar file (either the JAR or Runnable JAR option) the jar file doesn't do anything. If I go to the command line and type "java -jar <the jar file> -Djava.library.path=<where the library files are>" it gives this error:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no jogl in java.library.path
            at java.lang.ClassLoader.loadLibrary(Unknown Source)
            at java.lang.Runtime.loadLibrary0(Unknown Source)
            at java.lang.System.loadLibrary(Unknown Source)
            at com.sun.opengl.impl.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:189)
            at com.sun.opengl.impl.NativeLibLoader.access$000(NativeLibLoader.java:49)
            at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(NativeLibLoader.java:80)
            at com.sun.opengl.impl.NativeLibLoader.loadLibrary(NativeLibLoader.java:103)
            at com.sun.opengl.impl.NativeLibLoader.access$200(NativeLibLoader.java:49)
            at com.sun.opengl.impl.NativeLibLoader$1.run(NativeLibLoader.java:111)
            at java.security.AccessController.doPrivileged(Native Method)
            at com.sun.opengl.impl.NativeLibLoader.loadCore(NativeLibLoader.java:109)
            at com.sun.opengl.impl.windows.WindowsGLDrawableFactory.<clinit>(WindowsGLDrawableFactory.java:60)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Unknown Source)
            at javax.media.opengl.GLDrawableFactory.getFactory(GLDrawableFactory.java:106)
            at Snippet209.main(Snippet209.java:75)Clearly I'm missing something. I want to make a jar file that I can send to an arbitrary computer and it will run the JOGL program with no extra steps (or at least as few as possible). Any help would be greatly appreciated with some Duke stars ;-)

    Ok, sounds like it would work, although I've never done much with loading libraries like you describe, so I could use some extra notes on it.
    I got this code from here and followed the instructions on there too to get JOGL to work with Eclipse:
    * Copyright (c) 2000, 2005 IBM Corporation and others. All rights reserved.
    * This program and the accompanying materials are made available under the
    * terms of the Eclipse Public License v1.0 which accompanies this distribution,
    * and is available at http://www.eclipse.org/legal/epl-v10.html Contributors:
    * IBM Corporation - initial API and implementation
    * SWT OpenGL snippet: use JOGL to draw to an SWT GLCanvas For a list of all SWT
    * example snippets see http://www.eclipse.org/swt/snippets/
    * @since 3.2
    import java.io.File;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import javax.media.opengl.GL;
    import javax.media.opengl.GLContext;
    import javax.media.opengl.GLDrawableFactory;
    import javax.media.opengl.glu.GLU;
    import org.eclipse.swt.SWT;
    import org.eclipse.swt.graphics.Rectangle;
    import org.eclipse.swt.layout.FillLayout;
    import org.eclipse.swt.opengl.GLCanvas;
    import org.eclipse.swt.opengl.GLData;
    import org.eclipse.swt.widgets.Composite;
    import org.eclipse.swt.widgets.Display;
    import org.eclipse.swt.widgets.Event;
    import org.eclipse.swt.widgets.Listener;
    import org.eclipse.swt.widgets.Shell;
    public class Snippet209
         static void drawTorus(GL gl, float r, float R, int nsides, int rings)
              float ringDelta = 2.0f * (float) Math.PI / rings;
              float sideDelta = 2.0f * (float) Math.PI / nsides;
              float theta = 0.0f, cosTheta = 1.0f, sinTheta = 0.0f;
              for (int i = rings - 1; i >= 0; i--)
                   float theta1 = theta + ringDelta;
                   float cosTheta1 = (float) Math.cos(theta1);
                   float sinTheta1 = (float) Math.sin(theta1);
                   gl.glBegin(GL.GL_QUAD_STRIP);
                   float phi = 0.0f;
                   for (int j = nsides; j >= 0; j--)
                        phi += sideDelta;
                        float cosPhi = (float) Math.cos(phi);
                        float sinPhi = (float) Math.sin(phi);
                        float dist = R + r * cosPhi;
                        gl.glNormal3f(cosTheta1 * cosPhi, -sinTheta1 * cosPhi, sinPhi);
                        gl.glVertex3f(cosTheta1 * dist, -sinTheta1 * dist, r * sinPhi);
                        gl.glNormal3f(cosTheta * cosPhi, -sinTheta * cosPhi, sinPhi);
                        gl.glVertex3f(cosTheta * dist, -sinTheta * dist, r * sinPhi);
                   gl.glEnd();
                   theta = theta1;
                   cosTheta = cosTheta1;
                   sinTheta = sinTheta1;
         public static void main(String[] args)
              final Display display = new Display();
              Shell shell = new Shell(display);
              shell.setLayout(new FillLayout());
              Composite comp = new Composite(shell, SWT.NONE);
              comp.setLayout(new FillLayout());
              GLData data = new GLData();
              data.doubleBuffer = true;
              final GLCanvas canvas = new GLCanvas(comp, SWT.NONE, data);
              canvas.setCurrent();
              final GLContext context = GLDrawableFactory
                        .getFactory().createExternalGLContext();
              canvas.addListener(SWT.Resize, new Listener()
                   public void handleEvent(Event event)
                        Rectangle bounds = canvas.getBounds();
                        float fAspect = (float) bounds.width / (float) bounds.height;
                        canvas.setCurrent();
                        context.makeCurrent();
                        GL gl = context.getGL();
                        gl.glViewport(0, 0, bounds.width, bounds.height);
                        gl.glMatrixMode(GL.GL_PROJECTION);
                        gl.glLoadIdentity();
                        GLU glu = new GLU();
                        glu.gluPerspective(45.0f, fAspect, 0.5f, 400.0f);
                        gl.glMatrixMode(GL.GL_MODELVIEW);
                        gl.glLoadIdentity();
                        context.release();
              context.makeCurrent();
              GL gl = context.getGL();
              gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
              gl.glColor3f(1.0f, 0.0f, 0.0f);
              gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);
              gl.glClearDepth(1.0);
              gl.glLineWidth(2);
              gl.glEnable(GL.GL_DEPTH_TEST);
              context.release();
              shell.setText("SWT/JOGL Example");
              shell.setSize(640, 480);
              shell.open();
              display.asyncExec(new Runnable()
                   int     rot     = 0;
                   public void run()
                        if (!canvas.isDisposed())
                             canvas.setCurrent();
                             context.makeCurrent();
                             GL gl = context.getGL();
                             gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
                             gl.glClearColor(.3f, .5f, .8f, 1.0f);
                             gl.glLoadIdentity();
                             gl.glTranslatef(0.0f, 0.0f, -10.0f);
                             float frot = rot;
                             gl.glRotatef(0.15f * rot, 2.0f * frot, 10.0f * frot, 1.0f);
                             gl.glRotatef(0.3f * rot, 3.0f * frot, 1.0f * frot, 1.0f);
                             rot++;
                             gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_LINE);
                             gl.glColor3f(0.9f, 0.9f, 0.9f);
                             drawTorus(
                                       gl, 1, 1.9f + ((float) Math.sin((0.004f * frot))),
                                       15, 15);
                             canvas.swapBuffers();
                             context.release();
                             display.asyncExec(this);
              while (!shell.isDisposed())
                   if (!display.readAndDispatch())
                        display.sleep();
              display.dispose();
    }I have set up a project in eclipse with that file in the default package. I have created a libs/ folder in the project and I have the following files in it:
    gluegen-rt.dll
    gluegen-rt.jar
    jogl.dll
    jogl.jar
    jogl_awt.dll
    jogl_cg.dll
    swt.jarMy project is using the 3 jar files as libraries and I don't need to explicitly say anything about the dll files.

  • Export a "FAT" Jar file

    Hi all.
    I created a new Java project as a DC in NWDS.  This project references jars stored in a library DC with in the same SC. 
    I am trying to export the java project as an executable jar.  The jar will export, but when I try running the Jar, main throws an exception.  I have tried updating the build path in NWDS with no luck.  I am able to get the jar file to run from the command line if I include the class-path to each external jar.  I believe the issue is that the external jars from the library DC are not being included in the executable jar.
    Does anyone know how to export a fat jar file which includes the external jars?
    Thanks
    Ryan

    Glad you found an answer, the issue you were having sounds similar to mine (using 3rd-party jars for axis / wsdl4j). According to SDN docs, you create an external library to wrap the jars (sounds like you did). In your public parts for the external library DC, you need to create both the COMPILATION and ASSEMBLY public parts (both representing the jars) and grant access to them from your consuming DC. Sounds like you did that too, I certainly did.
    In my case, I had:
      SC
        DC -> extjars
          libraries -> contains qname.jar and wsdl4j.jar
          extjars_assm_pp -> ASSEMBLY public part ref's both jars
          extjars_comp_pp -> COMPILATION public part ref's both jars
        DC -> wsdl4jEJB -> references javax stuff in wsdl4j.jar
          dependencies -> extjars:extjars_comp_pp
        DC -> wsdl4jEAR -> packages the extjars and the wsdl4jEJB
          dependencies -> extjars:extjars_assm_pp
        ...Web Dynpro DC that uses the wsdl4jEAR to import the EJB model...
    The trick to making the wrapped jars appear in the compilation command line for the DC deployment of the wsdl4jEAR (from Development Infrastructure perspective) was adding the ASSEMBLY public part reference to the wsdl4jEAR dependenciens. Also, the SAP doco was a bit confusing; on the extjars project the doc states to add the jar files to the public part. Be sure to add the jar files as Archives and not as regular Files (otherwise, the jars aren't added to the buildpath during DC deployment build).
    Hope this helps someone else if it doesn't actually pertain to the OP's issue, it would have saved me a bit of digging and debugging...
    Edited by: ANDY BRUCE on Jan 28, 2009 5:06 PM

  • Exporting to a jar file in eclipse environment

    Hi all,
    I am using eclipse as my IDE to develop my swing application. The trouble is the gui reads from a file to get the names it has to store.
    When I convert it to a jar file, and execute it the names do not appear. I am guessing that it cannot find the file. Can I not export a file that I imported into my project and send it as part of the jar file? How do I get around this?
    Thanks, in advance.

    How are you loading the files?
    You should try to load your files using their absolute path.
    To find the absolute path of your jar application, you can use:
    String dir = System.getProperty("user.dir");Then, if the list is in the same directory as your app, you use:
    File file = new File(dir+"/list.txt");-----------------------------------------------------------------------
    Just a note. If you need to read a file that�s packed inside your .jar application, then you need to read the file using getResourceAsStream. For more information, read this thread
    I hope it helps

  • Problems with exporting a .jar file

    Hi there,
    I'm working on a small java game and wanted to export in as a jar file.
    The program runs fine in the IDE and it generates the jar without any warnings.
    However, when i try to execute the jar, it simple "blinks" the basic frame and exit.
    A better description might be, that it looks like the Jframe opens, but then closes again quickly.
    I'm using Eclipse as IDE, and follow the Export wizzard.
    My project is devided like this:
    package : framework.
    package: sound.
    package: sprite.
    folder: sounds.
    folder: sprites.
    I'm guessing it somehow can't find the images, but as i said, it runs fine in the IDE.
    My MANIFEST looks like this:
    Manifest-Version: 1.0
    Sealed: true
    Main-Class: framework.EagleFlight
    Hope you can help.

    Hi,
    Thanks for your answer.
    I can export it from Netbeans, but not Eclipse.
    However, from Netbeans I get no sound, when executing the jar.
    Anyway, I'm happy enough with the exporting, now I just need to get sound, for which i have
    made another thread here.

  • Exporting a jar file with its libraries

    Hi there,
    I have problem while exporting jar files with Eclipse.My program uses db2driver libraries and i want to make stay these library files while exporting the main program but there is no choice to make it like that. And when i execute my program jar file it throws a class not found exception for db2drivers ...
    How can i pack the jar files with my program jar?
    Thanks for help.

    Hi Peter,
    I made the changes but still got the problem...
    here is my .classpath file:
    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
    <classpathentry exported="true" kind="lib" path="db2jcc_license_cu.jar"/>
    <classpathentry exported="true" kind="lib" path="db2jcc.jar"/>
    <classpathentry kind="output" path="bin"/>
    </classpath>
    when i execute my jar file it throws a ClassNotFoundExeption for DB2Drivers which are in db2jcc.jar ...(my startng class is at src package)
    Thanks..

  • Problem is when iam exporting the jar file the manifest file  chaning

    LogWriter.java
    MiniBrowser.java
    SendMail.java
    TestMiniBrowser.java
    iam running the site scope program ,program is running fine
    i add the mail.jar and activation.jar
    when iam Exporting the JAR file ,the Manifest files is changing with out classpath
    only showing the like this
    Manifest-Version: 1.0
    Sealed: true
    Main-Class: p1.TestMiniBrowser
    Actually i created the manifest files like this ..
    Manifest-Version: 1.0
    Sealed: true
    Class-Path: mail.jar activation.jar icsops.jar
    Main-Class: p1.TestMiniBrowser
    problem is when iam exporting the jar file the manifest file is changing then iam not able the run the jar file ..

    iam Useing Eclipse sdk3.1
    after exporing the jar the manifewst is canging but iam updating mauvally but when iam runingg the jar file
    D:\pavansitescope>set calsspath=%classpath%C:\j2sdk1.4.1_03\bin;.;
    D:\pavansitescope>set calsspath=%classpath%D:\pavansitescope\mail.jar;.;
    D:\pavansitescope>set calsspath=%classpath%D:\pavansitescope\activation.jar;.;
    D:\pavansitescope>set calsspath=%classpath%D:\pavansitescope\mail-plugin.jar;.;
    D:\pavansitescope>java -jar icsops.jar
    Arguments Usage:
    1. URL link
    2. From Address
    3. To Addresses (seperated by comma)
    4. Mail Server Host Name
    D:\pavansitescope>java -jar icsops.jar [http://69.27.230.104/SiteScope/accounts/l]
    ogin5/htdocs/Progress.html [[email protected]|mailto:[email protected]] [[email protected]|mailto:[email protected]] HYDMA
    IL03
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/MessagingE
    xception
    at p1.TestMiniBrowser.start(TestMiniBrowser.java:42)
    at p1.TestMiniBrowser.main(TestMiniBrowser.java:156)
    D:\pavansitescope>

  • Exporting jar file

    Hi ALL,
    How to export the jar file for java project?
    I have done it using build path but its not taking the class files at run time.
    iam getting error at run time.
    can any one help me with this????
    Regards
    Divya

    Hi,
       I think you have to include the particular .jar file in your classpath to get out of that error.So in studio goto the particular project and goto the "lib" folder.
    Import the jar file form your local system to this folder.Deploy it to your WAS server and run it.
    You should be able to run without error.
    Hope it helps.
    Regards,
    Guru

  • How to create a jar file as a library in java?

    Let me put it simple: rb.java is already put under /home/jiane/rb/rb.java;
    the tar file rb.tar being located under /mylib/rbcore/, the test client is put under /home/jiane/test.java. now rb.java looks like
    //// rb.java
    import java.until.*;
    public class rb {
    %>jar cvf /mylib/rbcore/rb.jar /home/jiane/rb.class
    test.java as below
    //// test.java
    import mylib.rbcore.*;
    import java.until.*;
    class test {
    %>export CLASSPATH="/mylib/rbcore/rb.jar;."
    %>javac test.java
    %>test.java:1 package mylib.rbcore does not exist
    so, how to make adjustment to rb.java & test.java so that I can make use of jar file rb.jar. please shows the steps to do. thanks a lot.

    import mylib.rbcore.*;This assumes the package mylib.rbcore and imports all its classes.
    But the source of the class does contain package statement, so the class is in the default package.

Maybe you are looking for

  • How to set and static ip_address for a Suse Linux box

    Hi. I've done the following to set an static ip address for my Suse 9 Linux box: - Take not of inet address value from ifconfig command. ie: (172.17.2.14) - Change this value in /etc/hosts for my linux box. Since Suse is configure by default to use D

  • When I set up a guest network on my time capsule nothing can not connect to this network

    I have an airport time capsule and I set up a guest network on it. This network is visible, but I can not connect to this using my mac, windows lap tops iPhone and samsung galaxy note 4.

  • Storing a range of ipAddresses?

    Hi all, I would like to know if there is a class that would store a range of IP's once the range is specified. E.g., Say i allot the range 202.79.36.25 to 202.79.37.112. Is there a class that could keep all ipAddresses lying between the above mention

  • Keystores without cacert imported

    I'm having a little problem. I have a client and a server program, in the server program truststore I have the certificate of the client program, and in the server program keystore, I have the servers certificate and the server private key. On the cl

  • Mac mail embedding

    Mac mail embedding