windows 10 Native Build error - Native-image building on Windows currently only supports target architecture: AMD64 (x86 unsupported) - gluon

I'm testing out a new project, and trying to use Gluon for this.
ATM I am building on windows 10 with AMD Ryzen 7.
Following the instructions from: https://docs.gluonhq.com/#platforms_windows
When I attempt to build:mvn gluonfx:build it fails with:
[INFO] --- gluonfx-maven-plugin:1.0.9:compile (default-cli) # gluon-singleviewproject-jdk17 ---
[Tue Nov 16 13:14:32 PST 2021][INFO] ==================== COMPILE TASK ====================
_______ ___ __ __ _______ __ _
| || | | | | || || | | |
| ___|| | | | | || _ || |_| |
| | __ | | | |_| || | | || |
| || || |___ | || |_| || _ |
| |_| || || || || | | |
|_______||_______||_______||_______||_| |__|
[Tue Nov 16 13:14:33 PST 2021][INFO] We will now compile your code for x86_64-microsoft-windows. This may take some time.
Access to the latest docs, tips and tricks and more info on
how to get support? Register your usage of Gluon Substrate now at
https://gluonhq.com/activate
[Tue Nov 16 13:14:34 PST 2021][INFO] [SUB] Warning: Ignoring server-mode native-image argument --no-server.
[Tue Nov 16 13:14:36 PST 2021][INFO] [SUB] [com.gluonapplication.gluonapplication:29680] classlist: 1,238.84 ms, 0.96 GB
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] [com.gluonapplication.gluonapplication:29680] setup: 709.11 ms, 0.96 GB
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] Error: Native-image building on Windows currently only supports target architecture: AMD64 (x86 unsupported)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] Error: To prevent native-toolchain checking provide command-line option -H:-CheckToolchain
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] com.oracle.svm.core.util.UserError$UserException: Native-image building on Windows currently only supports target architecture: AMD64 (x86 unsupported)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] To prevent native-toolchain checking provide command-line option -H:-CheckToolchain
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.core.util.UserError.abort(UserError.java:139)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.hosted.c.codegen.CCompilerInvoker.addSkipCheckingInfo(CCompilerInvoker.java:103)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.hosted.c.codegen.CCompilerInvoker.verifyCompiler(CCompilerInvoker.java:94)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:884)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:530)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:491)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:380)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:543)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:119)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] at com.oracle.svm.hosted.NativeImageGeneratorRunner$JDK9Plus.main(NativeImageGeneratorRunner.java:573)
[Tue Nov 16 13:14:37 PST 2021][INFO] [SUB] [com.gluonapplication.gluonapplication:29680] [total]: 1,978.21 ms, 0.96 GB
My POM:
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.gluonapplication</groupId>
<artifactId>gluon-singleviewproject-jdk17</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Gluon-SingleViewProject-jdk17</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>11</maven.compiler.release>
<javafx.version>17.0.1</javafx.version>
<attach.version>4.0.13</attach.version>
<gluonfx.plugin.version>1.0.9</gluonfx.plugin.version>
<javafx.plugin.version>0.0.8</javafx.plugin.version>
<mainClassName>com.gluonapplication.GluonApplication</mainClassName>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>com.gluonhq</groupId>
<artifactId>charm-glisten</artifactId>
<version>6.1.0</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>
</dependencies>
<repositories>
<repository>
<id>Gluon</id>
<url>https://nexus.gluonhq.com/nexus/content/repositories/releases</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>${javafx.plugin.version}</version>
<configuration>
<mainClass>${mainClassName}</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>com.gluonhq</groupId>
<artifactId>gluonfx-maven-plugin</artifactId>
<version>${gluonfx.plugin.version}</version>
<configuration>
<target>host</target>
<attachList>
<list>display</list>
<list>lifecycle</list>
<list>statusbar</list>
<list>storage</list>
</attachList>
<mainClass>${mainClassName}</mainClass>
</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>
</profiles>
</project>
This is is basically hellofxml, any thoughts or pointers on debugging this greatly appreciated.

Related

Native image using GraalVM, Maven, GluonFX plugin - problem with resource bundle com.sun.glass.ui.win

GraalVM version: 21.2.0
JavaFX version: 17.0.0.1
Maven version: 3.6.3
I'm very close to be able to run my native image, I added classes to my reflectionlist in the pom.xml etc. but now I'm grinding to a halt because of a resourcebundle not found error. If anyone could give me a hint, that would be much appreciated.
Here's my pom.xml:
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>MyProject-fxml.main</groupId>
<artifactId>MyProject-fxml</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-base</artifactId>
<version>17.0.0.1</version>
<classifier>win</classifier>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>17.0.0.1</version>
<classifier>win</classifier>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>17.0.0.1</version>
<classifier>win</classifier>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>17.0.0.1</version>
<classifier>win</classifier>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>22.0.0</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.gluonhq</groupId>
<artifactId>gluonfx-maven-plugin</artifactId>
<version>1.0.6</version>
<configuration>
<mainClass>com.MyProject.Main</mainClass>
<reflectionList>
<list>com.MyProject.MyProject</list>
<list>com.MyProject.controllers.MainViewController</list>
<list>com.MyProject.controllers.stagecontrollers.SimpleStageController</list>
<list>com.MyProject.model.helpers.AppPreferences</list>
<list>com.MyProject.model.helpers.ScreenResolution</list>
<list>javafx.scene.control.SplitPane</list>
<list>javafx.scene.layout.AnchorPane</list>
</reflectionList>
<resourcesList>com.sun.glass.ui.win</resourcesList>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>11</source>
<target>11</target>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.7</version>
<configuration>
<mainClass>com.MyProject.Main</mainClass>
</configuration>
</plugin>
<!-- TODO: Figure out how to make an executable jar with Maven -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix></classpathPrefix>
<mainClass>com.MyProject.Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>run-java</id>
<phase>package</phase>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>com.MyProject.Main</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>
Followed by the error output:
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] Oct 09, 2021 11:19:12 AM com.sun.javafx.application.PlatformImpl startup
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module #2715644a'
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] Exception in Application start method
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] Oct 09, 2021 11:19:12 AM com.MyProject.APP show
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] SEVERE: There is an error launching the JavaFX runtime, or the application class cannot be constructed (e.g., if the class is not public or is not in an exported package), or an Exception or Error is thrown by the Application constructor, init method, start method, or stop method.java.lang.RuntimeException: Exception in Application start method
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] java.lang.RuntimeException: Exception in Application start method
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:901)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at java.lang.Thread.run(Thread.java:829)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:567)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.oracle.svm.core.windows.WindowsJavaThreads.osThreadStartRoutine(WindowsJavaThreads.java:138)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] Caused by: java.lang.ExceptionInInitializerError
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:315)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at java.lang.Class.ensureInitialized(DynamicHub.java:548)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:260)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at java.lang.reflect.Constructor.newInstance(Constructor.java:490)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at javafx.fxml.FXMLLoader$InstanceDeclarationElement.constructValue(FXMLLoader.java:1020)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:757)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2808)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2634)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2516)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.MyProject.MyProject.loadMainViewParent(APP.java:88)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.MyProject.MyProject.start(APP.java:55)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:847)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:484)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at java.security.AccessController.doPrivileged(AccessController.java:105)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST:Ljava_lang_Runnable_2_0002erun_00028_00029V(JNIJavaCallWrappers.java:0)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.sun.glass.ui.win.WinApplication._runLoop(WinApplication.java)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] ... 3 more
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] Caused by: java.util.MissingResourceException: Can't find bundle for base name com/sun/glass/ui/win/themes, locale en_US
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:2055)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1689)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1593)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1556)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at java.util.ResourceBundle.getBundle(ResourceBundle.java:857)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.sun.glass.ui.win.WinApplication.getHighContrastScheme(WinApplication.java:344)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.sun.glass.ui.win.WinApplication.getHighContrastTheme(WinApplication.java:350)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.sun.javafx.tk.quantum.QuantumToolkit.getThemeName(QuantumToolkit.java:1809)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.sun.javafx.application.PlatformImpl._setPlatformUserAgentStylesheet(PlatformImpl.java:924)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.sun.javafx.application.PlatformImpl.setPlatformUserAgentStylesheet(PlatformImpl.java:723)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.sun.javafx.application.PlatformImpl.setDefaultPlatformUserAgentStylesheet(PlatformImpl.java:687)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at javafx.scene.control.Control.<clinit>(Control.java:99)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:375)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] at com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:295)
[Sat Oct 09 11:19:12 CEST 2021][INFO] [SUB] ... 23 more
[Sat Oct 09 11:19:12 CEST 2021][SEVERE] Process run until end failed with result: 1
So, the resource "com/sun/glass/ui/win/themes" is missing. I can't find however how to correct for this one.
Thanks to Jose Pereda, adding the above bundle to <bundleslist/> to the gluonfx-maven-plugin worked, even though IntelliJ didn't show this path as having a bundle with that name.

Gluon Reflection list external jnativehook file GlobalScreen ( I have issue )

I'm Still learning about gluon How it's works I'm a student.
now the problem is it's not running after the client:build before it's working perfectly.
so here is the problem. I have added GlobalScreen class in reflection but it's a method or something I don't understand giving me an issue so how to solve it please guide me.
[Sun Jan 31 22:19:45 PKT 2021][INFO] ==================== RUN TASK ====================
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] Hello There
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] GG1
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] GG2
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] Jan 31, 2021 10:19:46 PM org.jnativehook.DefaultLibraryLocator getLibraries
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] SEVERE: Unable to extract the native library /org/jnativehook/lib/windows/x86_64/JNativeHook.dll!
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB]
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] Exception in Application start method
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at java.lang.Thread.run(Thread.java:834)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.oracle.svm.core.windows.WindowsJavaThreads.osThreadStartRoutine(WindowsJavaThreads.java:138)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] Caused by: java.lang.UnsatisfiedLinkError: org.jnativehook.GlobalScreen.getAutoRepeatRate()Ljava/lang/Integer; [symbol: Java_org_jnativehook_GlobalScreen_getAutoRepeatRate or Java_org_jnativehook_GlobalScreen_getAutoRepeatRate__]
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.oracle.svm.jni.access.JNINativeLinkage.getOrFindEntryPoint(JNINativeLinkage.java:153)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.oracle.svm.jni.JNIGeneratedMethodSupport.nativeCallAddress(JNIGeneratedMethodSupport.java:57)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at org.jnativehook.GlobalScreen.getAutoRepeatRate(Unknown Source)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at org.jnativehook.GlobalScreen.<clinit>(Unknown Source)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:351)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:271)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at sample.Main.start(Main.java:34)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at java.security.AccessController.doPrivileged(AccessController.java:102)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.oracle.svm.jni.JNIJavaCallWrappers.jniInvoke_VA_LIST:Ljava_lang_Runnable_2_0002erun_00028_00029V(JNIJavaCallWrappers.java:0)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.sun.glass.ui.win.WinApplication._runLoop(WinApplication.java)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
[Sun Jan 31 22:19:46 PKT 2021][INFO] [SUB] ... 3 more
_______ ___ __ __ _______ __ _
| || | | | | || || | | |
| ___|| | | | | || _ || |_| |
| | __ | | | |_| || | | || |
| || || |___ | || |_| || _ |
| |_| || || || || | | |
|_______||_______||_______||_______||_| |__|
Access to the latest docs, tips and tricks and more info on
how to get support? Register your usage of Gluon Substrate now at
https://gluonhq.com/activate
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.452 s
[INFO] Finished at: 2021-01-31T22:19:49+05:00
[INFO] ------------------------------------------------------------------------
this is my pom file
<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>GameCheats</groupId>
<artifactId>InvokerBotKey</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<name>InvokerBotKeys</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<mainClassName>sample.Launcher</mainClassName>
</properties>
<dependencies>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>15.0.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>15.0.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.1stleg/jnativehook -->
<dependency>
<groupId>com.1stleg</groupId>
<artifactId>jnativehook</artifactId>
<version>2.1.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.5</version>
<configuration>
<mainClass>${mainClassName}</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>com.gluonhq</groupId>
<artifactId>client-maven-plugin</artifactId>
<version>0.1.35</version>
<configuration>
<target>${client.target}</target>
<mainClass>${mainClassName}</mainClass>
<reflectionList>
<list>sample.Controller</list>
<list>sample.Main</list>
<list>sample.HotKeys</list>
<list>sample.Invoker</list>
<list>sample.GlobalKeyListener</list>
<list>javafx.application.Application</list>
<list>javafx.scene.Parent</list>
<list>javafx.scene.Scene</list>
<list>javafx.scene.robot.Robot</list>
<list>javafx.stage.Stage</list>
<list>javafx.fxml.FXMLLoader</list>
<list>javafx.scene.input.KeyCode</list>
<list>java.util.concurrent.TimeUnit</list>
<list>javafx.event.ActionEvent</list>
<list>javafx.fxml.FXML</list>
<list>javafx.scene.control.TextField</list>
<list>javafx.scene.control.ToggleButton</list>
<list>javafx.application.Platform</list>
<list>org.jnativehook.GlobalScreen</list>
<list>org.jnativehook.NativeHookException</list>
<list>org.jnativehook.keyboard.NativeKeyEvent</list>
<list>org.jnativehook.keyboard.NativeKeyListener</list>
<list>org.jnativehook.DefaultLibraryLocator</list>
</reflectionList>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>desktop</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<client.target>host</client.target>
</properties>
</profile>
</profiles>
<pluginRepositories>
<pluginRepository>
<id>gluon-releases</id>
<url>
http://nexus.gluonhq.com/nexus/content/repositories/releases
</url>
</pluginRepository>
</pluginRepositories>
</project>

Can't start elasticsearch service on centos 7

I just install the elasticsearch but when I try to start is not work. Anyone have any idea what I can do?
sudo journalctl --unit elasticsearch
-- Logs begin at Sat 2020-08-29 09:54:58 UTC, end at Sat 2020-08-29 13:15:35 UTC. --
Aug 29 10:10:28 meriadoc.dallas-idc.com systemd[1]: Starting Elasticsearch...
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: fatal error in thread [main], exiting
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: java.lang.NoClassDefFoundError: Could not initialize class com.sun.jna.Native
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.systemd.Libsystemd.lambda$static$0(Libsystemd.java:34)
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.systemd.Libsystemd.<clinit>(Libsystemd.java:33)
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.systemd.SystemdPlugin.sd_notify(SystemdPlugin.java:126)
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.systemd.SystemdPlugin.onNodeStarted(SystemdPlugin.java:137)
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at java.base/java.util.ArrayList.forEach(ArrayList.java:1510)
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.node.Node.start(Node.java:868)
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.bootstrap.Bootstrap.start(Bootstrap.java:317)
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:402)
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.cli.Command.main(Command.java:90)
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]: at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd[1]: elasticsearch.service: main process exited, code=exited, status=1/FAILURE
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd[1]: Failed to start Elasticsearch.
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd[1]: Unit elasticsearch.service entered failed state.
Thank you so much
If you notice carefully the error message in startup logs, which seems to cause the startup failure.
Aug 29 10:10:35 meriadoc.dallas-idc.com systemd-entrypoint[3579]:
java.lang.NoClassDefFoundError: Could not initialize class
com.sun.jna.Native
Please follow the https://www.jetbrains.com/help/upsource/error-could-not-initialize-class-com-sun-jna-native.html#8182b, which explained in detail the cause of the error and 2 ways to resolve that.

How should I load resources from src/main/resources in Kotlin?

I'm working on a Spring Boot application written in Kotlin (using Maven), and everything works fine but after generating the jar of my application, it throws an Exception because it can't find the folder src/main/resources:
Caused by: java.io.FileNotFoundException: src\main\resources\data\circuits-arrets.json
I read that could be because I use File class, and it doesn't work properly after generating the jar. Here's how I read my file:
var line: String?
val bufferedReader = BufferedReader(FileReader(File(csvLocation)))
do {
line = bufferedReader.readLine()
if (line != null) {
//Do something with 'line'
}
} while (line != null)
I found some solutions using InputStream instead of File in the BufferedReader.
My question is: Does it really change something for the jar? If yes, how should I do then?
Thank you in advance.
EDIT:
Here's the output of the command jar tvf my-jar.jar :
0 Fri Feb 15 10:34:14 CET 2019 META-INF/
552 Fri Feb 15 10:34:14 CET 2019 META-INF/MANIFEST.MF
0 Fri Feb 15 10:34:14 CET 2019 org/
0 Fri Feb 15 10:34:14 CET 2019 org/springframework/
0 Fri Feb 15 10:34:14 CET 2019 org/springframework/boot/
0 Fri Feb 15 10:34:14 CET 2019 org/springframework/boot/loader/
0 Fri Feb 15 10:34:14 CET 2019 org/springframework/boot/loader/data/
2688 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/data/RandomAccessDataFile$DataInputStream.class
0 Fri Feb 15 10:34:14 CET 2019 org/springframework/boot/loader/jar/
9736 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarURLConnection.class
1374 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarFile$JarFileType.class
14915 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarFile.class
3414 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarEntry.class
345 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/FileHeader.class
3172 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/StringSequence.class
4976 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/AsciiBytes.class
1593 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarFileEntries$1.class
1997 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarFileEntries$EntryIterator.class
10728 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarFileEntries.class
540 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/CentralDirectoryVisitor.class
299 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarEntryFilter.class
5267 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/CentralDirectoryFileHeader.class
3116 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/CentralDirectoryEndRecord.class
4624 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/CentralDirectoryParser.class
1693 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/ZipInflaterInputStream.class
11509 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/Handler.class
0 Fri Feb 15 10:34:14 CET 2019 org/springframework/boot/loader/archive/
302 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/Archive$Entry.class
437 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/Archive$EntryFilter.class
945 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/Archive.class
1487 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/ExplodedArchive$FileEntryIterator$EntryComparator.class
3837 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/ExplodedArchive$FileEntryIterator.class
5243 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/ExplodedArchive.class
1484 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/PropertiesLauncher$ArchiveEntryFilter.class
19737 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/PropertiesLauncher.class
282 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/data/RandomAccessDataFile$1.class
2062 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarFile$1.class
1233 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarFile$2.class
3263 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/data/RandomAccessDataFile$FileAccess.class
4015 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/data/RandomAccessDataFile.class
1102 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/ExplodedArchive$FileEntry.class
1081 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/JarFileArchive$JarFileEntry.class
7336 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/JarFileArchive.class
1502 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/MainMethodRunner.class
3608 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/ExecutableArchiveLauncher.class
0 Fri Feb 15 10:34:14 CET 2019 org/springframework/boot/loader/util/
5203 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/util/SystemPropertyUtils.class
485 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/data/RandomAccessData.class
273 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/ExplodedArchive$1.class
1779 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/archive/JarFileArchive$EntryIterator.class
1953 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/PropertiesLauncher$PrefixMatchingArchiveFilter.class
266 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/PropertiesLauncher$1.class
4684 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/Launcher.class
1721 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/WarLauncher.class
1585 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/JarLauncher.class
1527 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/LaunchedURLClassLoader$UseFastConnectionExceptionsEnumeration.class
5687 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/LaunchedURLClassLoader.class
616 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/Bytes.class
702 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarURLConnection$1.class
4306 Wed May 09 13:32:20 CEST 2018 org/springframework/boot/loader/jar/JarURLConnection$JarEntryName.class
0 Fri Feb 15 10:34:14 CET 2019 BOOT-INF/
0 Fri Feb 15 10:34:14 CET 2019 BOOT-INF/classes/
0 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/constants/
0 Fri Feb 15 10:33:50 CET 2019 BOOT-INF/classes/data/
0 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/
0 Fri Feb 15 10:34:10 CET 2019 BOOT-INF/classes/fr/asi/
0 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/controllers/
0 Fri Feb 15 10:34:10 CET 2019 BOOT-INF/classes/fr/asi/entities/
0 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/jsonEntities/
0 Fri Feb 15 10:34:10 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/
0 Fri Feb 15 10:34:10 CET 2019 BOOT-INF/classes/fr/asi/entities/viewModels/
0 Fri Feb 15 10:34:10 CET 2019 BOOT-INF/classes/fr/asi/repositories/
0 Fri Feb 15 10:34:10 CET 2019 BOOT-INF/classes/fr/asi/security/
0 Fri Feb 15 10:34:10 CET 2019 BOOT-INF/classes/fr/asi/services/
0 Fri Feb 15 10:34:10 CET 2019 BOOT-INF/classes/fr/asi/utils/
0 Fri Feb 15 10:34:12 CET 2019 META-INF/maven/
0 Fri Feb 15 10:34:12 CET 2019 META-INF/maven/com.auth0.samples/
0 Fri Feb 15 10:34:12 CET 2019 META-INF/maven/com.auth0.samples/kotlin-spring-boot/
584 Fri Feb 15 10:33:50 CET 2019 BOOT-INF/classes/application.properties
87499 Fri Feb 15 10:33:50 CET 2019 BOOT-INF/classes/data/circuits-arrets.json
261015 Fri Feb 15 10:33:50 CET 2019 BOOT-INF/classes/data/tan-arrets.csv
1029 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/Configuration.class
3471 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/controllers/ApplicationUserController.class
6013 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/controllers/BaseController.class
1701 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/controllers/BikeStationController.class
1692 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/controllers/BusStationController.class
612 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/controllers/FavoriteController$WhenMappings.class
5385 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/controllers/FavoriteController.class
1778 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/controllers/LineController.class
7389 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/controllers/StationController.class
1868 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/entities/jsonEntities/Arret.class
1079 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/entities/jsonEntities/BusLineLibelle.class
3252 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/ApplicationUser.class
2977 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/BikeStation.class
2140 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/Favorite.class
2981 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/Station.class
1195 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/entities/viewModels/BaseVM.class
3691 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/entities/viewModels/StationVM.class
1663 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/KotlinSpringBootApplicationKt.class
812 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/repositories/BaseRepository.class
702 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/repositories/BusStationRepository.class
672 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/repositories/LineRepository.class
5530 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/security/JWTAuthenticationFilter.class
2578 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/security/UserDetailsServiceImpl.class
4617 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/services/BaseService.class
1186 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/services/LineService.class
5525 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/StartingDataInjector.class
7943 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/utils/ParsersKt.class
121 Fri Feb 15 10:34:08 CET 2019 META-INF/kotlin-spring-boot.kotlin_module
7216 Fri Feb 15 10:31:38 CET 2019 META-INF/maven/com.auth0.samples/kotlin-spring-boot/pom.xml
1693 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/constants/ConstantsKt.class
1805 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/AccessCondition.class
1065 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/BaseEntity.class
3506 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/BusStation.class
1434 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/FavoriteType.class
2945 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/Line.class
2056 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/entities/mainEntities/StationType.class
2081 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/entities/viewModels/LineVM.class
613 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/KotlinSpringBootApplication.class
1101 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/repositories/ApplicationUserRepository.class
707 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/repositories/BikeStationRepository.class
692 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/repositories/FavoriteRepository.class
687 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/repositories/StationRepository.class
4738 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/security/JWTAuthorizationFilter.class
6776 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/security/WebSecurity.class
1235 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/services/BikeStationService.class
1228 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/services/BusStationService.class
1207 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/services/StationService.class
2405 Fri Feb 15 10:34:06 CET 2019 BOOT-INF/classes/fr/asi/utils/FindersKt.class
5205 Fri Feb 15 10:34:08 CET 2019 BOOT-INF/classes/fr/asi/VMUtils.class
114 Fri Feb 15 10:34:12 CET 2019 META-INF/maven/com.auth0.samples/kotlin-spring-boot/pom.properties
29487 Fri Feb 15 10:33:50 CET 2019 BOOT-INF/classes/data/stations-velos-libre-service-nantes-metropole.csv
0 Fri Feb 15 10:34:14 CET 2019 BOOT-INF/lib/
628 Wed May 09 13:41:28 CEST 2018 BOOT-INF/lib/spring-boot-starter-data-jpa-2.0.2.RELEASE.jar
593 Wed May 09 13:30:56 CEST 2018 BOOT-INF/lib/spring-boot-starter-2.0.2.RELEASE.jar
927496 Wed May 09 13:19:02 CEST 2018 BOOT-INF/lib/spring-boot-2.0.2.RELEASE.jar
1161361 Wed May 09 13:25:34 CEST 2018 BOOT-INF/lib/spring-boot-autoconfigure-2.0.2.RELEASE.jar
613 Wed May 09 13:30:56 CEST 2018 BOOT-INF/lib/spring-boot-starter-logging-2.0.2.RELEASE.jar
290339 Fri Mar 31 21:27:54 CEST 2017 BOOT-INF/lib/logback-classic-1.2.3.jar
471901 Fri Mar 31 21:27:16 CEST 2017 BOOT-INF/lib/logback-core-1.2.3.jar
17519 Sun Nov 19 01:08:44 CET 2017 BOOT-INF/lib/log4j-to-slf4j-2.10.0.jar
255485 Sun Nov 19 00:48:58 CET 2017 BOOT-INF/lib/log4j-api-2.10.0.jar
4596 Thu Mar 16 17:37:48 CET 2017 BOOT-INF/lib/jul-to-slf4j-1.7.25.jar
26586 Wed Feb 21 15:54:16 CET 2018 BOOT-INF/lib/javax.annotation-api-1.3.2.jar
297518 Sat Oct 14 11:44:44 CEST 2017 BOOT-INF/lib/snakeyaml-1.19.jar
600 Wed May 09 13:41:20 CEST 2018 BOOT-INF/lib/spring-boot-starter-aop-2.0.2.RELEASE.jar
1930381 Wed Nov 15 11:26:54 CET 2017 BOOT-INF/lib/aspectjweaver-1.8.13.jar
598 Wed May 09 13:41:22 CEST 2018 BOOT-INF/lib/spring-boot-starter-jdbc-2.0.2.RELEASE.jar
143471 Thu Apr 05 17:30:38 CEST 2018 BOOT-INF/lib/HikariCP-2.7.9.jar
401279 Tue May 08 08:06:44 CEST 2018 BOOT-INF/lib/spring-jdbc-5.0.6.RELEASE.jar
6739203 Thu Apr 26 11:06:04 CEST 2018 BOOT-INF/lib/hibernate-core-5.2.17.Final.jar
66469 Wed Feb 14 13:23:28 CET 2018 BOOT-INF/lib/jboss-logging-3.3.2.Final.jar
113371 Fri Jul 26 12:01:34 CEST 2013 BOOT-INF/lib/hibernate-jpa-2.1-api-1.0.0.Final.jar
739582 Tue Oct 10 18:04:58 CEST 2017 BOOT-INF/lib/javassist-3.22.0-GA.jar
445288 Wed Sep 06 11:15:06 CEST 2006 BOOT-INF/lib/antlr-2.7.7.jar
186741 Tue Aug 02 13:41:56 CEST 2016 BOOT-INF/lib/jandex-2.0.3.Final.jar
65100 Sat Sep 09 14:47:28 CEST 2017 BOOT-INF/lib/classmate-1.3.4.jar
313898 Mon May 16 14:19:12 CEST 2005 BOOT-INF/lib/dom4j-1.6.1.jar
75288 Tue Nov 24 15:03:08 CET 2015 BOOT-INF/lib/hibernate-commons-annotations-5.0.1.Final.jar
30724 Mon May 13 15:11:34 CEST 2013 BOOT-INF/lib/javax.transaction-api-1.2.jar
335660 Tue May 08 14:29:02 CEST 2018 BOOT-INF/lib/spring-data-jpa-2.0.7.RELEASE.jar
1076871 Tue May 08 14:23:50 CEST 2018 BOOT-INF/lib/spring-data-commons-2.0.7.RELEASE.jar
191789 Tue May 08 08:07:28 CEST 2018 BOOT-INF/lib/spring-orm-5.0.6.RELEASE.jar
255201 Tue May 08 08:06:38 CEST 2018 BOOT-INF/lib/spring-tx-5.0.6.RELEASE.jar
41203 Thu Mar 16 17:36:32 CET 2017 BOOT-INF/lib/slf4j-api-1.7.25.jar
46745 Tue May 08 08:08:48 CEST 2018 BOOT-INF/lib/spring-aspects-5.0.6.RELEASE.jar
588 Wed May 09 13:41:32 CEST 2018 BOOT-INF/lib/spring-boot-starter-web-2.0.2.RELEASE.jar
645 Wed May 09 13:41:30 CEST 2018 BOOT-INF/lib/spring-boot-starter-json-2.0.2.RELEASE.jar
33392 Mon Mar 26 15:55:48 CEST 2018 BOOT-INF/lib/jackson-datatype-jdk8-2.9.5.jar
99630 Mon Mar 26 15:56:26 CEST 2018 BOOT-INF/lib/jackson-datatype-jsr310-2.9.5.jar
8646 Mon Mar 26 15:54:04 CEST 2018 BOOT-INF/lib/jackson-module-parameter-names-2.9.5.jar
591 Wed May 09 13:41:32 CEST 2018 BOOT-INF/lib/spring-boot-starter-tomcat-2.0.2.RELEASE.jar
3115994 Fri Apr 27 21:24:52 CEST 2018 BOOT-INF/lib/tomcat-embed-core-8.5.31.jar
240244 Fri Apr 27 21:24:54 CEST 2018 BOOT-INF/lib/tomcat-embed-el-8.5.31.jar
256776 Fri Apr 27 21:24:54 CEST 2018 BOOT-INF/lib/tomcat-embed-websocket-8.5.31.jar
1130724 Tue Mar 27 09:03:18 CEST 2018 BOOT-INF/lib/hibernate-validator-6.0.9.Final.jar
93107 Tue Dec 19 16:23:28 CET 2017 BOOT-INF/lib/validation-api-2.0.1.Final.jar
1254097 Tue May 08 08:07:04 CEST 2018 BOOT-INF/lib/spring-web-5.0.6.RELEASE.jar
789889 Tue May 08 08:07:52 CEST 2018 BOOT-INF/lib/spring-webmvc-5.0.6.RELEASE.jar
604 Wed May 09 13:41:42 CEST 2018 BOOT-INF/lib/spring-boot-starter-security-2.0.2.RELEASE.jar
366299 Tue May 08 08:06:20 CEST 2018 BOOT-INF/lib/spring-aop-5.0.6.RELEASE.jar
691611 Tue May 08 15:25:12 CEST 2018 BOOT-INF/lib/spring-security-config-5.0.5.RELEASE.jar
494788 Tue May 08 15:24:48 CEST 2018 BOOT-INF/lib/spring-security-web-5.0.5.RELEASE.jar
72603 Thu Jan 10 22:41:24 CET 2019 BOOT-INF/lib/spring-security-crypto-5.1.3.RELEASE.jar
433210 Thu Jan 10 22:41:26 CET 2019 BOOT-INF/lib/spring-security-core-5.1.3.RELEASE.jar
660573 Tue May 08 08:06:02 CEST 2018 BOOT-INF/lib/spring-beans-5.0.6.RELEASE.jar
1090735 Tue May 08 08:06:32 CEST 2018 BOOT-INF/lib/spring-context-5.0.6.RELEASE.jar
1226584 Tue May 08 08:05:54 CEST 2018 BOOT-INF/lib/spring-core-5.0.6.RELEASE.jar
21704 Tue May 08 08:05:42 CEST 2018 BOOT-INF/lib/spring-jcl-5.0.6.RELEASE.jar
279878 Tue May 08 08:06:20 CEST 2018 BOOT-INF/lib/spring-expression-5.0.6.RELEASE.jar
13769 Tue Nov 13 13:35:54 CET 2018 BOOT-INF/lib/kotlin-stdlib-jdk8-1.3.10.jar
1181292 Tue Nov 13 13:25:52 CET 2018 BOOT-INF/lib/kotlin-stdlib-1.3.10.jar
151024 Tue Nov 13 13:24:28 CET 2018 BOOT-INF/lib/kotlin-stdlib-common-1.3.10.jar
17536 Tue Dec 17 16:10:34 CET 2013 BOOT-INF/lib/annotations-13.0.jar
3137 Tue Nov 13 13:35:52 CET 2018 BOOT-INF/lib/kotlin-stdlib-jdk7-1.3.10.jar
2645740 Tue Nov 13 13:33:06 CET 2018 BOOT-INF/lib/kotlin-reflect-1.3.10.jar
501860 Wed Aug 15 21:36:52 CEST 2018 BOOT-INF/lib/commons-lang3-3.8.jar
127509 Fri Aug 04 15:17:50 CEST 2017 BOOT-INF/lib/javax.ws.rs-api-2.1.jar
164361 Sun Dec 23 12:30:54 CET 2018 BOOT-INF/lib/klaxon-5.0.1.jar
50732 Thu Jan 03 15:45:18 CET 2019 BOOT-INF/lib/java-jwt-3.5.0.jar
1342410 Mon Mar 26 15:13:56 CEST 2018 BOOT-INF/lib/jackson-databind-2.9.5.jar
66519 Sat Jul 29 20:53:26 CEST 2017 BOOT-INF/lib/jackson-annotations-2.9.0.jar
321590 Mon Mar 26 08:04:00 CEST 2018 BOOT-INF/lib/jackson-core-2.9.5.jar
335042 Tue Oct 17 08:53:20 CEST 2017 BOOT-INF/lib/commons-codec-1.11.jar
1007502 Tue Aug 07 08:59:10 CEST 2018 BOOT-INF/lib/mysql-connector-java-5.1.47.jar
I finally solved the problem. I don't if know using the BufferedReader is still the best practice, but I decided to keep it in my code as everything was done with it already. So I dropped the use of File class, and I used the following to get a resource from src/main/resources:
var line: String?
val bufferedReader = BufferedReader(InputStreamReader(Thread.currentThread().contextClassLoader.getResourceAsStream(csvLocation)))
do {
line = bufferedReader.readLine()
if (line != null) {
//Do something with 'line'
}
} while (line != null)
csvLocation value is "data/myFile.csv". This file is located in src/main/resources/data
Finally this solution works in my IDE and in the generated jar. Problem solved.
The production app will not run in your IDE, right? So that is of lesser importance than finding where the file exists on the classpath.
Essentially, there is no src/main/resources dir in the jar file - that directory is just a Maven convention for holding resources in a project. If you crack the jar and find the files in question, you'll understand better where Maven puts those files at package time and how to access them. Also note, a Maven-aware IDE will put files in src/main/resources on the app classpath, so the app will likely run in the IDE as well once the correct solution is identified.
To access the application.properties file in the example, use getResource or getResourceAsStream as suggested, with path /BOOT-INF/classes/application.properties. Note the first slash.

Why is kernel boot too late?

I have zynq-microzed board and my log messages are following...
[Mon Jun 09 19:28:38.231 2014] SF: Detected S25FL129P_64K/S25FL128S_64K with page size 64 KiB, total 16 MiB
[Mon Jun 09 19:28:38.446 2014] SF: 1245184 bytes # 0x520000 Read: OK
[Mon Jun 09 19:28:38.446 2014] ## Loading kernel from FIT Image at 01000000 ...
[Mon Jun 09 19:28:38.446 2014] Using 'conf#1' configuration
[Mon Jun 09 19:28:38.446 2014] Trying 'kernel#1' kernel subimage
[Mon Jun 09 19:28:38.446 2014] Description: PetaLinux Kernel
[Mon Jun 09 19:28:38.446 2014] Type: Kernel Image
[Mon Jun 09 19:28:38.446 2014] Compression: gzip compressed
[Mon Jun 09 19:28:38.446 2014] Data Start: 0x010000f0
[Mon Jun 09 19:28:38.446 2014] Data Size: 1215908 Bytes = 1.2 MiB
[Mon Jun 09 19:28:38.446 2014] Architecture: ARM
[Mon Jun 09 19:28:38.446 2014] OS: Linux
[Mon Jun 09 19:28:38.446 2014] Load Address: 0x00008000
[Mon Jun 09 19:28:38.446 2014] Entry Point: 0x00008000
[Mon Jun 09 19:28:38.446 2014] Verifying Hash Integrity ... OK
[Mon Jun 09 19:28:38.446 2014] ## Loading fdt from FIT Image at 01000000 ...
[Mon Jun 09 19:28:38.490 2014] Using 'conf#1' configuration
[Mon Jun 09 19:28:38.490 2014] Trying 'fdt#1' fdt subimage
[Mon Jun 09 19:28:38.490 2014] Description: Flattened Device Tree blob
[Mon Jun 09 19:28:38.490 2014] Type: Flat Device Tree
[Mon Jun 09 19:28:38.490 2014] Compression: uncompressed
[Mon Jun 09 19:28:38.490 2014] Data Start: 0x01128f44
[Mon Jun 09 19:28:38.490 2014] Data Size: 9766 Bytes = 9.5 KiB
[Mon Jun 09 19:28:38.490 2014] Architecture: ARM
[Mon Jun 09 19:28:38.490 2014] Hash algo: crc32
[Mon Jun 09 19:28:38.490 2014] Hash value: fad9c7a8
[Mon Jun 09 19:28:38.490 2014] Hash algo: sha1
[Mon Jun 09 19:28:38.490 2014] Hash value: 4ffcd311a61838768c94b2cb0c2e3d5312861fb4
[Mon Jun 09 19:28:38.490 2014] Verifying Hash Integrity ... crc32+ sha1+ OK
[Mon Jun 09 19:28:38.490 2014] Booting using the fdt blob at 0x1128f44
[Mon Jun 09 19:28:38.492 2014] Uncompressing Kernel Image ... OK
[Mon Jun 09 19:28:38.595 2014] Loading Device Tree to 07ffa000, end 07fff625 ... OK
[Mon Jun 09 19:28:38.595 2014]
[Mon Jun 09 19:28:38.595 2014] Starting kernel ...
[Mon Jun 09 19:28:38.595 2014]
[Mon Jun 09 19:28:39.137 2014] Booting Linux on physical CPU 0x0
[Mon Jun 09 19:28:39.137 2014] Linux version 3.8.11 (root#xilinx) (gcc version 4.7.3 (Sourcery CodeBench Lite 2013.05-40) ) #33 SMP PREEMPT Mon Jun 9 19:23:59 IST 2014
[Mon Jun 09 19:28:39.137 2014] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c53c7d
[Mon Jun 09 19:28:39.137 2014] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[Mon Jun 09 19:28:39.137 2014] Machine: Xilinx Zynq Platform, model: suheb_24
[Mon Jun 09 19:28:39.137 2014] Memory policy: ECC disabled, Data cache writealloc
[Mon Jun 09 19:28:39.137 2014] PERCPU: Embedded 7 pages/cpu #c0aa3000 s5568 r8192 d14912 u32768
[Mon Jun 09 19:28:39.137 2014] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260096
[Mon Jun 09 19:28:39.181 2014] Kernel command line: console=ttyPS0,115200
[Mon Jun 09 19:28:39.181 2014] PID hash table entries: 4096 (order: 2, 16384 bytes)
[Mon Jun 09 19:28:39.181 2014] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[Mon Jun 09 19:28:39.181 2014] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[Mon Jun 09 19:28:39.181 2014] __ex_table already sorted, skipping sort
[Mon Jun 09 19:28:39.181 2014] Memory: 1024MB = 1024MB total
[Mon Jun 09 19:28:39.181 2014] Memory: 1036800k/1036800k available, 11776k reserved, 270336K highmem
[Mon Jun 09 19:28:39.181 2014] Virtual kernel memory layout:
[Mon Jun 09 19:28:39.181 2014] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[Mon Jun 09 19:28:39.181 2014] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[Mon Jun 09 19:28:39.226 2014] vmalloc : 0xf0000000 - 0xff000000 ( 240 MB)
[Mon Jun 09 19:28:39.226 2014] lowmem : 0xc0000000 - 0xef800000 ( 760 MB)
[Mon Jun 09 19:28:39.226 2014] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[Mon Jun 09 19:28:39.226 2014] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[Mon Jun 09 19:28:39.226 2014] .text : 0xc0008000 - 0xc01b8c4c (1732 kB)
[Mon Jun 09 19:28:39.226 2014] .init : 0xc01b9000 - 0xc02785c0 ( 766 kB)
[Mon Jun 09 19:28:39.226 2014] .data : 0xc027a000 - 0xc0289980 ( 63 kB)
[Mon Jun 09 19:28:39.226 2014] .bss : 0xc0289980 - 0xc0298798 ( 60 kB)
[Mon Jun 09 19:28:39.226 2014] Preemptible hierarchical RCU implementation.
[Mon Jun 09 19:28:39.226 2014] RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[Mon Jun 09 19:28:39.267 2014] NR_IRQS:16 nr_irqs:16 16
[Mon Jun 09 19:28:39.267 2014] xslcr mapped to f0002000
[Mon Jun 09 19:28:39.267 2014] Zynq clock init
[Mon Jun 09 19:28:39.267 2014] sched_clock: 16 bits at 54kHz, resolution 18432ns, wraps every 1207ms
[Mon Jun 09 19:28:39.267 2014] ps7-ttc #0 at f0004000, irq=43
it takes 0.542 seconds between...
[Mon Jun 09 19:28:38.595 2014] Starting kernel ...
[Mon Jun 09 19:28:38.595 2014]
[Mon Jun 09 19:28:39.137 2014] Booting Linux on physical CPU 0x0
Now i want to reduce this time as possible..
But i dont know how to reduce this time (0.542 sec)
And i want to know that, what does it do at that time.
Can you please tell me how can i achieve this?
Your method of calculating elapsed time is using flawed data.
What you think is a 0.5 sec "delay" is actually U-Boot outputting "Starting kernel ..." in real time, while the kernel buffers and postpones outputting its "Booting Linux..." until the system and console are initialized. That's comparing apples to oranges.
At the very least you have to get the kernel to output in realtime (just like U-Boot). Then your timestamps will better indicate actual elapsed time.
While the kernel is performing the early initialization, interrupts are disabled and any output to the console (including that "Booting Linux on..." message) is held in a buffer until console_init() is performed at line 572 in Linux/init/main.c. Note that the salient "Booting Linux on..." text was "output" at the beginning of this start_kernel() procedure from the routine smp_setup_processor_id(), line 478. Most of the "delay" that you notice before the "Booting Linux on..." text appears as the kernel starts up is caused by this buffering of the console output.
You can overcome this apparent delay due to buffering by enabling the kernel debugging feature early printk.
Two steps are required:
Enable this feature in configuration:
make menuconfig
Kernel hacking
Kernel low-level debugging functions
Early printk
Add the parameter "earlyprintk" to the kernel command line, which is usually stored in the U-Boot environment variable bootargs or in the Device Tree.
The kernel boot log should indicate that this feature is enabled:
Booting Linux on physical CPU 0x0
Linux version 3.10...
CPU: ARMv7 Processor [410fc051] revision 1 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Atmel SAMA5 (Device Tree), model: Atmel SAMA5D36-EK
bootconsole [earlycon0] enabled
Memory policy: ECC disabled, Data cache writeback
...
Kernel command line: console=ttyS0,115200 earlyprintk rootfstype=ubifs ...

Resources