Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » AWT_SWT on mac osx
AWT_SWT on mac osx [message #452599] Tue, 22 March 2005 22:01 Go to next message
Anthony Perritano is currently offline Anthony PerritanoFriend
Messages: 32
Registered: July 2009
Member
Hi,
is there anytime frame for a AWT_SWT bridge for osx similar to ones for
windows and linux?

I would like my RCP application pop up AWT/Swing windows? is there
anyway i can make that happen now?

thanks,
Anthony Perritano
Re: AWT_SWT on mac osx [message #452600 is a reply to message #452599] Tue, 22 March 2005 23:52 Go to previous messageGo to next message
Frank Sauer is currently offline Frank SauerFriend
Messages: 18
Registered: July 2009
Junior Member
Nope, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384
This is a vry serious problem and I don't know if this is ever going to
be fixed... :-( Perhaps in the JDK1/5 with the new Tiger release
of OSX???

Frank

Anthony Perritano wrote:
> Hi,
> is there anytime frame for a AWT_SWT bridge for osx similar to ones for
> windows and linux?
>
> I would like my RCP application pop up AWT/Swing windows? is there
> anyway i can make that happen now?
>
> thanks,
> Anthony Perritano
Re: AWT_SWT on mac osx [message #452730 is a reply to message #452600] Wed, 23 March 2005 20:00 Go to previous messageGo to next message
Anthony Perritano is currently offline Anthony PerritanoFriend
Messages: 32
Registered: July 2009
Member
Hi,
I have been reading alot of the problems associated with the SWT_AWT
bridge on osx. I noticed a posting on apples job site for a Java
Frameworks Engineer mentioning implementation of Mac OSX SWT. I noticed
that on the Eclipse 3.1 plan an action item "Use Mac HIView (TBD)".
what do these mean? I have read conflicting messages such as
"impossible" and "not yet". Will there ever be? if so, in 3-9 months?

Thanks
Anthony Perritano

Frank Sauer wrote:
> Nope, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384
> This is a vry serious problem and I don't know if this is ever going to
> be fixed... :-( Perhaps in the JDK1/5 with the new Tiger release
> of OSX???
>
> Frank
>
> Anthony Perritano wrote:
>
>> Hi,
>> is there anytime frame for a AWT_SWT bridge for osx similar to ones
>> for windows and linux?
>>
>> I would like my RCP application pop up AWT/Swing windows? is there
>> anyway i can make that happen now?
>>
>> thanks,
>> Anthony Perritano
Re: AWT_SWT on mac osx [message #452735 is a reply to message #452730] Thu, 24 March 2005 05:02 Go to previous messageGo to next message
Frank Sauer is currently offline Frank SauerFriend
Messages: 18
Registered: July 2009
Junior Member
I would love to know the answer to this as well. A rough timeframe will
help me decide whether to embark on a major AWT => SWT/Draw2D porting
effort or not..... I'd rather not if there is a reasonable timeframe for
a working bridge.

Thanks,

Frank

Anthony Perritano wrote:
> Hi,
> I have been reading alot of the problems associated with the SWT_AWT
> bridge on osx. I noticed a posting on apples job site for a Java
> Frameworks Engineer mentioning implementation of Mac OSX SWT. I noticed
> that on the Eclipse 3.1 plan an action item "Use Mac HIView (TBD)". what
> do these mean? I have read conflicting messages such as "impossible" and
> "not yet". Will there ever be? if so, in 3-9 months?
>
> Thanks
> Anthony Perritano
>
> Frank Sauer wrote:
>
>> Nope, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384
>> This is a vry serious problem and I don't know if this is ever going
>> to be fixed... :-( Perhaps in the JDK1/5 with the new Tiger release
>> of OSX???
>>
>> Frank
>>
>> Anthony Perritano wrote:
>>
>>> Hi,
>>> is there anytime frame for a AWT_SWT bridge for osx similar to ones
>>> for windows and linux?
>>>
>>> I would like my RCP application pop up AWT/Swing windows? is there
>>> anyway i can make that happen now?
>>>
>>> thanks,
>>> Anthony Perritano
Re: AWT_SWT on mac osx [message #452739 is a reply to message #452730] Thu, 24 March 2005 08:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

What an Apple guy told me at EclipseCon is they want to hire an engineer
to do a Cocoa port of SWT, which would surely fix the SWT/AWT problem,
since AWT runs in Cocoa but the solution is likely to be a long way off
and may not happen at all. If I had to make a plan I wouldn't even think
about it.

Bob

Anthony Perritano wrote:
> Hi,
> I have been reading alot of the problems associated with the SWT_AWT
> bridge on osx. I noticed a posting on apples job site for a Java
> Frameworks Engineer mentioning implementation of Mac OSX SWT. I noticed
> that on the Eclipse 3.1 plan an action item "Use Mac HIView (TBD)". what
> do these mean? I have read conflicting messages such as "impossible" and
> "not yet". Will there ever be? if so, in 3-9 months?
>
> Thanks
> Anthony Perritano
>
> Frank Sauer wrote:
>
>> Nope, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384
>> This is a vry serious problem and I don't know if this is ever going
>> to be fixed... :-( Perhaps in the JDK1/5 with the new Tiger release
>> of OSX???
>>
>> Frank
>>
>> Anthony Perritano wrote:
>>
>>> Hi,
>>> is there anytime frame for a AWT_SWT bridge for osx similar to ones
>>> for windows and linux?
>>>
>>> I would like my RCP application pop up AWT/Swing windows? is there
>>> anyway i can make that happen now?
>>>
>>> thanks,
>>> Anthony Perritano
Re: AWT_SWT on mac osx [message #453023 is a reply to message #452735] Wed, 30 March 2005 00:39 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
It's a hard problem that will most likely require lots of help from Apple.
It's possible that this will be on the 3.2 plan. In the meantime, unless
you really need the features from AWT/Swing and the port is doable, I'd
suggest trying it. At the very least, your app will use less memory because
there will only be one GUI toolkit running.

"Frank Sauer" <fsauer65@mac.com> wrote in message
news:d1tmeh$9b8$1@news.eclipse.org...
> I would love to know the answer to this as well. A rough timeframe will
> help me decide whether to embark on a major AWT => SWT/Draw2D porting
> effort or not..... I'd rather not if there is a reasonable timeframe for
> a working bridge.
>
> Thanks,
>
> Frank
>
> Anthony Perritano wrote:
> > Hi,
> > I have been reading alot of the problems associated with the SWT_AWT
> > bridge on osx. I noticed a posting on apples job site for a Java
> > Frameworks Engineer mentioning implementation of Mac OSX SWT. I noticed
> > that on the Eclipse 3.1 plan an action item "Use Mac HIView (TBD)". what
> > do these mean? I have read conflicting messages such as "impossible" and
> > "not yet". Will there ever be? if so, in 3-9 months?
> >
> > Thanks
> > Anthony Perritano
> >
> > Frank Sauer wrote:
> >
> >> Nope, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384
> >> This is a vry serious problem and I don't know if this is ever going
> >> to be fixed... :-( Perhaps in the JDK1/5 with the new Tiger release
> >> of OSX???
> >>
> >> Frank
> >>
> >> Anthony Perritano wrote:
> >>
> >>> Hi,
> >>> is there anytime frame for a AWT_SWT bridge for osx similar to ones
> >>> for windows and linux?
> >>>
> >>> I would like my RCP application pop up AWT/Swing windows? is there
> >>> anyway i can make that happen now?
> >>>
> >>> thanks,
> >>> Anthony Perritano
Re: AWT_SWT on mac osx [message #453037 is a reply to message #453023] Wed, 30 March 2005 01:18 Go to previous messageGo to next message
Anthony Perritano is currently offline Anthony PerritanoFriend
Messages: 32
Registered: July 2009
Member
Given that you can't add a awt component to a swt one on Mac - Is it
possible to spawn a swing app from from an swt app?
For instance an swt app with a button and event tied to it. In that
event create a new thread and with a JFrame. is this part of the swt_awt
issue? how does eclipse launch a awt app? if so is there a snippet some
where i can use to launch a awt app from some swt?

thanks
Anthony Perritano


Steve Northover wrote:
> It's a hard problem that will most likely require lots of help from Apple.
> It's possible that this will be on the 3.2 plan. In the meantime, unless
> you really need the features from AWT/Swing and the port is doable, I'd
> suggest trying it. At the very least, your app will use less memory because
> there will only be one GUI toolkit running.
>
> "Frank Sauer" <fsauer65@mac.com> wrote in message
> news:d1tmeh$9b8$1@news.eclipse.org...
>
>>I would love to know the answer to this as well. A rough timeframe will
>>help me decide whether to embark on a major AWT => SWT/Draw2D porting
>>effort or not..... I'd rather not if there is a reasonable timeframe for
>>a working bridge.
>>
>>Thanks,
>>
>>Frank
>>
>>Anthony Perritano wrote:
>>
>>>Hi,
>>>I have been reading alot of the problems associated with the SWT_AWT
>>>bridge on osx. I noticed a posting on apples job site for a Java
>>>Frameworks Engineer mentioning implementation of Mac OSX SWT. I noticed
>>>that on the Eclipse 3.1 plan an action item "Use Mac HIView (TBD)". what
>>>do these mean? I have read conflicting messages such as "impossible" and
>>>"not yet". Will there ever be? if so, in 3-9 months?
>>>
>>>Thanks
>>>Anthony Perritano
>>>
>>>Frank Sauer wrote:
>>>
>>>
>>>>Nope, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384
>>>>This is a vry serious problem and I don't know if this is ever going
>>>>to be fixed... :-( Perhaps in the JDK1/5 with the new Tiger release
>>>>of OSX???
>>>>
>>>>Frank
>>>>
>>>>Anthony Perritano wrote:
>>>>
>>>>
>>>>>Hi,
>>>>>is there anytime frame for a AWT_SWT bridge for osx similar to ones
>>>>>for windows and linux?
>>>>>
>>>>>I would like my RCP application pop up AWT/Swing windows? is there
>>>>>anyway i can make that happen now?
>>>>>
>>>>>thanks,
>>>>>Anthony Perritano
>
>
>
Re: AWT_SWT on mac osx [message #453158 is a reply to message #453037] Wed, 30 March 2005 20:17 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
If you spawn the swing app in another process it should work. Otherwise, it
won't.

"Anthony Perritano" <aperritano@gmail.com> wrote in message
news:4249FE82.5070206@gmail.com...
> Given that you can't add a awt component to a swt one on Mac - Is it
> possible to spawn a swing app from from an swt app?
> For instance an swt app with a button and event tied to it. In that
> event create a new thread and with a JFrame. is this part of the swt_awt
> issue? how does eclipse launch a awt app? if so is there a snippet some
> where i can use to launch a awt app from some swt?
>
> thanks
> Anthony Perritano
>
>
> Steve Northover wrote:
> > It's a hard problem that will most likely require lots of help from
Apple.
> > It's possible that this will be on the 3.2 plan. In the meantime,
unless
> > you really need the features from AWT/Swing and the port is doable, I'd
> > suggest trying it. At the very least, your app will use less memory
because
> > there will only be one GUI toolkit running.
> >
> > "Frank Sauer" <fsauer65@mac.com> wrote in message
> > news:d1tmeh$9b8$1@news.eclipse.org...
> >
> >>I would love to know the answer to this as well. A rough timeframe will
> >>help me decide whether to embark on a major AWT => SWT/Draw2D porting
> >>effort or not..... I'd rather not if there is a reasonable timeframe for
> >>a working bridge.
> >>
> >>Thanks,
> >>
> >>Frank
> >>
> >>Anthony Perritano wrote:
> >>
> >>>Hi,
> >>>I have been reading alot of the problems associated with the SWT_AWT
> >>>bridge on osx. I noticed a posting on apples job site for a Java
> >>>Frameworks Engineer mentioning implementation of Mac OSX SWT. I noticed
> >>>that on the Eclipse 3.1 plan an action item "Use Mac HIView (TBD)".
what
> >>>do these mean? I have read conflicting messages such as "impossible"
and
> >>>"not yet". Will there ever be? if so, in 3-9 months?
> >>>
> >>>Thanks
> >>>Anthony Perritano
> >>>
> >>>Frank Sauer wrote:
> >>>
> >>>
> >>>>Nope, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384
> >>>>This is a vry serious problem and I don't know if this is ever going
> >>>>to be fixed... :-( Perhaps in the JDK1/5 with the new Tiger release
> >>>>of OSX???
> >>>>
> >>>>Frank
> >>>>
> >>>>Anthony Perritano wrote:
> >>>>
> >>>>
> >>>>>Hi,
> >>>>>is there anytime frame for a AWT_SWT bridge for osx similar to ones
> >>>>>for windows and linux?
> >>>>>
> >>>>>I would like my RCP application pop up AWT/Swing windows? is there
> >>>>>anyway i can make that happen now?
> >>>>>
> >>>>>thanks,
> >>>>>Anthony Perritano
> >
> >
> >
Re: AWT_SWT on mac osx [message #453164 is a reply to message #453158] Wed, 30 March 2005 22:58 Go to previous messageGo to next message
Anthony Perritano is currently offline Anthony PerritanoFriend
Messages: 32
Registered: July 2009
Member
theres some test code. when i press the button i get the following

2005-03-30 14:50:43.485 java[869] Apple AWT Java VM was loaded on first
thread -- can't start AWT.
Exception in thread "main" java.lang.InternalError: Can't start the AWT
because Java was started on the first thread. Make sure
StartOnFirstThread is not specified in your application's Info.plist or
on the command line.

i am using the SWT Launcher to run this. Is there an alterative
solution? My end goal for my swt app is to launch a swing app do
something, then return some result back to my swt app.

thanks

Anthony

public class GoButton {

public void go() {
Display display = Display.getDefault();
Shell shell = new Shell (display);
Label label = new Label (shell, SWT.NONE);
label.setText("GO Button GO");
Button ok = new Button(shell, SWT.PUSH);
ok.addListener(SWT.Selection, new Listener() {

public void handleEvent(Event event) {
System.out.println("GoButton.main()");
Thread goThread = new Thread(new Runnable(){
public void run() {
System.out.println("Threader");
JFrame jf = new JFrame();
jf.setName("hey");
jf.setBounds(10, 10, 200, 200);
jf.getContentPane().add(new
JLabel("Test:"), java.awt.BorderLayout.WEST);
jf.getContentPane().add(new
JButton("Test"));
jf.getContentPane().add(new
JLabel("Hey"), java.awt.BorderLayout.SOUTH);
jf.setVisible(true);
jf.show();
}
});
goThread.start();
}// handleEvent
});
ok.setText("Ok");
Button cancel = new Button(shell, SWT.PUSH);
shell.setLayout (new RowLayout ());
shell.pack ();
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}

public static void main (String [] args) {
GoButton gb = new GoButton();
gb.go();
}


}


Steve Northover wrote:
> If you spawn the swing app in another process it should work. Otherwise, it
> won't.
>
> "Anthony Perritano" <aperritano@gmail.com> wrote in message
> news:4249FE82.5070206@gmail.com...
>
>>Given that you can't add a awt component to a swt one on Mac - Is it
>>possible to spawn a swing app from from an swt app?
>>For instance an swt app with a button and event tied to it. In that
>>event create a new thread and with a JFrame. is this part of the swt_awt
>>issue? how does eclipse launch a awt app? if so is there a snippet some
>>where i can use to launch a awt app from some swt?
>>
>>thanks
>>Anthony Perritano
>>
>>
>>Steve Northover wrote:
>>
>>>It's a hard problem that will most likely require lots of help from
>
> Apple.
>
>>>It's possible that this will be on the 3.2 plan. In the meantime,
>
> unless
>
>>>you really need the features from AWT/Swing and the port is doable, I'd
>>>suggest trying it. At the very least, your app will use less memory
>
> because
>
>>>there will only be one GUI toolkit running.
>>>
>>>"Frank Sauer" <fsauer65@mac.com> wrote in message
>>>news:d1tmeh$9b8$1@news.eclipse.org...
>>>
>>>
>>>>I would love to know the answer to this as well. A rough timeframe will
>>>>help me decide whether to embark on a major AWT => SWT/Draw2D porting
>>>>effort or not..... I'd rather not if there is a reasonable timeframe for
>>>>a working bridge.
>>>>
>>>>Thanks,
>>>>
>>>>Frank
>>>>
>>>>Anthony Perritano wrote:
>>>>
>>>>
>>>>>Hi,
>>>>>I have been reading alot of the problems associated with the SWT_AWT
>>>>>bridge on osx. I noticed a posting on apples job site for a Java
>>>>>Frameworks Engineer mentioning implementation of Mac OSX SWT. I noticed
>>>>>that on the Eclipse 3.1 plan an action item "Use Mac HIView (TBD)".
>
> what
>
>>>>>do these mean? I have read conflicting messages such as "impossible"
>
> and
>
>>>>>"not yet". Will there ever be? if so, in 3-9 months?
>>>>>
>>>>>Thanks
>>>>>Anthony Perritano
>>>>>
>>>>>Frank Sauer wrote:
>>>>>
>>>>>
>>>>>
>>>>>>Nope, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384
>>>>>>This is a vry serious problem and I don't know if this is ever going
>>>>>>to be fixed... :-( Perhaps in the JDK1/5 with the new Tiger release
>>>>>>of OSX???
>>>>>>
>>>>>>Frank
>>>>>>
>>>>>>Anthony Perritano wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>>Hi,
>>>>>>>is there anytime frame for a AWT_SWT bridge for osx similar to ones
>>>>>>>for windows and linux?
>>>>>>>
>>>>>>>I would like my RCP application pop up AWT/Swing windows? is there
>>>>>>>anyway i can make that happen now?
>>>>>>>
>>>>>>>thanks,
>>>>>>>Anthony Perritano
>>>
>>>
>>>
>
>
Re: AWT_SWT on mac osx [message #453175 is a reply to message #453164] Thu, 31 March 2005 09:28 Go to previous message
Andre Weinand is currently offline Andre WeinandFriend
Messages: 66
Registered: July 2009
Member
On 31.3.2005 0:58 Uhr, in article 424B2F2A.8090700@gmail.com, "Anthony
Perritano" <aperritano@gmail.com> wrote:

> theres some test code. when i press the button i get the following
>
> 2005-03-30 14:50:43.485 java[869] Apple AWT Java VM was loaded on first
> thread -- can't start AWT.
> Exception in thread "main" java.lang.InternalError: Can't start the AWT
> because Java was started on the first thread. Make sure
> StartOnFirstThread is not specified in your application's Info.plist or
> on the command line.
>


You cannot run AWT/Swing and SWT in the same Java VM on MacOS X
(this is bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=67384)

The message "Can't start the AWT because Java was started on the first
thread" means that "Java" (the VM) and not "AWT" was started on the first
thread.
Starting AWT on a second thread doesn't help because the Java VM is already
running on the wrong thread.

So your only option is to launch a separate Java VM *process* for your Swing
code. See Runtime.exec(...) & Co.

--andre
Previous Topic:SWT Browser; load from another Thread
Next Topic:DND within TableTree?
Goto Forum:
  


Current Time: Fri Mar 29 02:01:32 GMT 2024

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

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

Back to the top