Help me about exporting a project in eclipse???

I have a really basic Java question - I'm building an application using
Eclipse that makes use of a couple of libraries that are located in
external JAR files. I've added them as external JARs( I use the quaqua.jar to set look and feel for my application) to my project, and everything works fine in Eclipse. My programcompiles and access those libraries as expected. However, when I export my project as a JAR file, and try to execute it outside of Eclipse, it gives me an error telling me that it can't find those libraries. The GUI of my application lose,it return to the default GUI of Java application.How
should I proceed? I can import the source code of those libraries into my
project, and then it works fine during export, but it bloats my code and
is really unncessary as I won't be altering any of that code. Is there a
better way (i.e. A way to tell Eclipse to include those external JARs in
my JAR during export, or something?) I would definately appreciate any
guidance, as you have already surmised I am a bit of a beginner at all
this. Thanks!

This is a good example why beginners should not use an IDE until they know about path,classpath and packages. You have to change the manifest file when exporting.
http://java.sun.com/docs/books/tutorial/deployment/jar/index.html
EDIT: what Rene said.

Similar Messages

  • 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.

  • Frightening little info about Exporting (merging) to usuable audio file.

    New to Logic Pro but in great distress over deadline.
    There is very little to read in the manual about exporting a project (audio and software tracks) to MP3 or .wav or whatever to send to listeners.
    Do I have to get new software for this? The only file I´ve succeeded to make was AIFF (?) and that doesn´t even work in iTunes. Need merging to .wav and then converting to mp3. Can Logic handle this?
    Appreciatively
    Snöskall

    Under the 'File' menu, at the bottom is two options, one is under 'Export' and is to export audio track as audio file (cmd E) or just under export, is 'Bounce' which allows you to bounce down your entire project as an option of file formats, in your case you can bounce down to .Wav.
    Hope it helps

  • I am trying to export a project in iMovie and I keep getting a error message about code revision

    I am trying to export a project in iMovie and I keep getting a error message about code revision. i need help!!!

    Hi there!
    Are you certain that the serial number is for InDesign? And the correct version?
    Please feel free to PM me if you wish to verify the serial number.
    Thanks,
    Amy

  • Unable to Export iMovie project in everyway I have attempted for the past 2 weeks. Please Help! Due date coming up!

    I've unable to Export iMovie project in everyway I have attempted for the past 2 weeks.I have a late 2012 iMac with 8gb of RAM and 700 gb of free space on the hard drive. The video I am trying to export is 48 mins long with most of the source footage from a NIkon D3100 and several other cammcorders. I've been exporting with Apple Intermediate codec because that was the only one that has work so far but it only worked once and since then I have had to make changes to the project and now I'm unable to get it to work. For all Quicktime exports in H.264 or AIC (my prefered format for this export since I figured it'd offer the highest quality when I import it into Encore for making a dvd out of it) Which just stops exporting in the last few minutes without explination as to why or it crashes and quits. It either leaves a partial file or nothing at all. When I do "export movie" I get a "not enough memory Heap zone error"
    I don't know what to do any help would be greatly appreciated!
    By the way I happen to have Adobe CS6 Production Premium but didn't know how to use it as well when starting the project and now really regret not using it because it appears to be 10x more stable and capable of handling all the tasks I want it to do.

    Hi
    Error -108 memFullErr  Ran out of memory [not enough room in heap zone]
    Turn off - TimeMachine usually works - re-try.
    (the Application down in the Dock - not the Device)
    But this can mean many thing's - My first thought is
    Free Space on Start-Up hard disk. How much ? (other disks do not count)
    AppleMan1958
    Are your event clips in h.264? If so, you can solve this by Right clicking on your Event Name and choose "Optimize Media". You can choose Full for 1080P or Large for 960P according to your preference.
    After you have optimized your Event, you should be able to Share with no problem.
    Lennart Thelander
    -108 mean you are running out of (free) RAM.
    Try restarting the computer just prior to sharing. That frees up RAM.
    from mynameisearl
    Final Entry
    Ok - after much cutting, trial and error and days of work I have never really established a root cause for the -108 error. Nothing I did resolved the issue to the orginal project.
    The only work around I have found is to split the Original Project into two.
    What I found was that anything around the 60 mins mark and above just failed to render in HD and showed the -108 error.
    What worked for me was creating two project files - one around 57mins long - the other a part 2 - around 17 mins long. All using exactly the same source clips, photo's, music and transitions as the orginal.
    This now works. I guess having it split in two makes it a little easier to work with as I wont have to keep rendering the first part which does not change but really wish Apple would throw some light on this.
    Anyway - I hope all of the above at least proves useful for others.
    Good Luck

  • Help me please about export file is .wmv

    help me please about export file is .wmv from final cut pro
    It have black side at right and left in clip when export finished
    I have flip4mac program in my mac
    How do I edit.

    Let me help getting your question back to something we might understand.
    - You are exporting your video AS .wmv
    and
    - when you export it, there are black bars left and right of the image.
    How do you fix?
    Ok - what was the format of the video prior to your exporting it? When you edited it in FCP, what were the sequence settings? That will help get the right settings for flip4mac.
    CaptM

  • Export Project from Eclipse..?

    Hi All,
    How to export a Java Project from Eclipse including CLASSPATH libraries and that are in CONFIGPATH.. without missing..?
    Thanks,
    Vishnu

    As already suggested, you can export the entire Eclipse project as an archive like zip/tar, copy the archive to other system, extract and import it as an existing project into Eclipse on that system.
    Now to export an entire Eclipse project into an archive file, you can use File -> Export and select "Archive File" (under category "General") from the list of options and select the project you would like to export. It will create the archive of your project's filesystem including classpath and buildpath entries. You would have to ensure that all the classpath and buildpath entries, ATG Root etc. are valid on the system where you import it or you can update them manually if required.

  • Cannot export iMovie project - Help please

    When I try to share the project I've worked on for over a week, I get the following ...
    However, that event is in the iMovie library.
    The only thing that happened differently this time is that I mistakenly deleted the event files from the event library before I exported the project to save disk space. But once I found out I needed the event clips in iMovie in order to share the project, I found out the clips are still in User > Movies > iMovie Events > British Isles Cruise 2013, so I imported them back into my Event Library in iMovie. So the Event and all the clips are back in iMovie, but I'm still getting the above error, as if iMovie doesn't realize the event is still there, and I cannot share or do anything with my project other than view it in iMovie.
    Any help on this would be much appreciated.
    Thanks!

    you haven't renamed any files/folders?
    just dragged them out of the Events folder, and back, right?
    try this …
    quit iMovie
    goto Library/Preferences and trash com.apple.iMovieApp.plist
    launch iMovie again ....
                     How do I trash the iMovie Preferences File? and Why?

  • I movie crushes when i try to export the project or to see it in full screen. Help me, please

    When I try to export the project or to see it in full screen, I movie crashes. Can you help me?

    itunes if it recognizes the iphone the poblema , Is That does not want me formater In the process the error 3004 appears  I bloquio iphone Because I forgot the key then a need to format

  • I am trying to export my project to an avi file, but its only exporting the audio, help?

    I am trying to export my project to an avi file, but its only exporting the audio, help? I can open the avi file but there is not video. I am choosing uncompressed avi, 1080x720 frame rate 29.97, what can i do?

    The above was a quote and AME is not necessary.  From the Timeline selected Ctrl-M brings up the Export window.  There select "AVI" and under Video Codec below select "None"

  • Can i import Jdeveloper project into Eclipse 4.7 juno????please help me.

    can i import Jdeveloper project into Eclipse 4.7 juno????please help me.
    when i tried this it is giving some errors in project ie mismatching in configurations....!so i want soln please .

    Hi,
    first recommendation is to not use Eclipse natively but use OEPE that ships with Eclispse Juno. This way you have the IDE prepared for ADF projects. However, still the JDeveloper workspace structure does not fit the Eclipse structure.
    Frank

  • I cannot export my project from Final Cut. All the options are disabled. Can anybody help me?

    I have the latest version of FCPX and the final version of Compressor. I have my project ready but I cannot export because everything (Compressor, DVD, MasterFile etc.) is disabled. I need to export this project ASAP.
    P.S. This is the first export that I am trying to do on a new iMac, with OS X Yosemite.
    Thank you all!

  • When I Try To Export My Project, Nothing Happens

    So during editing in Final Cut Pro X I noticed that there were a couple of hiccups in my movie, but scrolling over these events didn't reveal a problem. I decided to see if it was a processing problem by exporting my project. I went up to File, clicked on Share, clicked on Apple Devices 720p, clicked on Next in the window that came up, titled the project, set it to save to the desktop, clicked Save... And then nothing happened. I checked my desktop for the file but there was nothing there. I've tried saving the file to several different places but when I click Save nothing happens and the file isn't in the place it should be if it had been saved. FCPX is working fine in all other regards but it's just not exporting this project. I've checked and I don't have any broken pieces of footage. The only possible thing I can think of is the song I'm using is one I purchased off of iTunes, so maybe it won't let me export if the song is protected by iTunes, but that seems like a stretch. Any help is appreciated.

    Nevermind, I solved the problem. FCPX isn't showing me that it's rendering or whatever it's doing, but after about ten minutes the files show up. Still, any idea why it gives no indication that it's working?

  • Export OSB configuration from eclipse using ant script

    I am trying to export an OSB project from eclipse using ant script
    I followed the link below http://biemond.blogspot.com/2010/07/osb-11g-ant-deployment-scripts.html
    It is using com.bea.alsb.core.ConfigExport to do the export. This export is always set to resource level.
    I see it generates a file ExportInfo setting some properties. It has a property that set the export level as below
    <imp:property name="projectLevelExport" value="false"/>*
    How can I export the project in project level? basically setting projectLevelExport to true?
    So that if a file does not exist in the sbconfig.jar file , then while importing the jar to OSB server it will delete the file from the server instead of skipping it?
    I appreciate any help
    here is the ant script snippet that gets executed to export from eclipse
    <target name="exportFromWorkspace">
         <delete failonerror="false" includeemptydirs="true"
    dir="${metadata.dir}"/>     
                   <!--eclipse.refreshLocal resource="${config.project}" depth="infinite"/-->
    <java dir="${eclipse.home}"
    jar="${eclipse.home}/plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar"
    fork="true" failonerror="true" maxmemory="768m">
    <jvmarg line="-XX:MaxPermSize=256m"/>
    <arg line="-data ${workspace.dir}"/>
    <arg line="-application com.bea.alsb.core.ConfigExport"/>
    <arg line="-configProject ${config.project}"/>
    <arg line="-configJar ${config.jar}"/>
    <arg line="-configSubProjects ${config.subprojects}"/>
              <arg line="-exportLevel true"/>
    <arg line="-includeDependencies ${config.includeDependencies}"/>
    <sysproperty key="weblogic.home" value="${weblogic.home}"/>
    <sysproperty key="osb.home" value="${osb.home}"/>
    <sysproperty key="osgi.bundlefile.limit" value="500"/>
    <sysproperty key="harvester.home" value="${osb.home}/harvester"/>
    <sysproperty key="osgi.nl" value="en_US"/>
    <sysproperty key="sun.lang.ClassLoader.allowArraySyntax" value="true"/>
    </java>
    </target>

    yes, I specified the project name to export the whole project.
    Here is few lines from my properties file
    # properties for workspace export
    config.project="OSB Configuration-GW"
    config.jar=D:/workspace/osb/scripts/gateway/mycode2/ant_osb/dist/sbconfig.jar
    config.subprojects="GatewaySecurity"
    config.includeDependencies=true
    workspace.dir=D:/workspace/osb/gateway-workspace
    But this property does not make it to export at project level ,it export the specified project at resource level.
    And while importing this jar to OSB server, if a file is missing it skips the file instead of deleting the file from the OSB server
    If I unjar sbconfig.jar file, open ExportInfo file and update the line in bold below to true then it deletes the file from OSB server, if not exist in sbconfig.jar
    <imp:property name="exporttime" value="Thu Dec 29 13:57:44 EST 2011"/>
    <imp:property name="productname" value="Oracle Service Bus"/>
    <imp:property name="productversion" value="11.1.1.4"/>
    *<imp:property name="projectLevelExport" value="false"/>*
    Here is few lines from Oracle API java doc
    http://docs.oracle.com/cd/E13171_01/alsb/docs26/javadoc/com/bea/wli/sb/management/importexport/ALSBImportOperation.Operation.html
    public static final ALSBImportOperation.Operation Delete
    Indicates that the resource is deleted in the importing domain. This is the default operation when the project is exported in its entirety and the resource exists in the target domain but not in the jar file
    public static final ALSBImportOperation.Operation Skip
    Indicates that the resource is skipped meaning the resource is not touched in the importing domain. This is the default operation if the jar file was exported at the resource level, and a resource that exists in the target domain, does not exist in the jar file.

  • How can i import dll files in java project in eclipse?

    Hi All,
    How can i import or link dll files in java project in eclipse?....
    dll files contains
    import com.ms.com.ComLib;
    import com.ms.com.Variant;
    import com.ms.com.ComFailException;
    import com.ms.wfc.data.AdoException;
    import com.ms.wfc.data.AdoEnums;
    Any idea of this please tell me.....
    I am using eclipse 3.4 and JRE 1.4
    Is this possible?
    Please tell me!!!!!!!!!!!!!
    Voddapally

    iMovie cannot edit mpg files, unles they come directly from a supported camera.
    I would suggest that you use a free third party app to convert it.
    Get MPEG Streamclip from Squared 5, which is free.
    Drag you mpg clip into MPEG Streamclip.
    Then, FILE/EXPORT USING QUICKTIME
    Choose Apple Intermediate Codec, and save it where you can find it. You should be able to import this file into iMovie, using the FILE/IMPORT/MOVIE command.
    Note: If your file is an MPEG2 clip, you may need to purchase the Apple QuickTime MPEG2 Playback Component from Apple. MPEG Streamclip will tell you if you need this. Don't buy it unless you have to. It costs about $20. You just have to install the component. MPEG Streamclip will use it in the background.

Maybe you are looking for

  • I just connected an external hard drive to my Time Capsule.

    I have Mountain Lion installed on my 2010 MacBook Pro.  The external HD is not showing up. Is there something else I need to do or is it supposed to show up in the sidebar of Finder?

  • New feature phone

    I have heard that there is a new feature phone coming out from samsung. The samsung u380?? Anyone else hear this?

  • Apple ID disabled, WHY???? have reset passord twice and signed in and out!!!

    Please help!!!!! I've tried from my macbook pro and iphone...new iphone 4, not sure if that makes a difference but really frustrated!!!

  • Coldfusion memory issue

    Hi, One of our Public web site is developed in ColdFusion. This runs on a server having OS Windows Server 2003 Standard Edition with 4 CPUS and 4 GB RAM. The issue is that, after every couple of hours, the Coldfusion Jrun processer memory utilization

  • PC wireless card for Airport Express?

    Hi. I just got myself an Apple Airport Express. It works with my MacBook Pro perfectly. I need to extend it's use to my PC with Windows XP which has all the music. I want to know which internal wireless card with wi-fi 802.11n works best on a PC? Can