Hi Joseph,

Am 05.11.19 um 03:59 schrieb Joseph Huber:
Hello!

I’ve managed to get my Netbeans Platform (8.2) application running in MacOS 10.15 Catalina (I know next to nothing about MacOS).  In Windows 10 and Ubuntu 18.04, my application runs at all times using the icon I have branded it with.  However, in MacOS, that is not the case.  I am bundling OpenJDK 8u212-b04 with all three installations.

In the MacOS dock, my application shows up with my branded icon, and once clicked, my branded icon starts bouncing.  But about the same time that my application’s splash screen appears, the icon changes to a generic java icon, and stays that way until the application ends, at which time the dock icon changes back to my branded icon.  I have included a couple of screen shots to show this.

I converted my icon to the ICNS format, added that to the project, and have set the app.icon.icns property in my suite’s project.properties.  I assume that this is working, or else I wouldn’t be getting my brand icon at all.

Also, it seems that the JDialog icons are also not correct in MacOS either, as the generic Java icon shows up in the dialog boxes instead of the information, question, etc. icon.  I have included a couple of screenshots of that as well.

Is there something else I need to do on the NetBeans side, or is this just a consequence of Java on MacOS?

this is a bit tricky.

Take a look at app.conf in XXX-app. You can also check the etc/netbeans.conf of your NetBeans installation.

I use this, i start my App at the moment from the Project/bin

default_options="--branding tachyon -J-Xms256m -J-Xmx256m -J-Dapple.laf.useScreenMenuBar=true -J-Dapple.awt.graphics.UseQuartz=true -J-Xdock:icon=$progdir/../$APPNAME/applicationIcon.icns -J-Xdock:name=Tachyon"

The icon is not shown, and the dock name is still java.

Maybe you can investigate a little bit.

Are you using Maven? The part for the installer.

<build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>nbm-maven-plugin</artifactId>
                <configuration>
                    <applicationName>MyApp</applicationName>
                    <installerOsSolaris>false</installerOsSolaris>
                    <installerOsLinux>false</installerOsLinux>
                    <installerOsWindows>false</installerOsWindows>
                    <installerPack200Enable>false</installerPack200Enable>
                    <userSettings>

<nbi.dock.icon.file>${basedir}/src/main/resources/applicationIcon.icns</nbi.dock.icon.file>

<nbi.icon.file>${basedir}/src/main/nbm-branding/core/core.jar/org/netbeans/core/startup/frame48.gif</nbi.icon.file>
                    </userSettings>

<etcConfFile>${basedir}/src/main/resources/app.conf</etcConfFile>
                </configuration>
            </plugin>
[....]

But at the moment the installer (10.0 - 11.2) is broken, if you try to install your app. I got issues with missing Apple packages:

[2019-11-05 07:31:15.030]: An unexpected exception happened in thread main [2019-11-05 07:31:15.030]: java.lang.NoClassDefFoundError: com/apple/eawt/ApplicationListener [2019-11-05 07:31:15.030]: at org.netbeans.installer.wizard.Wizard.newWizardContainer(Wizard.java:499) [2019-11-05 07:31:15.030]: at org.netbeans.installer.wizard.Wizard.open(Wizard.java:529) [2019-11-05 07:31:15.030]: at org.netbeans.installer.Installer.start(Installer.java:144) [2019-11-05 07:31:15.030]: at org.netbeans.installer.Installer.main(Installer.java:81) [2019-11-05 07:31:15.030]: Caused by: java.lang.ClassNotFoundException: com.apple.eawt.ApplicationListener [2019-11-05 07:31:15.030]: at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) [2019-11-05 07:31:15.030]: at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) [2019-11-05 07:31:15.030]: at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
[2019-11-05 07:31:15.031]:      ... 4 more
[2019-11-05 07:31:15.031]:     ... show message dialog
[2019-11-05 07:31:15.031]:         title: Critical Error
[2019-11-05 07:31:15.031]: message: An unexpected exception happened in thread main
[2019-11-05 07:31:15.031]:
[2019-11-05 07:31:15.031]:         Exception:
[2019-11-05 07:31:15.031]:           java.lang.NoClassDefFoundError:
[2019-11-05 07:31:15.031]:           com/apple/eawt/ApplicationListener


I use the RELEASE112 of the NetBeans Platform. I just created a issue: https://issues.apache.org/jira/browse/NETBEANS-3342

Regards
Andreas
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
a...@ae-online.de | www.ae-online.de
www.tachyon-online.de

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org
For additional commands, e-mail: users-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to