Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] 64-bit cocoa SWT build on Java Web Start

Hi,

I've been trying to launch an application using the new 64-bit cocoa build of SWT on Java Web Start on the Mac.  The application works fine when I launch it through the command line, but crashes when I try to launch it through Java Web Start.  I wasn't sure whether this is a configuration error on my part, or if there's something special to running the 64-bit build via JWS.

Here is my sample application:

import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;

public class MacSWTTest {
public static void main(String[] args) {
String name = System.getProperty("os.name");
String arch = System.getProperty("os.arch");
System.out.println("name: " + name + ", arch: " + arch);
MacSWTTest test = new MacSWTTest();
}
public MacSWTTest() {
Display disp = new Display();
Shell shell = new Shell(disp); // creates the window
shell.open();
while (!shell.isDisposed() && disp.getShells().length > 0) {
if (!disp.readAndDispatch()) disp.sleep();
}
System.exit(0); // terminate abruptly if window closed
}
}

I am also using the resources modifier in my jnlp file as follows per bug 63306:

<resources os="Mac OS X">
<j2se version="1.6*" java-vm-args="-XstartOnFirstThread"/>
<jar href="" />
</resources>

Usually the program crashes without a log entry or further feedback, although occasionally I see a thread or stack overflow error briefly on the Java console.  Is there anything I need to modify, or are there any tricks to getting this SWT build running on Java Web Start?

Thanks for your time,
David



--
Text Flex
http://textflex.com
http://textflex.org

Back to the top