Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-dev] Removing "Run As SWT Application" for 3.1 RC3

For 3.1 RC3, the action Run As ... -> SWT Application will be removed from 

In 3.1 M7, a feature was added to the .classpath support making it 
possible to specify the location of the SWT JNI libraries in the 
.classpath file:

        <classpathentry exported="true" sourcepath="" kind="lib" 
                        <attribute value="org.eclipse.swt" 

The advantage this approach has over the  "Run As SWT Application" action 
is that it works for Standalone SWT Java Projects and also for Standalone 
JUnit tests that use SWT.

The SWT team would like to thank the PDE UI team for the work put into 
providing and supporting "Run As SWT Application".   We appreciate all the 
effort this required.  However, since there is a more general mechanism 
now available, we think SWT should take advantage of it.  You know how we 
like to be like everyone else <g>.

If you are importing SWT into your workspace from the SWT plugin shipped 
with Eclipse, here are the steps to make it work:

1) Select "Import..." from the File menu.
2) Select "External Plug-ins and Fragments" in the Import wizard and click 
on the "Next" button.
3) Select "Import As Binary projects" and make sure the target platform is 
correct.  Click on the "Next" button.
4) Select org.eclipse.swt and org.eclipse.swt.<ws>.<os>.<arch> and click 
on the "Add" button. 
(<ws>, <os>, and <arch> should be replaced with the values for the 
platform you wish to run against.  e.g. org.eclipse.swt.gtk.linux.x86)
5) Click on the "Finish" button.
6) Select org.eclipse.swt in the Package Explorer.  From the right mouse 
menu, select "Properties".
7) Click on "Java Build Path" and then click on the "Libraries" tab.
8) Click on the "Add Jars..." button.
9) Select 
and click on the "OK" button.
10) Expand org.eclipse.swt.<ws>.<os>.<arch>_3.1.0.jar in the Libraries tab 
and select "Native library location".
11) Click on the "Edit..." button.
12) Click on the "Workspace..." button  in the "Native Library Folder 
Configuration" dialog.
13) Select org.eclipse.swt.<ws>.<os>.<arch> and click on the "OK" button.
14) Click on the "OK" button in the "Native Library Folder Configuration" 
15) Click on the "Order and Export" tab in the "properties for 
org.eclipse.swt" dialog.
16) Place a check against org.eclipse.swt.<ws>.<os>.<arch>_3.1.0.jar.
17) Click on the "OK" button.

Now your Standalone SWT Java Project can depend on org.eclipse.swt and you 
can launch your application with "Run As -> Java Application".

In the near future, we intend to make the steps above available as an 
Import wizard so it will be simple to use.

Back to the top