
Quick Reference Run Java Applications Enable Polyglot Programming Java application Compile a Java class: Run a Node.js application: javac MyApp.java node myApp.js Run the application from a JAR file: Run a JavaScript, R, Ruby, Python, LLVM application: Java Build Tool java -jar MyApp.jar js myApp.js mvn package / gradle build Specify the class path for the app: graalpyThon myApp.py java -cp TargeT/myapp.jar ruby myApp.rb com.mycompany.app.MyApp R myApp.r Native Image Builder Run the JIT compiler as JAR or native library (default): lli myApp native-image -jar App.jar -XX:±UseJVMCINaTiveLibrary Run other languages in a Java application: Select the GraalVM compiler configuration: org.. graalvm polyglot -Dgraal.CompilerConfiguraTion= JIT AOT .Context enTerprise|communiTy|economy java -jar App.jar ./app .createContext() Print the details for the JIT compiled code: .eval("languageId", "code"); -Dgraal.PrinTCompilaTion=True Produce the diagnostic data for the compilation: Build a shared library: Enable polyglot capabilities for an application: -Dgraal.Dump --shared --polygloT --jvm Load a javaagent: Build a statically linked native image: Limit resources for the application: -javaagenT:<jarpaTh>[=<opTions>] --sTaTic --libc=glibc|musl --sandbox.MaxCPUTime=<ms> -agenTlib:<libname>[=<opTions>] Include a language runtime in the native image: --sandbox.MaxSTaTemenTs=N --language:js|pyThon|ruby|llvm|wasm Debug the application: Compile to Native Executables Use profile-guided optimizations: --inspecT[=[hosT:]<porT number>] naTive-image --pgo-insTrumenT MyApp --inspecT-brk Install the native image builder from a local file: ./myapp #and apply load gu insTall -L naTive-image.jar Profile the application: naTive-image --pgo profile.iprof MyApp --cpusampler Native Image command syntax: Attach a debugger: --cpuTracer naTive-image [opTions] MyClass --debug-aTTach=[porT] --memTracer Build a native image of a JAR file: Trace classes initialization: naTive-image -jar MyApp.jar --Trace-class-iniTializaTion Run a native image: List all image build options for experts: ./myapp --experT-opTions-all https//: www.Graalvm.orG ver: 1.000.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages1 Page
-
File Size-