Wie legen Sie ein benutzerdefiniertes Symbol für die javafx-native-Paket-Symbol auf Windows

Ich versuche, die chance das icon der exe-Datei bei der Erstellung von nativen Bündelung von javafx Verpackung.
Ich habe versucht, das hinzufügen-Symbol in pom.xml aber bis es nicht Arbeit für mich, es gibt Standard-icon

Mit Intellij IDEA IDE, die enthalten eine Pom.xml erstellen Sie ein Paket von command = mvn jfx:build-native
Hier ist mein pom.xml:

<build>
    <plugins>
        <plugin>
            <groupId>com.zenjava</groupId>
            <artifactId>javafx-maven-plugin</artifactId>
            <version>1.5</version>
            <configuration>

                <mainClass>com.demoApp.testapp.testApplication</mainClass>

                <!-- only required if signing the jar file -->
                <keyStoreAlias>example-user</keyStoreAlias>
                <keyStorePassword>example-password</keyStorePassword>
                <permissions>
                    <permission>all-permissions</permission>
                </permissions>
                <icon>${basedir}/src/main/resources/images/logoIcon.ico</icon>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
            </configuration>
        </plugin>

    </plugins>
</build>

Ich habe ein Symbol-Pfad in pom.xml ${basedir}/src/main/resources/images/logoIcon.ico
ausgeführt wird, während native-Paket ausführen, aber es wird nicht funktionieren für mich

Ist irgendein anderer Weg, es zu tun ?
Bitte vorschlagen.


ich habe versucht, fx-tags in pom.xml mit Hilfe von ant,hier meine änderungen pom.xml

<properties>

<javafx.tools.ant.jar>${env.JAVA_HOME}\lib\ant-javafx.jar</javafx.tools.ant.jar> </properties>


<plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>create-launcher-jar</id>
                        <phase>package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target xmlns:fx="javafx:com.sun.javafx.tools.ant">
                                <taskdef
                                        uri="javafx:com.sun.javafx.tools.ant"
                                        resource="com/sun/javafx/tools/ant/antlib.xml"
                                        classpath="${javafx.tools.ant.jar}"/>
                                <fx:application id="fxApp"
                                                name="${project.name}"
                                                mainClass="com.precisionhawk.flightplanner.FlightPlannerApp"/>
                                <fx:jar destfile="${project.build.directory}/${project.build.finalName}-launcher">
                                    <fx:application refid="fxApp"/>
                                    <fx:fileset dir="${project.build.directory}/classes"/>
                                </fx:jar>
                                <attachartifact file="${project.build.directory}/${project.build.finalName}-launcher.jar"
                                                classifier="launcher"/>
                                <fx:deploy>
                                    <fx:info>
                                        <fx:icon href="${basedir}/src/main/deploy/logoIcon.ico"></fx:icon>
                                    </fx:info>

                                </fx:deploy>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

aber es wird nicht funktionieren aus..

  • der windows-Ordner ist der name fehlt in deinem code hier: <fx:icon href="${basedir}/src/main/deploy/logoIcon.ico"></fx:icon>
InformationsquelleAutor user1859806 | 2013-04-08
Schreibe einen Kommentar