Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » how to actually run VE code...?
how to actually run VE code...? [message #87102] Thu, 14 April 2005 05:20 Go to next message
Eclipse UserFriend
Originally posted by: simon.ou.edu

Hi...

How do I actually run the code generated from VE? When I try to run the
code, I get the following (see below at the end of the message). The
tutorial at


http://www-106.ibm.com/developerworks/opensource/library/os- ecvisual/


says to put something like what follows in the arguments:


-Djava.library.path=C:\eclipse\plugins\org.eclipse.swt.win32 _3.0.0\os\win32\x86


but I do not see a 'org.eclipse.swt.win32...' plugin any where. I wonder
what I could do to run the code? Thanks.

Regards...

Miguel.



Exception in thread "main" java.lang.UnsatisfiedLinkError: no
swt-win32-3128 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:12 3)
at org.eclipse.swt.internal.win32.OS.<clinit>(OS.java:18)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:125)
at SWTExample.main(SWTExample.java:30)
Re: how to actually run VE code...? [message #87129 is a reply to message #87102] Thu, 14 April 2005 09:32 Go to previous messageGo to next message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi Miguel,

> How do I actually run the code generated from VE? When I try to run the
> code, I get the following (see below at the end of the message). The
> tutorial at
> http://www-106.ibm.com/developerworks/opensource/library/os- ecvisual/
>
> says to put something like what follows in the arguments:
> -Djava.library.path=C:\eclipse\plugins\org.eclipse.swt.win32 _3.0.0\os\win32\x86
>
> but I do not see a 'org.eclipse.swt.win32...' plugin any where. I wonder
> what I could do to run the code? Thanks.

SWT requires a bit of native code every operating system it runs on, and
the name and location of this varies. If you're using Eclipse 3.1 as
your development platform then this has a new friendly launcher called
"SWT Application". Select this instead of "Java Application" and it
does a pretty good job of finding the location of the native library and
adding it to the VM arguments for you. If this works you can also go to
the debug perspective, bring up the properties on the entry in the Debug
viewer you will actually see the whole arguments to the javaw.exe
command and you could copy and paste the -Djava.library ... bit if
you're trying to create a batch file for example.

How did you find the tutorial overall ? If you've got any feedback
please add it to the bugzilla
https://bugs.eclipse.org/bugs/show_bug.cgi?id=88801. It's having its
final review right now by the Eclipsecorner editors for formatting and
stuff, but if you found any errors or anything more that needs
explaining please let us know, as in the new few days it'll move from
our CVS repository where we can make instant change to the Eclipsecorner
one where we don't have commit rights and updates will become harder.

Best regards,

Joe Winchester
Re: how to actually run VE code...? [message #87174 is a reply to message #87129] Thu, 14 April 2005 14:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Joe, The SWT launcher from Eclipse is broken right now. They also got
caught by the everything in jar problem that we got bit with!


--
Thanks,
Rich Kulp
Re: how to actually run VE code...? [message #87187 is a reply to message #87174] Thu, 14 April 2005 15:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: simon.ou.edu

Hi Rich...

Thanks for this update. I was not sure of what I was doing wrong because
I could not get any thing to work.

Using E.3.1, with the latest VE nightly build, how could I run the VE
SWT example? I do not find the org.eclipse.swt.win32_3... plugin. Is
this broken somehow, or... I am not too sure of what to do. The following:

-Djava.library.path=" installation_directory\plugins\org.eclipse.swt.win32_3.0.0\o s\win32\x86

seems not to be an option? Thanks for your suggestions.

Regards...

Miguel.



Rich Kulp wrote:
> Joe, The SWT launcher from Eclipse is broken right now. They also got
> caught by the everything in jar problem that we got bit with!
>
>
Re: how to actually run VE code...? [message #87199 is a reply to message #87129] Thu, 14 April 2005 15:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: simon.ou.edu

Hi Joe...

Thanks for your help.

The SWT launcher did not work, but we know this now.

With regard to the article, I have not been able to put time into this
yet, but it does look very promising. I think that the format is
adequate, and the message does get across. It seems that the article is
adequate at least for folks at my proficiency level ( <= medium).
Thanks for the efforts that have gone in the article.

I am interested in a 2D plot widget that scrolls as inputs come by. I
will use your article to see if I can do something along this line.
Thanks again.

Regards...

Miguel.


Joe Winchester wrote:
>
>
> SWT requires a bit of native code every operating system it runs on, and
> the name and location of this varies. If you're using Eclipse 3.1 as
> your development platform then this has a new friendly launcher called
> "SWT Application". Select this instead of "Java Application" and it
> does a pretty good job of finding the location of the native library and
> adding it to the VM arguments for you. If this works you can also go to
> the debug perspective, bring up the properties on the entry in the Debug
> viewer you will actually see the whole arguments to the javaw.exe
> command and you could copy and paste the -Djava.library ... bit if
> you're trying to create a batch file for example.
>
> How did you find the tutorial overall ? If you've got any feedback
> please add it to the bugzilla
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=88801. It's having its
> final review right now by the Eclipsecorner editors for formatting and
> stuff, but if you found any errors or anything more that needs
> explaining please let us know, as in the new few days it'll move from
> our CVS repository where we can make instant change to the Eclipsecorner
> one where we don't have commit rights and updates will become harder.
>
> Best regards,
>
> Joe Winchester
Re: how to actually run VE code...? [message #87213 is a reply to message #87187] Thu, 14 April 2005 16:22 Go to previous messageGo to next message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi Miguel,

Run your class with the main(String[]) method using the Java Application
launcher and look at the error message. You had one like:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no
swt-win32-3128 in java.library.path

Find the file swt-win32-3128.dll in the file system. You could just
Windows explorer and just search for it starting at the root location of
your Eclipse install. Once you have file right mouse click and bring up
its properties and in Windows you can select beside the Location label
and use Ctrl+C to copy this into the clipboard. Let's assume the label
is something like:

C:\Eclipse_3_1_M6\eclipse\workspaces\dev_04_11\org.eclipse.s wt.win32\os\win32\x86\swt-win32-3128.dll.

Then go back to your Java Application launcher configuration, select the
second tab called Arguments and in the text box called VM Arguments:
write the line;

-Djava.library.path=""

and between the quotation marks copy the clipboard contents and remove
the last segment (the actual dll name) so it'd become something like

-Djava.library.path=" C:\Eclipse_3_1_M6\eclipse\workspaces\dev_04_11\org.eclipse.s wt.win32\os\win32\x86 "

I think from Rich's post that there might be some issue with the actual
location of the dll being in a jar file in which case you'd need to
extract it. However it worked for me using an M6 3.1 driver although I
had imported the plugin project org.eclipse.swt into my workspace.

Best regards,

Joe
Re: how to actually run VE code...? [message #87228 is a reply to message #87213] Thu, 14 April 2005 16:38 Go to previous message
Eclipse UserFriend
Originally posted by: simon.ou.edu

Hi Joe...

Yes, this works. Simple and easy. Thanks again.

Regards...

Miguel.


Joe Winchester wrote:
> Hi Miguel,
>
> Run your class with the main(String[]) method using the Java Application
> launcher and look at the error message. You had one like:
>
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no
> swt-win32-3128 in java.library.path
>
> Find the file swt-win32-3128.dll in the file system. You could just
> Windows explorer and just search for it starting at the root location of
> your Eclipse install. Once you have file right mouse click and bring up
> its properties and in Windows you can select beside the Location label
> and use Ctrl+C to copy this into the clipboard. Let's assume the label
> is something like:
>
> C:\Eclipse_3_1_M6\eclipse\workspaces\dev_04_11\org.eclipse.s wt.win32\os\win32\x86\swt-win32-3128.dll.
>
>
> Then go back to your Java Application launcher configuration, select the
> second tab called Arguments and in the text box called VM Arguments:
> write the line;
>
> -Djava.library.path=""
>
> and between the quotation marks copy the clipboard contents and remove
> the last segment (the actual dll name) so it'd become something like
>
> -Djava.library.path=" C:\Eclipse_3_1_M6\eclipse\workspaces\dev_04_11\org.eclipse.s wt.win32\os\win32\x86 "
>
>
> I think from Rich's post that there might be some issue with the actual
> location of the dll being in a jar file in which case you'd need to
> extract it. However it worked for me using an M6 3.1 driver although I
> had imported the plugin project org.eclipse.swt into my workspace.
>
> Best regards,
>
> Joe
Re: how to actually run VE code...? [message #607141 is a reply to message #87102] Thu, 14 April 2005 09:32 Go to previous message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi Miguel,

> How do I actually run the code generated from VE? When I try to run the
> code, I get the following (see below at the end of the message). The
> tutorial at
> http://www-106.ibm.com/developerworks/opensource/library/os- ecvisual/
>
> says to put something like what follows in the arguments:
> -Djava.library.path=C:\eclipse\plugins\org.eclipse.swt.win32 _3.0.0\os\win32\x86
>
> but I do not see a 'org.eclipse.swt.win32...' plugin any where. I wonder
> what I could do to run the code? Thanks.

SWT requires a bit of native code every operating system it runs on, and
the name and location of this varies. If you're using Eclipse 3.1 as
your development platform then this has a new friendly launcher called
"SWT Application". Select this instead of "Java Application" and it
does a pretty good job of finding the location of the native library and
adding it to the VM arguments for you. If this works you can also go to
the debug perspective, bring up the properties on the entry in the Debug
viewer you will actually see the whole arguments to the javaw.exe
command and you could copy and paste the -Djava.library ... bit if
you're trying to create a batch file for example.

How did you find the tutorial overall ? If you've got any feedback
please add it to the bugzilla
https://bugs.eclipse.org/bugs/show_bug.cgi?id=88801 It's having its
final review right now by the Eclipsecorner editors for formatting and
stuff, but if you found any errors or anything more that needs
explaining please let us know, as in the new few days it'll move from
our CVS repository where we can make instant change to the Eclipsecorner
one where we don't have commit rights and updates will become harder.

Best regards,

Joe Winchester
Re: how to actually run VE code...? [message #607144 is a reply to message #87129] Thu, 14 April 2005 14:34 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

Joe, The SWT launcher from Eclipse is broken right now. They also got
caught by the everything in jar problem that we got bit with!


--
Thanks,
Rich Kulp
Re: how to actually run VE code...? [message #607145 is a reply to message #87174] Thu, 14 April 2005 15:42 Go to previous message
Eclipse UserFriend
Originally posted by: simon.ou.edu

Hi Rich...

Thanks for this update. I was not sure of what I was doing wrong because
I could not get any thing to work.

Using E.3.1, with the latest VE nightly build, how could I run the VE
SWT example? I do not find the org.eclipse.swt.win32_3... plugin. Is
this broken somehow, or... I am not too sure of what to do. The following:

-Djava.library.path=" installation_directory\plugins\org.eclipse.swt.win32_3.0.0\o s\win32\x86

seems not to be an option? Thanks for your suggestions.

Regards...

Miguel.



Rich Kulp wrote:
> Joe, The SWT launcher from Eclipse is broken right now. They also got
> caught by the everything in jar problem that we got bit with!
>
>
Re: how to actually run VE code...? [message #607146 is a reply to message #87129] Thu, 14 April 2005 15:52 Go to previous message
Eclipse UserFriend
Originally posted by: simon.ou.edu

Hi Joe...

Thanks for your help.

The SWT launcher did not work, but we know this now.

With regard to the article, I have not been able to put time into this
yet, but it does look very promising. I think that the format is
adequate, and the message does get across. It seems that the article is
adequate at least for folks at my proficiency level ( <= medium).
Thanks for the efforts that have gone in the article.

I am interested in a 2D plot widget that scrolls as inputs come by. I
will use your article to see if I can do something along this line.
Thanks again.

Regards...

Miguel.


Joe Winchester wrote:
>
>
> SWT requires a bit of native code every operating system it runs on, and
> the name and location of this varies. If you're using Eclipse 3.1 as
> your development platform then this has a new friendly launcher called
> "SWT Application". Select this instead of "Java Application" and it
> does a pretty good job of finding the location of the native library and
> adding it to the VM arguments for you. If this works you can also go to
> the debug perspective, bring up the properties on the entry in the Debug
> viewer you will actually see the whole arguments to the javaw.exe
> command and you could copy and paste the -Djava.library ... bit if
> you're trying to create a batch file for example.
>
> How did you find the tutorial overall ? If you've got any feedback
> please add it to the bugzilla
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=88801 It's having its
> final review right now by the Eclipsecorner editors for formatting and
> stuff, but if you found any errors or anything more that needs
> explaining please let us know, as in the new few days it'll move from
> our CVS repository where we can make instant change to the Eclipsecorner
> one where we don't have commit rights and updates will become harder.
>
> Best regards,
>
> Joe Winchester
Re: how to actually run VE code...? [message #607147 is a reply to message #87187] Thu, 14 April 2005 16:22 Go to previous message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi Miguel,

Run your class with the main(String[]) method using the Java Application
launcher and look at the error message. You had one like:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no
swt-win32-3128 in java.library.path

Find the file swt-win32-3128.dll in the file system. You could just
Windows explorer and just search for it starting at the root location of
your Eclipse install. Once you have file right mouse click and bring up
its properties and in Windows you can select beside the Location label
and use Ctrl+C to copy this into the clipboard. Let's assume the label
is something like:

C:\Eclipse_3_1_M6\eclipse\workspaces\dev_04_11\org.eclipse.s wt.win32\os\win32\x86\swt-win32-3128.dll.

Then go back to your Java Application launcher configuration, select the
second tab called Arguments and in the text box called VM Arguments:
write the line;

-Djava.library.path=""

and between the quotation marks copy the clipboard contents and remove
the last segment (the actual dll name) so it'd become something like

-Djava.library.path=" C:\Eclipse_3_1_M6\eclipse\workspaces\dev_04_11\org.eclipse.s wt.win32\os\win32\x86 "

I think from Rich's post that there might be some issue with the actual
location of the dll being in a jar file in which case you'd need to
extract it. However it worked for me using an M6 3.1 driver although I
had imported the plugin project org.eclipse.swt into my workspace.

Best regards,

Joe
Re: how to actually run VE code...? [message #607148 is a reply to message #87213] Thu, 14 April 2005 16:38 Go to previous message
Eclipse UserFriend
Originally posted by: simon.ou.edu

Hi Joe...

Yes, this works. Simple and easy. Thanks again.

Regards...

Miguel.


Joe Winchester wrote:
> Hi Miguel,
>
> Run your class with the main(String[]) method using the Java Application
> launcher and look at the error message. You had one like:
>
> Exception in thread "main" java.lang.UnsatisfiedLinkError: no
> swt-win32-3128 in java.library.path
>
> Find the file swt-win32-3128.dll in the file system. You could just
> Windows explorer and just search for it starting at the root location of
> your Eclipse install. Once you have file right mouse click and bring up
> its properties and in Windows you can select beside the Location label
> and use Ctrl+C to copy this into the clipboard. Let's assume the label
> is something like:
>
> C:\Eclipse_3_1_M6\eclipse\workspaces\dev_04_11\org.eclipse.s wt.win32\os\win32\x86\swt-win32-3128.dll.
>
>
> Then go back to your Java Application launcher configuration, select the
> second tab called Arguments and in the text box called VM Arguments:
> write the line;
>
> -Djava.library.path=""
>
> and between the quotation marks copy the clipboard contents and remove
> the last segment (the actual dll name) so it'd become something like
>
> -Djava.library.path=" C:\Eclipse_3_1_M6\eclipse\workspaces\dev_04_11\org.eclipse.s wt.win32\os\win32\x86 "
>
>
> I think from Rich's post that there might be some issue with the actual
> location of the dll being in a jar file in which case you'd need to
> extract it. However it worked for me using an M6 3.1 driver although I
> had imported the plugin project org.eclipse.swt into my workspace.
>
> Best regards,
>
> Joe
Previous Topic:My bean extends JPanel and is not visible when I choo it as a new Visual component
Next Topic:how to visually edit an old program made in Visual Age for Java?
Goto Forum:
  


Current Time: Tue Apr 23 08:02:00 GMT 2024

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

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

Back to the top