Results 1 to 4 of 4

Thread: Fat Jar Eclipse problems

  1. #1
    Join Date
    Jul 2010
    Posts
    36

    Fat Jar Eclipse problems

    Have a purpose of applying and wanted to export .... I have to "FatJar" I then downloaded and installed a test AWT program that is basically just a simple window. This also works as wunederbar everything but my main application was written with SWT, and I TestSWTFenster program with FatJar exported. Happened but not when I want to run the JAR. I call my TestSWT.jar on the console I get the following error message :
    Code:
    H: \> java - jar jar TestSWT_fat.
     Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-win32-3232 in
     java.library.path
             java.lang.ClassLoader.loadLibrary at (Unknown Source)
             java.lang.Runtime.loadLibrary0 at (Unknown Source)
             java.lang.System.loadLibrary at (Unknown Source)
             at org.eclipse 123) swt. internal.Library.loadLibrary (Library.java:
             at org.eclipse internal.win32.OS.. swt <clinit>. (OS.java: 18)
             at org.eclipse widgets.Display.. swt <clinit>. (Display.java: 125)
             gui at 26.) Gui. main. (Gui java:
    I call this without the "- jar" on I get the following message :
    H: \> java TestSWT_fat jar.
    Exception in thread "main" java.lang.NoClassDefFoundError: TestSWT_fat / jar
    So I know that it has anything to do with the classpath, but where and how I set now? So can I put generally in the "windows classpath" but my application is supposed to run on other computers so be an Independent. How do I get it now in the relatively "main.class" to the dll and classes to look? Please help me...

  2. #2
    Join Date
    Dec 2008
    Posts
    202

    Re: Fat Jar Eclipse problems

    Instead <Mainclass.class> use the name of the class to be executed, as given below :
    java-cp TestSWT_fat. <Mainclass.class> jar
    In Eclipse under File ---> Import / Export as Jar ----. ..... The manifest file is then automatically ... it makes the menu items may follow .... so you know where the executable file is that you can then run in DOS mode ... Perhaps this helps even further?

  3. #3
    Join Date
    Dec 2008
    Posts
    161

    Re: Fat Jar Eclipse problems

    Fat Jar Eclipse Plug-In (fjep): add Eclipse Export Wizard, add one of the Java projects, along with all the libraries in a single executable JAR file along packs But regarding your problem, are you sure I unzipped your archive to the right place according to its structure (the name of the directory), it is perhaps unzip your archive:
    • A level before the directory of Eclipse (if your archive contains / eclipse / plugins /...)
    • In Eclipse (if your archive contains / plugins /...)
    • In subdirectory plugins Eclipse (if your archive contains the plugin directly)

  4. #4
    Join Date
    Jul 2010
    Posts
    37

    Re: Fat Jar Eclipse problems

    I developed a project in eclipse that needs images. When I run the project in eclipse, no problem, images are found but when I export my project jar (with FatJar) images are never found. I use ImageIO but here is my code to be more explicit.
    Code:
    URL url = getClass (). GetClassLoader (). GetResource ("\ \ icons \ \ img.jpg) 
    img = ImageIO.read (url).
    I then overrides the paint method of my component. Help me in resolving this problem.

Similar Threads

  1. Need Help with Eclipse mp4 player
    By Shotgunn95 in forum Technology & Internet
    Replies: 1
    Last Post: 16-04-2010, 09:11 PM
  2. MSI Eclipse SLI Motherboard
    By Mastermind in forum Reviews
    Replies: 14
    Last Post: 16-04-2009, 09:40 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,101,300.32414 seconds with 17 queries