Ubuntu/GraalVM: Difference between revisions
Jump to navigation
Jump to search
(33 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
|valign="top" colspan="2"| | |valign="top" colspan="2"| | ||
<source lang="bash"> | <source lang="bash"> | ||
sudo wget -c https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/\ | sudo wget -c https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/\ | ||
graalvm-ce-java17-linux- | graalvm-ce-java17-linux-aarch64-22.0.0.2.tar.gz -P /opt/cli/ | ||
sudo tar -xvzf /opt/cli/ | sudo tar -xvzf /opt/cli/graalvm-ce-java17-linux-aarch64-22.0.0.2.tar.gz -C /opt/cli/ | ||
graalvm-ce-java17-linux- | sudo rm -rf /opt/cli/graalvm-ce-java17-linux-aarch64-22.0.0.2.tar.gz | ||
export GRAALVM_HOME=/opt/cli/graalvm-ce-java17-22.0.0.2 | cat << \EOF >> $ACADEMIA_HOME/etc/env/system.sh | ||
# chorke academia sys | |||
export GRAALVM_HOME='/opt/cli/graalvm-ce-java17-22.0.0.2' | |||
EOF | |||
</source> | </source> | ||
Line 28: | Line 31: | ||
update-alternatives --query gu | update-alternatives --query gu | ||
update-alternatives --query js | update-alternatives --query js | ||
sudo update-alternatives --install /usr/bin/jconsole jconsole\ | |||
$GRAALVM_HOME/bin/jconsole 1983 | |||
sudo update-alternatives --install /usr/bin/jshell jshell\ | |||
$GRAALVM_HOME/bin/jshell 1983 | |||
sudo update-alternatives --install /usr/bin/javac javac\ | sudo update-alternatives --install /usr/bin/javac javac\ | ||
$GRAALVM_HOME/bin/javac | $GRAALVM_HOME/bin/javac 1983 | ||
sudo update-alternatives --install /usr/bin/java java\ | sudo update-alternatives --install /usr/bin/java java\ | ||
$GRAALVM_HOME/bin/java | $GRAALVM_HOME/bin/java 1983 | ||
</source> | </source> | ||
|valign="top"| | |valign="top"| | ||
<source lang="bash"> | <source lang="bash"> | ||
sudo update-alternatives --install /usr/bin/jdb jdb\ | |||
$GRAALVM_HOME/bin/jdb 1983 | |||
sudo update-alternatives --install /usr/bin/jps jps\ | |||
$GRAALVM_HOME/bin/jps 1983 | |||
sudo update-alternatives --install /usr/bin/js js\ | |||
$GRAALVM_HOME/bin/js 1983 | |||
sudo update-alternatives --install /usr/local/bin/gu gu\ | |||
$GRAALVM_HOME/bin/gu 1983 | |||
sudo gu install native-image | sudo gu install native-image | ||
sudo update-alternatives --install /usr/bin/native-image native-image\ | sudo update-alternatives --install /usr/bin/native-image native-image\ | ||
$GRAALVM_HOME/bin/native-image | $GRAALVM_HOME/bin/native-image 1983 | ||
native-image --version | native-image --version | ||
sudo gu --version | |||
javac -version | |||
java -version | |||
js -version | |||
</source> | </source> | ||
Line 96: | Line 114: | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
'''ls -lah /opt/graalvm*/bin/|grep java''' | |||
alternatives --config native-image | alternatives --config native-image | ||
alternatives --config jconsole | |||
alternatives --config jshell | |||
alternatives --config javac | alternatives --config javac | ||
alternatives --config java | alternatives --config java | ||
Line 103: | Line 124: | ||
|valign='top'| | |valign='top'| | ||
'''microdnf install httpd-tools''' | |||
'''microdnf install nginx''' | |||
'''microdnf install wget''' | |||
'''microdnf install curl''' | |||
javac -version | javac -version | ||
java -version | java -version | ||
Line 110: | Line 134: | ||
|} | |} | ||
==Maven== | |||
{| | |||
|valign="top" colspan="2"| | |||
<source lang="bash"> | |||
sudo wget -c https://archive.apache.org/dist/maven/maven-3/3.8.4/binaries/\ | |||
apache-maven-3.8.4-bin.tar.gz -P /opt/cli/ | |||
sudo tar -xvzf /opt/cli/apache-maven-3.8.4-bin.tar.gz\ | |||
-C /opt/cli/ | |||
export MAVEN_HOME=/opt/cli/apache-maven-3.8.4 | |||
sudo rm -rf /opt/cli/apache-maven-3.8.4-bin.tar.gz | |||
</source> | |||
|- | |||
|colspan="2"| | |||
---- | |||
|- | |||
|valign="top"| | |||
<source lang="bash"> | |||
update-alternatives --query mvn | |||
sudo update-alternatives --install /usr/bin/mvn mvn\ | |||
$MAVEN_HOME/bin/mvn 1 | |||
</source> | |||
|valign="top"| | |||
<source lang="bash"> | |||
update-alternatives --config mvn | |||
update-alternatives --query mvn | |||
mvn -v | |||
</source> | |||
|} | |||
==Graal JS== | |||
<source lang="java"> | |||
new ScriptEngineManager().getEngineByName("graal.js"); | |||
/* | |||
List<ScriptEngineFactory> engines = (new ScriptEngineManager()).getEngineFactories(); | |||
for (ScriptEngineFactory f: engines) { | |||
System.out.println(f.getLanguageName()+" "+f.getEngineName()+" "+f.getNames().toString()); | |||
}*/ | |||
</source> | |||
==Knowledge== | ==Knowledge== | ||
Line 174: | Line 243: | ||
| valign="top" | | | valign="top" | | ||
* [https://blogs.oracle.com/developers/post/building-cross-platform-native-images-with-graalvm GraalVM: Build a Cross Platform Native Images] | * [https://blogs.oracle.com/developers/post/building-cross-platform-native-images-with-graalvm GraalVM: Build a Cross Platform Native Images] | ||
* [https://www.oracle.com/downloads/graalvm-downloads.html GraalVM: Download Oracle Enterprise Edition] | |||
* [https://www.graalvm.org/release-notes/version-roadmap/ GraalVM: Community Version Roadmap] | * [https://www.graalvm.org/release-notes/version-roadmap/ GraalVM: Community Version Roadmap] | ||
* [https://www.graalvm.org/22.0/reference-manual/js/ GraalVM: JavaScript Implementation] | * [https://www.graalvm.org/22.0/reference-manual/js/ GraalVM: JavaScript Implementation] | ||
* [https:// | * [https://www.graalvm.org/22.0/reference-manual/js/JavaScriptCompatibility/ GraalVM: JavaScript Compatibility] | ||
* [https://github.com/graalvm/container/packages GraalVM Container Packages | * [https://github.com/graalvm/container/packages GraalVM: Container Packages] | ||
* [https://www.graalvm.org/downloads/ GraalVM: Download] | |||
* [https://www.graalvm.org/downloads/ Download | |||
* [[Debian/GraalVM]] | * [[Debian/GraalVM]] | ||
* [[Fedora/GraalVM]] | * [[Fedora/GraalVM]] | ||
Line 188: | Line 257: | ||
|- | |- | ||
| valign="top" | | | valign="top" | | ||
* [https:// | * [https://stackoverflow.com/questions/61574901/ CheckstyleException: Unable to find but file exists] | ||
* [https://stackoverflow.com/questions/50860766/ Puppy Crawl's Maven Check Style Error] | |||
* [https://stackoverflow.com/questions/42569634/ URI is not registered (Schemas & DTDs)] | |||
* [https://github.com/checkstyle/checkstyle/tree/master/config Maven Check Style Plugin Config] | |||
* [https://git-scm.com/download/linux Git Download for Linux and Unix] | |||
* [https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml Google Check Style Example] | |||
* [[IntelliJ IDEA]] | |||
* [[PostgreSQL]] | |||
* [[Camunda]] | |||
* [[Git]] | |||
| valign="top" | | | valign="top" | | ||
* [https://www.graalvm.org/22.0/reference-manual/js/RunOnJDK/ Run GraalVM JavaScript on a Stock JDK] | |||
* [https://developers.redhat.com/articles/2021/12/14/explore-java-17-language-features-quarkus Java 17 language features with Quarkus] | |||
* [https://stackoverflow.com/questions/69272445/ Java 8 »17 Migration Issue for Lombok] | |||
* [https://unix.stackexchange.com/questions/47434/ Difference between curl vs. wget] | |||
* [https://rollbar.com/blog/quarkus-vs-spring-boot/ Quarkus vs Spring Boot] | |||
* [https://stackoverflow.com/questions/31851611/ ARM64 vs. AArch64] | |||
* [https://github.com/graalvm/mandrel/releases Mandrel: Download] | |||
* [[Docker Compose]] | |||
* [[MacOS/GraalVM]] | |||
* [[HAProxy]] | |||
| valign="top" | | | valign="top" | | ||
* [https://www.graalvm.org/22.0/reference-manual/js/Options/ GraalVM JavaScript Launcher Options] | |||
* [https://infolinux.com/2019/02/19/install-unijoy-in-linux/ Install Unijoy on Linux] | |||
* [[JShell]] | |||
|- | |- |
Latest revision as of 08:30, 9 May 2022
Install
sudo wget -c https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/\
graalvm-ce-java17-linux-aarch64-22.0.0.2.tar.gz -P /opt/cli/
sudo tar -xvzf /opt/cli/graalvm-ce-java17-linux-aarch64-22.0.0.2.tar.gz -C /opt/cli/
sudo rm -rf /opt/cli/graalvm-ce-java17-linux-aarch64-22.0.0.2.tar.gz
cat << \EOF >> $ACADEMIA_HOME/etc/env/system.sh
# chorke academia sys
export GRAALVM_HOME='/opt/cli/graalvm-ce-java17-22.0.0.2'
EOF
| |
| |
update-alternatives --query native-image
update-alternatives --query jconsole
update-alternatives --query jshell
update-alternatives --query javac
update-alternatives --query java
update-alternatives --query jdb
update-alternatives --query jps
update-alternatives --query gu
update-alternatives --query js
sudo update-alternatives --install /usr/bin/jconsole jconsole\
$GRAALVM_HOME/bin/jconsole 1983
sudo update-alternatives --install /usr/bin/jshell jshell\
$GRAALVM_HOME/bin/jshell 1983
sudo update-alternatives --install /usr/bin/javac javac\
$GRAALVM_HOME/bin/javac 1983
sudo update-alternatives --install /usr/bin/java java\
$GRAALVM_HOME/bin/java 1983
|
sudo update-alternatives --install /usr/bin/jdb jdb\
$GRAALVM_HOME/bin/jdb 1983
sudo update-alternatives --install /usr/bin/jps jps\
$GRAALVM_HOME/bin/jps 1983
sudo update-alternatives --install /usr/bin/js js\
$GRAALVM_HOME/bin/js 1983
sudo update-alternatives --install /usr/local/bin/gu gu\
$GRAALVM_HOME/bin/gu 1983
sudo gu install native-image
sudo update-alternatives --install /usr/bin/native-image native-image\
$GRAALVM_HOME/bin/native-image 1983
native-image --version
sudo gu --version
javac -version
java -version
js -version
|
Docker
Java 17 » GraalVM ??: | |
docker pull ghcr.io/graalvm/jdk:ol8-java17 docker pull ghcr.io/graalvm/nodejs:ol8-java17 docker pull ghcr.io/graalvm/graalvm-ce:ol8-java17 docker pull ghcr.io/graalvm/native-image:ol8-java17 |
docker run -it --rm ghcr.io/graalvm/jdk:ol8-java17 bash docker run -it --rm ghcr.io/graalvm/nodejs:ol8-java17 bash docker run -it --rm ghcr.io/graalvm/graalvm-ce:ol8-java17 bash docker run -it --rm ghcr.io/graalvm/native-image:ol8-java17 --help |
Java 17 » GraalVM 22: | |
docker pull ghcr.io/graalvm/jdk:ol8-java17-22 docker pull ghcr.io/graalvm/nodejs:ol8-java17-22 docker pull ghcr.io/graalvm/graalvm-ce:ol8-java17-22 docker pull ghcr.io/graalvm/native-image:ol8-java17-22 |
docker run -it --rm ghcr.io/graalvm/jdk:ol8-java17-22 bash docker run -it --rm ghcr.io/graalvm/nodejs:ol8-java17-22 bash docker run -it --rm ghcr.io/graalvm/graalvm-ce:ol8-java17-22 bash docker run -it --rm ghcr.io/graalvm/native-image:ol8-java17-22 --help |
Java 17 » GraalVM ?? » Oracle Linux 8: | |
ls -lah /opt/graalvm*/bin/|grep java alternatives --config native-image alternatives --config jconsole alternatives --config jshell alternatives --config javac alternatives --config java alternatives --config gu alternatives --config js |
microdnf install httpd-tools microdnf install nginx microdnf install wget microdnf install curl javac -version java -version gu --version js -version |
Maven
sudo wget -c https://archive.apache.org/dist/maven/maven-3/3.8.4/binaries/\
apache-maven-3.8.4-bin.tar.gz -P /opt/cli/
sudo tar -xvzf /opt/cli/apache-maven-3.8.4-bin.tar.gz\
-C /opt/cli/
export MAVEN_HOME=/opt/cli/apache-maven-3.8.4
sudo rm -rf /opt/cli/apache-maven-3.8.4-bin.tar.gz
| |
| |
update-alternatives --query mvn
sudo update-alternatives --install /usr/bin/mvn mvn\
$MAVEN_HOME/bin/mvn 1
|
update-alternatives --config mvn
update-alternatives --query mvn
mvn -v
|
Graal JS
new ScriptEngineManager().getEngineByName("graal.js");
/*
List<ScriptEngineFactory> engines = (new ScriptEngineManager()).getEngineFactories();
for (ScriptEngineFactory f: engines) {
System.out.println(f.getLanguageName()+" "+f.getEngineName()+" "+f.getNames().toString());
}*/
Knowledge
sudo update-alternatives --remove-all javac |
sudo update-alternatives --remove-all java |
sudo update-alternatives --remove-all gu |
| ||
ssh-keygen -f "/home/chorke/.ssh/known_hosts" -R "10.19.83.111" ssh-keygen -f ~/.ssh/known_hosts -R 10.19.83.111 |
apt search upx sudo apt install upx-ucl | |
| ||