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

查看:27
本文介绍了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+"/>

来自第一个 标签.

指定<j2se version="1.5+"/><resources> 标签中没有任何其他属性正在抛弃 JNLP 解析器并导致后面的行 <j2seversion="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天全站免登陆