TL; DR
What dependency am I missing, which allows NetBeans to run the program integrated with OS X just fine inside, but not clear and create it in the JAR?
I am trying to make a Java program that integrates into OS X, but I hope to release it also on Windows and Linux. For this, I use the utility classes of the com.apple.eawt package.
So far it was great. I have a menu bar built into OS X, I have settings handlers and about handlers and all these funny things, and it works fine ... when I just click Run in NetBeans. But! When I click Clean and Build , I get many, many such errors:
/my/source/path/MenuBarManager.java:3: error: package com.apple.eawt does not exist import com.apple.eawt.AboutHandler; /my/source/path/MenuBarManager.java:62: error: cannot find symbol private static class MyAboutHandler implements AboutHandler { ^ symbol: class AboutHandler location: class MyMenuBarManager /my/source/path/MyMenuBarManager.java:68: error: package AppEvent does not exist @Override public void handleAbout(AppEvent.AboutEvent ae) { ^ /my/source/path/MyMenuBarManager.java:67: error: method does not override or implement a method from a supertype <br/> @Override public void handleAbout(AppEvent.AboutEvent ae) { ^
Why can I run it in the IDE just fine, but I canβt say that the IDE needs to compile it into a JAR?
Attempt to fix
I tried to completely fix the Ajith John project by creating a new NetBeans project, copying all the source files into it and clicking "Clear and Build". I got the same result, so this did not work.
java cross-platform netbeans macos
Ben leggiero
source share