Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to export Java Project and run outside of eclipse
How to export Java Project and run outside of eclipse [message #144977] Tue, 24 February 2004 16:29 Go to next message
Emma Zhang is currently offline Emma ZhangFriend
Messages: 6
Registered: July 2009
Junior Member
I have a Java project build on eclipse and run as java application.
How can I export it and run somewhere else without eclipse?
I export the project to a jar file follow the export wizard.
The project includes several eclipse jars, such as swt.jar, jface.jar
and runtime.jar. I copied these jar files to the same location as
my project jar. But when I run it, I got the following error
------------------------------------------------------------ ------
Exception in thread "main" java.lang.UnsatisfiedLinkError: no
swt-win32-2135 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 org.eclipse.swt.internal.Library.loadLibrary(Library.java:10 8)
at org.eclipse.swt.internal.win32.OS.<clinit>(OS.java:46)
at
org.eclipse.swt.widgets.Display.internal_new_GC(Display.java :1291)
at org.eclipse.swt.graphics.Device.init(Device.java:547)
at org.eclipse.swt.widgets.Display.init(Display.java:1310)
at org.eclipse.swt.graphics.Device.<init>(Device.java:96)
at org.eclipse.swt.widgets.Display.<init>(Display.java:291)
at org.eclipse.swt.widgets.Display.<init>(Display.java:287)
at com.ibm.commerce.test.test_eclipse.main(test_eclipse.java:10 3)
------------------------------------------------------------ ------
Somebody told me that java application with GUI cannnot be run outside of
eclipse, is that true?

Thanks!
Re: How to export Java Project and run outside of eclipse [message #145044 is a reply to message #144977] Tue, 24 February 2004 17:54 Go to previous message
Eclipse UserFriend
Originally posted by: ab3001_2000_nospam.yahoo.com

"Emma Zhang" <hongling@ca.ibm.com> wrote in message
news:c1fu4c$lbe$1@eclipse.org...

> Exception in thread "main" java.lang.UnsatisfiedLinkError: no
> swt-win32-2135 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 org.eclipse.swt.internal.Library.loadLibrary(Library.java:10 8)
> at org.eclipse.swt.internal.win32.OS.<clinit>(OS.java:46)
> at
> org.eclipse.swt.widgets.Display.internal_new_GC(Display.java :1291)
> at org.eclipse.swt.graphics.Device.init(Device.java:547)
> at org.eclipse.swt.widgets.Display.init(Display.java:1310)
> at org.eclipse.swt.graphics.Device.<init>(Device.java:96)
> at org.eclipse.swt.widgets.Display.<init>(Display.java:291)
> at org.eclipse.swt.widgets.Display.<init>(Display.java:287)
> at com.ibm.commerce.test.test_eclipse.main(test_eclipse.java:10 3)
> ------------------------------------------------------------ ------
> Somebody told me that java application with GUI cannnot be run outside of
> eclipse, is that true?
>
> Thanks!
>

Hi Emma,

You just need to have the referenced swt dll in the Java path.

Use -Djava.library.path=%DLLPATH% where DLLPATH represents a path to the
folder where the DLL lives. SWT doesn't require Eclipse to work

HTH
Alec
Previous Topic:org.eclipse.pde.junit (LinkageError)
Next Topic:Can you make Eclipse not display files with certain extension in Java perspective?
Goto Forum:
  


Current Time: Mon Jul 22 02:31:48 GMT 2024

Powered by FUDForum. Page generated in 0.02661 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top