Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Hello World Swing Client not showing up?
Hello World Swing Client not showing up? [message #805829] Fri, 24 February 2012 07:31 Go to next message
Kai Wähner is currently offline Kai Wähner
Messages: 4
Registered: February 2012
Junior Member
Hello.

I just downloaded and started the current release of Eclipse Scout. I use a Macbook Air with Lion and Java 6.

I tried to get started with the Hello World tutorial.

Server and SWT client work fine, but the Swing client does not show up. It starts and is running. No error messages or exceptions. Nevertheless, the client does not show up anywhere... There is also no seconds Eclipse / RCP starting as it is when I start a SWT client.

The console output of the client is:
2012-02-24 08:15:52.358 java[598:407] [Java CocoaComponent compatibility mode]: Enabled
2012-02-24 08:15:52.359 java[598:407] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000

The server does not have any console output.

Any guess? Do you need more details?

Best regards,
Kai
Re: Hello World Swing Client not showing up? [message #805841 is a reply to message #805829] Fri, 24 February 2012 07:57 Go to previous messageGo to next message
Ivan Motsch is currently offline Ivan Motsch
Messages: 100
Registered: March 2010
Senior Member
This is strong related to bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=212617

Basically on macosx swt must be started on first thread, swing/awt must be started on second thread.

For swing to work, the IDE must be started on second thread.
Unfortunately eclipse ties the -ws switch to this behaviour.

Following works for me on a MacBook Pro with Lion and Java 6 and eclipse 3.7.1:

1) Edit the eclipse IDE(!) eclipse.ini (Right click on eclipse app "Show Contents" and in the folder MacOS there is the eclipse.ini)
Change -XstartOnFirstThread to -XstartOnSecondThread

2a) Edit the run configuration for your application:
In the "Arguments - Program arguments" remove the -ws ${target.ws} switch and add --launcher.secondThread

2b) Edit the *.product configuration for your application:
In the "Launching" tab in the "Launching Arguments" section in the "All" and "macosx" tabs remove the -XstartOnFirstThread option and (eventually) add the -XstartOnSecondThread


I know, much to do, buit in the end it works. Unfortunately there is not yet an easier solution since eclipse ide does not know upfront whether it should start a core native ui such as swt or a secondary ui such as awt.
Re: Hello World Swing Client not showing up? [message #805845 is a reply to message #805841] Fri, 24 February 2012 07:59 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 691
Registered: October 2011
Senior Member
Thanks for this answer, because it is also something I am interseted in (Mac OS X 10.5).

I will give it a try.
Re: Hello World Swing Client not showing up? [message #805866 is a reply to message #805845] Fri, 24 February 2012 08:33 Go to previous messageGo to next message
Kai Wähner is currently offline Kai Wähner
Messages: 4
Registered: February 2012
Junior Member
Thanks for the quick answer and explanation. At least, there is a workaround! Smile
Re: Hello World Swing Client not showing up? [message #808246 is a reply to message #805866] Mon, 27 February 2012 15:21 Go to previous messageGo to next message
Ivan Motsch is currently offline Ivan Motsch
Messages: 100
Registered: March 2010
Senior Member
did it work?

here a summarized (more comprehensive:-)) version:
1) The IDE eclipse.ini (as i re-checked it) must not necessarily be modified.
2) Start the IDE and go to the product configuration
3) Run/Debug the product, immediately stop it.
4) go to Run... / Debug... menu in eclipse IDE and remove the program argument -ws ${target.ws}
5) Start again.

For production environment:
The my_application.ini (in the my_application.app) typically contains the following
--launcher.secondThread
-vmargs
-Xms64m
-Xmx256m


This can be done by modifying the product configuration:
   <launcherArgs>
      <programArgsMac>--launcher.secondThread</programArgsMac>
      <vmArgs>-Xms64m
-Xmx256m</vmArgs>
   </launcherArgs>

Re: Hello World Swing Client not showing up? [message #808797 is a reply to message #808246] Tue, 28 February 2012 06:34 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie Bresson
Messages: 691
Registered: October 2011
Senior Member
This post gives me the occasion to try SWING (For the moment I was focusing on SWT).

The method you describe do not work for me...

I found also a VM argument specific to the mac:
-Dorg.eclipse.swt.internal.carbon.smallFonts


It was probably added by the SDK. I tried with and without it...
Is this argument needed ?

In some cases I got the lines:
[Java CocoaComponent compatibility mode]: Enabled
[Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000
and sometimes not.
Re: Hello World Swing Client not showing up? [message #809088 is a reply to message #805829] Tue, 28 February 2012 13:17 Go to previous message
Matthias Villiger is currently offline Matthias Villiger
Messages: 78
Registered: September 2011
Member
There is also a short guide on how to use swing client on Mac OS X in the Minicrm Tutorial: New_Eclipse_Scout_Project.
At the end of chapter "Create a new Eclipse Scout project" you can find some hints. Do they help?
Previous Topic:Eclipse Scout Architecture: Why is there a Web Server / Web Container?
Next Topic:New Derby Database
Goto Forum:
  


Current Time: Tue Sep 16 03:17:55 GMT 2014

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

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