[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [platform-swt-dev] SWT JRE 1.5.0 Mac PowerPc
|
Hey great! That was the problem, it works well now :)
Thanks for the links. Some questions is you don't mind.
1. if I understood well it seems it is impossible to add a parameter with an executable jar? I found the manifest in the executable jar but is there anyway to add a -XstartOnFirstThread in there? or maybe I can do that straight in the app, test if the OS is mac and then add -XstartOnFirstThread to the VM?
Maybe I'll have to go back to normal jar and create manually, exe for windows, app for mac and bin for linux (it is bin right?), and then an installer?
I'd like to have my app working like azureus basically, on the 3 most common OS and with an installer.
I read a lot, tested a lot and the cross-platform installer didn't work for me, I'm probably lacking knowledge...
Is there any generic software to make installer for the 3 OS? I read a lot as I found tons of people talking , tested a lot but I'm getting confuse. What would you do?
2. should I use the same parameter for linux?
Thanks again for your help, that's very useful :)
Romu
On Thu, Nov 13, 2008 at 5:47 PM, Carolyn MacLeod
<Carolyn_MacLeod@xxxxxxxxxx> wrote:
Hi, Romu.
I think Tom is right - you probably
just need to tell java to startOnFirstThread.
Here's an FAQ about it:
Also, this link might help - it tells
how to deploy an application on the Mac:
Hope this helps!
Carolyn
From:
| |
To:
| "Eclipse Platform SWT component
developers list." <platform-swt-dev@xxxxxxxxxxx>
|
Date:
| 11/13/2008 11:35 AM
|
Subject:
| Re: [platform-swt-dev] SWT JRE 1.5.0
Mac PowerPc |
The problem could be that you need to start on OS-X
with
-XstartOnFirstThread!
Tom
Romuald Quantin schrieb:
> Hi Vinh
>
> Hmm I'm not sure I understand... First question is, why does it works
on
> windows and not mac then?
>
> Maybe it is not how I should do (sorry I'm both SWT and java beginner)
> but I create a main form in the class entry point like that:
>
> /public static void main(String[] args) {
> app = new AppMain();
> }
> public AppMain() {
> mainForm = new MainForm(this);
> mainForm.init();
> }/
>
> and then in the MainForm.init(), I do:
>
> / shell.setLayout(new FillLayout()); shell.setSize
(800, 600);
> shell.open();
> displayGlobalSettingsForm();
> while (!shell.isDisposed()) {
> if (!display.readAndDispatch()) {
> display.sleep();
> }
> }
> if(appGlobalSettings.isDirty()) {
> appGlobalSettings.save();
> }
> display.dispose(); /
>
> Is that wrong?
>
> Sorry I dont know what's a UI thread... and I'm not sure what you
mean
> by modifying the UI. I see my app and I got my first error when I
set a
> path with a browse button, on mac the finder to select the path appears
> and then I see the error in the terminal. While I have none in windows.
>
> What can I do? and do you have some example somewhere of how I should
> properly do things?
>
> Thanks again for your help.
>
> Romu
>
> Vinh Hoang wrote:
>> In swt, there's only one UI thread. Meaning all things modify
the UI
>> in some form must go through that one thread. That thread
is usually
>> where you created your display object. You're getting invalid
thread
>> access, it means that you are trying to modify the UI in a non-UI
>> thread. In order to modify the UI thread, you need to do
something like
>> Display.getDefault().asyncExec(new Runnable(){
>> public void run(){
>> //modify ui Code
>> }
>> };
>>
>> I hope that helps. good luck
>> Vinh
>>
>> On Thu, Nov 13, 2008 at 10:36 AM, Romuald Quantin
>> <soundstep.mailing@xxxxxxxxxxxxxx
>> <mailto:soundstep.mailing@xxxxxxxxxxxxxx>>
wrote:
>>
>> Hi everyone,
>>
>> First post :)
>>
>> I hope I can find a bit of help. I'm a flash developer
(sorry
>> about that), and I'm building an application with
SWT.
>>
>> So, I'm fairly new to java but the job is almost
done. I've
>> exported an executable jar and when I tried it on
Mac (10.4.1) it
>> didn't work.
>>
>> I realized I couldn't install the last JRE on a
Mac PowerPC... so
>> back to my windows PC, I installed a JRE 1.5.0,
created a new
>> workspace in eclipse with JRE 1.5.0, set a new project
again with
>> JRE 1.5.0 and export again my executable jar.
>>
>> When I tried it on the mac, it is getting better
as I can see my
>> app! But I've got bugs with it and it is not working
at all. I've
>> pasted an example error I got below. As I'm fairly
new to java, I
>> dont know what I can do. I believe the SWT jar I
use is too
>> advanced for the JRE? Should I find other SWT for
mac? and where?
>> Or do I have something wrong in my code?
>>
>> Well any advice or hunt would be really great...
>>
>> Thanks a lot.
>>
>> Romu
>>
>> Exception in thread "Thread-1072" org.eclipse.swt.SWTException:
>> Invalid thread access
>> at org.eclipse.swt.SWT.error(Unknown
Source)
>> at org.eclipse.swt.SWT.error(Unknown
Source)
>> at org.eclipse.swt.SWT.error(Unknown
Source)
>> at org.eclipse.swt.widgets.Display.error(Unknown
Source)
>> at org.eclipse.swt.widgets.Display.checkDevice(Unknown
Source)
>> at org.eclipse.swt.widgets.Display.getCursorLocation(Unknown
>> Source)
>> at org.eclipse.swt.widgets.Display.mouseHoverProc(Unknown
>> Source)
>> Exception in thread "Thread-1859" org.eclipse.swt.SWTException:
>> Invalid thread access
>> at org.eclipse.swt.SWT.error(Unknown
Source)
>> at org.eclipse.swt.SWT.error(Unknown
Source)
>> at org.eclipse.swt.SWT.error(Unknown
Source)
>> at org.eclipse.swt.widgets.Display.error(Unknown
Source)
>> at org.eclipse.swt.widgets.Display.checkDevice(Unknown
Source)
>> at org.eclipse.swt.widgets.Display.getCursorLocation(Unknown
>> Source)
>> at org.eclipse.swt.widgets.Display.mouseHoverProc(Unknown
>> Source)
>>
>>
>> _______________________________________________
>> platform-swt-dev mailing list
>> platform-swt-dev@xxxxxxxxxxx <mailto:platform-swt-dev@xxxxxxxxxxx>
>> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> platform-swt-dev mailing list
>> platform-swt-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
>>
>
> _______________________________________________
> platform-swt-dev mailing list
> platform-swt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
--
B e s t S o l u t i o n . a t
EDV Systemhaus GmbH
------------------------------------------------------------------------
tom schindl
leiter softwareentwicklung/CSO
------------------------------------------------------------------------
eduard-bodem-gasse 8/3 A-6020 innsbruck phone
++43 512 935834
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev