Mac上的SWT和Webstart [英] SWT and Webstart on Mac

查看:111
本文介绍了Mac上的SWT和Webstart的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用SWT和Java Webstart开发UI.首先,我创建了一个简单的应用程序,该应用程序可以在Windows和Linux上正常运行,但在Mac上无法运行.我的测试应用可以在此处使用.也有指向jar文件和类代码的链接.

I'm trying to develop a UI using SWT and Java Webstart. As a starting point I've created a simple app that works fine with Windows and Linux, but fails to work on Mac. My test app is available here. There are also links to the jar files and class code.

任何人都可以解释如何在Mac上实现此功能吗?

Can anyone explain how to make this work on Mac?

推荐答案

请参阅此 Eclipse错误.您的JNLP文件不正确.删除行

See this Eclipse bug. Your JNLP file is incorrect. Remove the line

<j2se version="1.5+"/>

从第一个<resources>标记开始.

指定 <resources>标记中的<j2se version="1.5+"/>,没有任何其他属性 抛出了JNLP解析器并导致后面的<j2se version="1.5*" java-vm-args="-XstartOnFirstThread -d32"/>行被忽略.他们俩 一行最终引用了两个单独的JVM,第一个规范是 获胜".该规范没有VM参数,因此JVM正常启动,并且 SWT加载在错误的线程上.

Specifying <j2se version="1.5+"/> in the <resources> tag without any other attributes is throwing off the JNLP parser and causing the later line <j2se version="1.5*" java-vm-args="-XstartOnFirstThread -d32"/> to be ignored. The two lines end up referring to two separate JVMs, and the first specification is 'winning'. That spec has no VM arguments on it, so the JVM starts normally, and the SWT is loaded on the wrong thread.

这篇关于Mac上的SWT和Webstart的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆