Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Running a SWT app in a different OS
Running a SWT app in a different OS [message #655380] Sun, 20 February 2011 09:04 Go to next message
No real name is currently offline No real nameFriend
Messages: 1
Registered: February 2011
Junior Member
So I created a nice little app that uses swt using Eclipse in a Windows 7 environment. I created an executable jar file using fat-jar and it runs fine anywhere on this machine (I have not tested on other Windows 7 machines since I only have one).

Now I want to make this thing work on a Mac OSX machine that only has the JRE installed. I have, however, not been able to do this. Clearly the executable jar that I created for Windows 7 would not work on the Mac OSX, but I am not sure what I need to actually do to make the same code work on the Mac.

Any help would be greatly appreciated =). If needed I can elaborate a bit on the details.

[Updated on: Sun, 20 February 2011 09:37]

Report message to a moderator

Re: Running a SWT app in a different OS [message #655573 is a reply to message #655380] Mon, 21 February 2011 19:26 Go to previous messageGo to next message
Lakshmi ShanmugamFriend
Messages: 276
Registered: July 2009
Location: India
Senior Member
Hi,

The app you created uses swt.jar and it is platform specific. Hence, to make your application work on Mac OSX you need to use the mac specific swt.jar.
Steps:
1) download the platform specific zip files from here --> http://www.eclipse.org/swt/ -- under Releases section.
2) Extract the zip file to find the platform specific swt.jar.
3) Use this swt.jar while creating the executable jar for mac
4) While running the app on Mac OSX you need launch java with an additional option --> -XstartOnFirstThread. For more info --> http://eclipse.org/swt/macosx/




Lakshmi P Shanmugam
Re: Running a SWT app in a different OS [message #656085 is a reply to message #655380] Thu, 24 February 2011 04:10 Go to previous message
Eclipse UserFriend
Originally posted by: n.n.nnn

On Sun, 20 Feb 2011 04:04:40 -0500, flavkupe wrote:

> So I created a nice little app that uses swt using Eclipse in a Windows
> 7 environment. I created an executable jar file using fat-jar and it
> runs fine anywhere on this machine or another Windows 7 machine with
> JRE.
>
> Now I want to make this thing work on a Mac OSX machine that only has
> the JRE installed. I have, however, not been able to do this. Clearly
> the executable jar that I created for Windows 7 would not work on the
> Mac OSX, but I am not sure what I need to actually do to make the same
> code work on the Mac.

You could see if the RCP Delta Pack is available for Mac. This assumes
that the app will run and look/work 100% to your liking on each platform.

Personally I recommend to download Eclipse on your target platforms and
share the source using something like Subversion and the Subclipse plugin
and then you can tweak any platform specific imperfections.

You don't need a Subversion server, Subclipse understands a local
file repository which can be shared through SSH, I assume Mac has
SSH, Linux does.
Previous Topic:Custom-Drawing in first Tree-Column problem on Windows
Next Topic:Getting the active cell of a table
Goto Forum:
  


Current Time: Mon Mar 30 14:55:48 GMT 2020

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

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

Back to the top