简体   繁体   English

如何使用编译源 GraalVM 运行 Java 程序?

[英]How to use compiled source GraalVM to run a Java program?

I built the GraalVM JVM code from the project repository ( GraalVM ), using the following instructions .我使用以下说明从项目存储库 ( GraalVM ) 构建了 GraalVM JVM 代码。 I think it completed successfully (didn't see any error messages), and it created a new folder graal\\vm\\mxbuild with what seems to be the compilation product.我认为它成功完成(没有看到任何错误消息),并且它创建了一个新文件夹 graal\\vm\\mxbuild ,似乎是编译产品。

My question is, how do I use the compiled JVM to run a java program?我的问题是,如何使用编译后的 JVM 来运行 java 程序? usually I would expect some java execution file, but I can't find any.通常我会期待一些java执行文件,但我找不到任何。

My goal is to eventually change the JVM code in order to test the behavior of the GC, so if there is a different way to do it with the GraalVM source code I'll appreciate your instructions.我的目标是最终更改 JVM 代码以测试 GC 的行为,因此如果使用 GraalVM 源代码有不同的方法可以做到这一点,我将感谢您的指示。

(working on an Ubuntu 18.04 system if it matters..) (如果重要的话,在 Ubuntu 18.04 系统上工作..)

The jdk product files can be found in the following folder: graal/sdk/mxbuild/linux-amd64/GRAALVM_CE_JAVA8/graalvm-ce-java8-20.1.0-dev jdk产品文件可以在以下文件夹中找到:graal/sdk/mxbuild/linux-amd64/GRAALVM_CE_JAVA8/graalvm-ce-java8-20.1.0-dev

It is possible to use the command mx --env ce graalvm-home to find the jdk files.可以使用命令mx --env ce graalvm-home来查找 jdk 文件。

Another thing I found out and maybe can be helpufl for someone in the future, is that it is possible to work and compile only on the jvm project under the Graal project.我发现的另一件事,也许可以为将来的某个人提供帮助,那就是可以仅在 Graal 项目下的 jvm 项目上工作和编译。 I order to do so, use the code in graal-jvmci-8 repository .我这样做,使用graal-jvmci-8 存储库中的代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM