Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

finished with non-zero exit value 1 #4

Open
harideva16 opened this issue Aug 6, 2021 · 0 comments
Open

finished with non-zero exit value 1 #4

harideva16 opened this issue Aug 6, 2021 · 0 comments

Comments

@harideva16
Copy link

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant