Comments (10)
Thank you for reporting this, we will take a look into this.
from hellojpro.
These are not really JPro issues, but general gradle topics.
in the newer gradle versions, the scope is named testImplementation instead of testCompile. Probably happened, because your JNI tutorial was using an older gradle version.
You will also need a settings.gradle to include the other project:
include "hello"
include "server"
from hellojpro.
I modified but it comes error.
I want to use JNI with JPRO.
Can you give a tutorial for me?
from hellojpro.
Gradle provides a list of tutorials: https://gradle.org/guides/
You have to move the JUnit dependency, out of the dependencies of the build script.
You can create a new dependency block, at the bottom of your application. Then it should work.
from hellojpro.
I tried but same error.
from hellojpro.
Do you use the gradle wrapper? Without more details I cant help you.
from hellojpro.
When I run I have the following error.
C:\Users\pja\Documents\HelloJPro>gradlew test
> Task :hello:compileDebugCpp FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':hello:compileDebugCpp'.
> No tool chain is available to build C++ for host operating system 'Windows 10' architecture 'x86-64':
- Tool chain 'visualCpp' (Visual Studio):
- Could not locate a Visual Studio installation, using the command line tool, Windows registry or system path.
- Tool chain 'gcc' (GNU GCC):
- Could not find C++ compiler 'g++' in system path.
- Tool chain 'clang' (Clang):
- Could not find C++ compiler 'clang++' in system path.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --
scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
3 actionable tasks: 1 executed, 2 up-to-date
How can I solve this error ?
from hellojpro.
I think it wants you to install/configure c++ in some form.
But I can't help you with it. Maybe ask the people from the JNI plugin? Or try to fix it yourself, I think you only have to install some components, probably easy.
from hellojpro.
My java file
public class HelloWorld {
public native void print();
static {
System.loadLibrary("hello");
}
public static void main(String[] args) {
new HelloWorld().print();
}
}
OUTPUT
10:30:26: Executing task 'HelloWorld.main()'...
> Task :compileJava
> Task :processResources NO-SOURCE
> Task :classes
> Task :HelloWorld.main() FAILED
2 actionable tasks: 2 executed
java.lang.UnsatisfiedLinkError: no hello in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1860)
at java.lang.Runtime.loadLibrary0(Runtime.java:871)
at java.lang.System.loadLibrary(System.java:1124)
at HelloWorld.<clinit>(HelloWorld.java:5)
Exception in thread "main"
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':HelloWorld.main()'.
> Process 'command 'C:/Program Files/OpenJDK/openjdk-8u292-b10/bin/java.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to
get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 5s
10:30:33: Task execution finished 'HelloWorld.main()'.
How can I solve this ?
from hellojpro.
JPro currently only supports java 11 and above. But that's not related to your issue. You will somehow have to load the library. I think either System.load and/or by setting -Djava.library.path=...
.
But this is not the right place to ask for it, so I'm closing the ticket.
from hellojpro.
Related Issues (20)
- how to place ads ? HOT 1
- Give an example for JNI
- fatal error C1083: Cannot open include file: 'com_example_greeter_Greeter.h': No such file or directory
- How to set systemProperty ? HOT 5
- How to set system Property java.library.path ? HOT 6
- System Property HOT 1
- System Property path ?
- native library didn't work after releasing JPRO . HOT 10
- How to apply gradle custom jar plugin? HOT 2
- unixStartScript.txt (The system cannot find the file specified)
- How to compile cpp ?
- JPro with native library. HOT 4
- How to add linker in gradle ? HOT 1
- Could not resolve com.sandec.jpro:jpro-plugin-gradle:2019.1.2 HOT 4
- oi HOT 1
- Create and attach JPro release zip as an asset on a project release.
- App engine project failing to start in eclipse HOT 1
- Result of the CompletableFuture<String> executeScriptWithFuture(String code) starts and ends with double quotes, other quotes is escaped HOT 1
- How to get string from an async js function? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hellojpro.