Closed harideva16 closed 3 years ago
I want to build JPRO on github actions.
so , I need to add systemProperty in gradle.build file.
Help me !!!
usually I set jni library path like this.
But, I didn't know about how to set system Property in gradle for all the three following os?
How can I set systemProperty java.library.path
?
I followed this answer
I added the following code in gradle.build file to set systemProperty.
task local {
run { systemProperty "java.library.path", file("${project(":hello").buildDir}/lib/main/debug").absolutePath }
}
bootRun.mustRunAfter local
But , it not worked.
I followed this project to implement JNI . I searched in internet about how to set system properties for java.library.path
in gradle . But , no answer found.
I also asked a question in stackoverflow But , no response.
so, please help me !!!
If I run it comes an error like this java.lang.UnsatisfiedLinkError: no hello in java.library.path
.
Can you give any documents or reference about it ?
How can I set systemProperty java.library.path
in gradle.build file ?
Give a answer!!!!
You can ad JVM arguments the following ways:
For a "Normal JavaFX application" starting with ./gradlew run
applicationDefaultJvmArgs = ['-Djava.library.path=something']
For JPro, starting with ./gradlew jproRun
jpro.JVMArgs << '-Djava.library.path=something'
@FlorianKirmaier I think it's not a right answer.
Please check this : https://stackoverflow.com/a/59495773/10870644
I've only answered on how to add System properties. I didn't answer anything c++/"native compilation" related - which I don't know anything about. This is also not the right place to question anything related to gradle/c++ interactions.
I hope the stackoverflow answer solves your problem.
How can I set systemProperty
java.library.path
?I followed this https://stackoverflow.com/questions/23367507/how-to-pass-system-property-to-gradle-task
I added the following code in gradle.build file to set systemProperty.
But , it not worked.
How can I set systemProperty
java.library.path
in gradle.build file ?