Java Native Compiler in depth

所在平台: Udemy

课程主页: https://www.udemy.com/course/java-native-compiler-in-depth/

课程评论:没有评论

第一个写评论        关注课程

课程简介

**课程大纲:深入了解 Java Native Compiler** 本课程将带您深入探索 GraalVM 的 `native-image` 工具,学习如何将 Java 应用程序编译为本地可执行二进制文件,从而获得媲美 C++ 的运行时速度。课程还将深入讲解 JDK 工具和运行 Java 应用程序所需的命令行知识。 **第一部分:Java 应用程序基础** 在本节中,您将学习 Java 应用程序的核心概念,包括如何在终端中启动应用程序、理解 `PATH` 和 `CLASSPATH` 等环境变量及其在 Java 应用程序中的应用。此外,您还将了解命令行参数的含义以及如何在应用程序中使用它们。 **第二部分:默认编译器工具链** 本节将指导您完成各操作系统上默认编译器工具链的安装过程。macOS 使用 Apple Clang (Xcode),Linux 使用开源的 GCC,Windows 则使用 MSVC。您将学会如何确保这些工具链的正确安装和配置。 **第三部分:GraalVM Native-Image 介绍** 本节将为您介绍 GraalVM 和 `native-image`。您将学习如何下载和安装 GraalVM,以及如何运行 `native-image` 工具。我们将通过一个简单的 "HelloWorld" Java 应用程序,一步步演示如何将其编译成本地可执行二进制文件。 **第四部分:使用 Native-Image 编译 Java 应用程序** 本节将更全面地介绍 GraalVM 的 `native-image` 工具。您将了解 `native-image` 在编译 Java 应用程序时生成的输出。同时,您还将学习如何通过向 `native-image` 传递各种命令行标志来提供构建配置。本节还将讨论管道(pipelining)和终端命令的重定向(redirection)等重要概念。 **第五部分:Eclipse IDE 的外部工具** 本节将深入介绍 Eclipse IDE 的外部工具功能。强烈推荐您将 Eclipse IDE 与 `native-image` 工具结合使用,以无缝地将 Java 应用程序编译为本地可执行二进制文件。此外,本节还将演示如何处理使用 Maven 构建工具的 Java 应用程序的 JAR 依赖。 **第六部分:Native-Image 选项** 本节将详细介绍在终端运行 `native-image` 时可以设置的最重要的标志。您还将学习如何处理 Java 的动态特性,例如反射(Reflections)、动态类加载(Dynamic class loading)、JNI,通过调用 GraalVM JVM 中嵌入的追踪代理(tracing agent)来实现。一旦生成了配置文件,您将学会如何将它们传递给 `native-image` 编译器,以确保最终的可执行二进制文件能够成功运行。 **第七部分:解析命令行参数** 在本节中,您将了解到一个名为 "JCommander" 的 Java 库,它提供了一个易于使用的 API,用于解析 Java 应用程序的命令行参数,并创建对象或设置对象的状态。您将学会如何指示 `native-image` 与 JCommander 协同工作,以便最终的可执行二进制文件也能轻松地解析命令行参数。 **第八部分:Native-Image 官方文档** 本节将提供 `native-image` 工具的在线文档链接。 **第九部分:资源(PowerPoint、源代码等)** 在本节中,您将找到课程完整的 PowerPoint 演示文稿和源代码。

课程评论(0条)

课程详情

Learn how to use GraalVM native-image tool to compile your Java application to a native executable binary. This allows you to get runtime speeds as fast as C++ applications! This course also teaches you in-depth knowledge of JDK tools and the required knowledge of command-line for running java applications.- Section 1: Fundamentals of Java ApplicationsThis section teaches you the fundamental concepts such as launching an application in terminal and environment variables such as "PATH" and "CLASSPATH" and how to access them inside a Java application. It also teaches you the meaning of command-line arguments and how to use them in an application.- Section 2: Default Compiler Tool ChainThis section walks you through the installation process of the default compiler toolchain for each operating system. macOS uses Apple Clang (Xcode), whereas Linux uses the open-source GCC and Windows uses MSVC. You will learn how to ensure the correct installation and configuration of these toolchains.- Section 3: Introduction to GraalVM Native-ImageThis section provides the introduction to GraalVM and native-image. You will learn how to download and install GraalVM and how to run the native-image tool. It walks you through all the steps for writing a simple "HelloWorld" java application and compiling it to a native executable binary.- Section 4: Compiling Java Applications with Native-ImageThis section is the more serious introduction to the native-image tool from GraalVM. You will learn about the outputs that native-image provides while compiling your java application. You will also learn how to provide build configuration by passing various flags to the native-image on the command-line. The important concept of pipelining and redirection of commands on the terminal is also discussed in this section.- Section 5: Eclipse IDE's External ToolThis section provides an in-depth introduction to Eclipse's IDE external tool. It is highly recommended to use Eclipse IDE in conjunction with the native-image tool to seamlessly compile your java applications to the native executable binary. It also shows you how to handle jar dependencies of your java application when using Maven build tool.- Section 6: Native-Image OptionsThis section describes the most important flags that you can set when running native-image from the terminal. It also introduces how to handle dynamic features of java such as Reflections, Dynamic class loading, JNI, by invoking the tracing agent that is embedded in the GraalVM's JVM. Once the configuration files are created, you'll learn how to pass them to the native-image compiler so that the final executable binary can be run successfully.- Section 7: Parsing Command-Line ArgumentsThis interesting section describes the use of a java library called "JCommander" that provides an easy-to-use API for parsing command-line arguments of a java application and creating objects or setting the state of objects. You will learn how to instruct native-image to work with JCommander so that the final executable binary also benefits from easily parsing command-line arguments.- Section 8: Native-Image Official DocumentationThis section provides the link to the online documentation of the native-image tool.- Section 9: Resources (PowerPoint, source codes, …)You will find the complete set of PowerPoint slides of the course in this section.

课程标签

0人关注该课程

主题相关的课程