SamFX
SamFX

Reputation: 19

iOS Deploying exception on runtime : java.lang.UnsatisfiedLinkError: no webview in java.library.path

i have a JavaFX application and i am trying to make it run on iOS it is running well in Android. Linux, Mac. but I just get a white screen on the iOS-simulator

i am not using java-modules.

i got this exception in the terminal

Exception in Application start method
[Thu Sept 15 14:43:27 CEST 2022][INFO] [SUB] Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
[Thu Sept 15 14:43:27 CEST 2022][INFO] [SUB]    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:901)
[Thu Sept 15 14:43:27 CEST 2022][INFO] [SUB]    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
[Thu Sept 15 14:43:27 CEST 2022][INFO] [SUB]    at java.lang.Thread.run(Thread.java:833)
[Thu Sept 15 14:43:27 CEST 2022][INFO] [SUB]    at com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:704)
[Thu Sept 15 14:43:27 CEST 2022][INFO] [SUB]    at com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:202)
[Thu Sept 15 14:43:27 CEST 2022][INFO] [SUB] Caused by: java.lang.UnsatisfiedLinkError: no webview in java.library.path
[Thu Sept 15 14:43:27 CEST 2022][INFO] [SUB]    at com.oracle.svm.core.jdk.NativeLibrarySupport.loadLibraryRelative(NativeLibrarySupport.java:132)
[Thu Sept 15 14:43:27 CEST 2022][INFO] [SUB]    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:47)
[Thu Sept 15 14:43:27 CEST 2022][INFO] [SUB]    at java.lang.Runtime.loadLibrary0(Runtime.java:818)
[Thu Sept 15 14:43:27 CEST 2022][INFO] [SUB]    at java.lang.System.loadLibrary(System.java:1989)
[Thu Sept 15 14:43:27 CEST 2022][INFO] [SUB]    at javafx.scene.web.WebView.<clinit>(WebView.java:112)

About the pom.xml (which is already ran well in Android)


<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.xxxx.xxxx</groupId>
    <artifactId>xxxxxxxx</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <maven.compiler.release>11</maven.compiler.release>

        <javafx.version>19</javafx.version>
        <attach.version>4.0.15</attach.version>
        <gluonfx.plugin.version>1.0.15</gluonfx.plugin.version>
        <javafx.plugin.version>0.0.8</javafx.plugin.version>
        <mainClassName>com.xxx.xxxx.xxxxx.AppxxxxmainClassName>

    </properties>
    <dependencies>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>${javafx.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-web</artifactId>
            <version>${javafx.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-fxml</artifactId>
            <version>${javafx.version}</version>
        </dependency>
        <dependency>
            <groupId>com.gluonhq.attach</groupId>
            <artifactId>display</artifactId>
            <version>${attach.version}</version>
        </dependency>
        <dependency>
            <groupId>com.gluonhq.attach</groupId>
            <artifactId>lifecycle</artifactId>
            <version>${attach.version}</version>
        </dependency>
        <dependency>
            <groupId>com.gluonhq.attach</groupId>
            <artifactId>statusbar</artifactId>
            <version>${attach.version}</version>
        </dependency>
        <dependency>
            <groupId>com.gluonhq.attach</groupId>
            <artifactId>storage</artifactId>
            <version>${attach.version}</version>
        </dependency>
        <dependency>
            <groupId>com.gluonhq.attach</groupId>
            <artifactId>util</artifactId>
            <version>${attach.version}</version>
        </dependency>
        <dependency>
            <groupId>com.gluonhq.attach</groupId>
            <artifactId>keyboard</artifactId>
            <version>${attach.version}</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.0</version>
                <configuration>
                    <release>11</release>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-maven-plugin</artifactId>
                <version>${javafx.plugin.version}</version>
                <executions>
                    <execution>
                        <!-- Default configuration for running -->
                        <!-- Usage: mvn clean javafx:run -->
                        <id>default-cli</id>
                        <configuration>
                            <mainClass>${mainClassName}</mainClass>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.gluonhq</groupId>
                <artifactId>gluonfx-maven-plugin</artifactId>
                <version>${gluonfx.plugin.version}</version>
                <configuration>
                    <target>${gluonfx.target}</target>
                    <verbose>true</verbose>
                    <attachList>
                        <list>display</list>
                        <list>lifecycle</list>
                        <list>statusbar</list>
                        <list>keyboard</list>
                        <list>storage</list>
                    </attachList>
                    <reflectionList>
                        <list>com.xxx.xxx.xxxxxx.xxxxxxxxx</list>
                    </reflectionList>
                    <mainClass>${mainClassName}</mainClass>
                    <releaseConfiguration>
                        <bundleName>xxxx</bundleName>
                    </releaseConfiguration>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>ios</id>
            <properties>
                <gluonfx.target>ios</gluonfx.target>
            </properties>
        </profile>
        <profile>
            <id>android</id>
            <properties>
                <gluonfx.target>android</gluonfx.target>
            </properties>
        </profile>
        <profile>
            <id>ios-sim</id>
            <properties>
                <gluonfx.target>ios-sim</gluonfx.target>
            </properties>
        </profile>
    </profiles>
</project>


Also, I tried

i am using this mvn command

 mvn -Pios-sim clean gluonfx:runagent gluonfx:build gluonfx:package gluonfx:install gluonfx:nativerun

All gave same results,

Upvotes: 0

Views: 96

Answers (0)

Related Questions