-1

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

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?

greg-449
  • 109,219
  • 232
  • 102
  • 145
MattPutnam
  • 2,927
  • 2
  • 17
  • 23

1 Answers1

2

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

please refer my answer

Community
  • 1
  • 1
dev2d
  • 4,245
  • 3
  • 31
  • 54