-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[native-image] how to compile with jar dependencies? ("Main entry point class not found") #1939
Comments
I have been able to compile the code into exe by dumbly unzipping the dependency and then rebuilding a jar with the dependency inside.
So, the dependency is not the cause. Is this process already included in |
@jgranduel, import io.vavr.control.Try;
public class Hello {
public static void main(String[] args) {
int x = 10;
int y = 0;
int defaultValue = 5;
Integer result = Try.of(() -> (x / y))
.getOrElse(defaultValue);
System.out.println(result);
}
} And the commands:
|
@jbreathe |
Closing as resolved. |
Hi,
sorry if this is written somewhere, but I have not been able to compile a simple program with dependencies.,
My env is Win10x64, graalvm-19.3.0 as described in #1886 .
But it might not be the way to do it? I tried with a command taken in graalvm doc
$GRAALVM_HOME/bin/native-image -cp ./target/mixed-code-hello-world-1.0-SNAPSHOT.jar -H:Name=helloworld -H:Class=hello.JavaHello -H:+ReportUnsupportedElementsAtRuntime --allow-incomplete-classpath
. I also tried to build a jar, but again I got the entry point issue.Thanks in advance (and for completing the documentation if needed).
Best regards
The text was updated successfully, but these errors were encountered: