com.apple.eawt.Application“访问限制" [英] com.apple.eawt.Application "access restriction"

查看:279
本文介绍了com.apple.eawt.Application“访问限制"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写Java应用程序,目前正在处理所有Apple本机LAF内容.我正在尝试自定义应用程序菜单,但我发现需要使用com.apple.eawt.Application来进行此操作.但是,当我尝试导入该类时,我的IDE会说:

I'm writing a Java app and am currently working on all of the Apple native LAF stuff. I'm trying to customize the application menu and I've found that I need to use com.apple.eawt.Application in order to do so. However, when I try to import that class, my IDE says:

Access restriction: The type Application is not accessible due to restriction on required library /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/rt.jar

我正在使用 Eclipse Mac OS X 10.9 上使用 JDK 1.7 更新45. rt.jar 在类路径上,但是有些不满意.我该如何解决?

I'm using JDK 1.7 update 45, on Mac OS X 10.9, using Eclipse. The rt.jar is on the classpath, but something is unhappy. How do I resolve this?

推荐答案

您可能会在构建路径中使用JRE进行尝试,可以尝试将其更改为JDK

you might be trying it with JRE in your build path, you can try changing it to JDK

请参考我的答案

这篇关于com.apple.eawt.Application“访问限制"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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