MacOS/GraalVM: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
(Created page with "==Install== {| |valign="top" colspan="2"| <source lang="bash"> sudo wget -c https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/\ graalvm-ce-java17-dar...")
 
 
(8 intermediate revisions by the same user not shown)
Line 12: Line 12:
export GRAALVM_HOME=`/usr/libexec/java_home -v22.0.0.2`
export GRAALVM_HOME=`/usr/libexec/java_home -v22.0.0.2`
export JAVA_HOME=`/usr/libexec/java_home -v22.0.0.2`
export JAVA_HOME=`/usr/libexec/java_home -v22.0.0.2`
export PATH="$GRAALVM_HOME/bin:$PATH"
</source>
</source>


Line 20: Line 21:
|valign="top"|
|valign="top"|
<source lang="bash">
<source lang="bash">
/usr/libexec/java_home -v22.0.0.2
sudo gu install native-image
native-image --version
</source>
</source>


Line 26: Line 28:
<source lang="bash">
<source lang="bash">
java -version
java -version
gu --version
</source>
</source>


Line 93: Line 96:
|}
|}


==Maven==
==Maven & Ant==
{|
{|
|valign="top" colspan="2"|
|valign="top"|
<source lang="bash">
<source lang="bash">
sudo wget -c https://archive.apache.org/dist/maven/maven-3/3.8.4/binaries/\
sudo wget -c https://archive.apache.org/dist/maven/maven-3/3.8.4/\
apache-maven-3.8.4-bin.tar.gz -P /opt/cli/
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\
sudo tar -xvzf /opt/cli/apache-maven-3.8.4-bin.tar.gz\
Line 105: Line 108:
export MAVEN_HOME=/opt/cli/apache-maven-3.8.4
export MAVEN_HOME=/opt/cli/apache-maven-3.8.4
sudo rm -rf /opt/cli/apache-maven-3.8.4-bin.tar.gz
sudo rm -rf /opt/cli/apache-maven-3.8.4-bin.tar.gz
</source>
|valign="top"|
<source lang="bash">
sudo wget -c https://archive.apache.org/dist/ant/binaries/\
apache-ant-1.10.12-bin.tar.gz -P /opt/cli/
sudo tar -xvzf /opt/cli/apache-ant-1.10.12-bin.tar.gz\
-C /opt/cli/
export ANT_HOME=/opt/cli/apache-ant-1.10.12
sudo rm -rf /opt/cli/apache-ant-1.10.12-bin.tar.gz
</source>
</source>


Line 113: Line 128:
|valign="top"|
|valign="top"|
<source lang="bash">
<source lang="bash">
java -version
mvn -v
</source>
</source>


|valign="top"|
|valign="top"|
<source lang="bash">
<source lang="bash">
mvn -v
ant -version
</source>
</source>


Line 212: Line 227:


| valign="top" |
| valign="top" |
* [[Academia JavaEE Workspace in MacOS]]
* [https://developers.redhat.com/articles/2021/12/14/explore-java-17-language-features-quarkus Java 17 language features with Quarkus]
* [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://stackoverflow.com/questions/69272445/ Java 8 »17 Migration Issue for Lombok]
* [https://unix.stackexchange.com/questions/47434/ Difference between curl vs. wget]
* [https://unix.stackexchange.com/questions/47434/ Difference between curl vs. wget]
* [https://rollbar.com/blog/quarkus-vs-spring-boot/ Quarkus vs Spring Boot]
* [https://rollbar.com/blog/quarkus-vs-spring-boot/ Quarkus vs Spring Boot]
* [https://blogs.oracle.com/java/post/announcing-java17 The arrival of Java 17]
* [[Install JDK in MacOS]]
* [https://stackoverflow.com/questions/31851611/ ARM64 vs. AArch64]
* [https://stackoverflow.com/questions/31851611/ ARM64 vs. AArch64]
* [[Docker Compose]]
* [[Docker Compose]]
* [[HAProxy]]
* [[HAProxy]]


| valign="top" |
| valign="top" |
* [https://github.com/graalvm/mandrel/releases Mandrel: Download]
* [[Ubuntu/GraalVM]]


|-
|-

Latest revision as of 03:49, 13 March 2022

Install

sudo wget -c https://github.com/graalvm/graalvm-ce-builds/releases/download/vm-22.0.0.2/\
 graalvm-ce-java17-darwin-amd64-22.0.0.2.tar.gz -P /Library/Java/JavaVirtualMachines/

sudo tar -xvzf /Library/Java/JavaVirtualMachines/graalvm-ce-java17-darwin-amd64-22.0.0.2.tar.gz\
 -C /Library/Java/JavaVirtualMachines/

sudo rm -rf /Library/Java/JavaVirtualMachines/graalvm-ce-java17-darwin-amd64-22.0.0.2.tar.gz 
export GRAALVM_HOME=`/usr/libexec/java_home -v22.0.0.2`
export JAVA_HOME=`/usr/libexec/java_home -v22.0.0.2`
export PATH="$GRAALVM_HOME/bin:$PATH"

sudo gu install native-image
native-image --version
java -version
gu --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 & Ant

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
sudo wget -c https://archive.apache.org/dist/ant/binaries/\
apache-ant-1.10.12-bin.tar.gz -P /opt/cli/

sudo tar -xvzf /opt/cli/apache-ant-1.10.12-bin.tar.gz\
 -C /opt/cli/

export ANT_HOME=/opt/cli/apache-ant-1.10.12
sudo rm -rf /opt/cli/apache-ant-1.10.12-bin.tar.gz

mvn -v
ant -version

Knowledge

/usr/libexec/java_home -v1.7.0_80
/usr/libexec/java_home -v1.8.0_321
/usr/libexec/java_home -v22.0.0.2

ssh-keygen -f "/home/chorke/.ssh/known_hosts" -R "10.19.83.111"
ssh-keygen -f ~/.ssh/known_hosts -R 10.19.83.111
/usr/libexec/java_home -v1.8
/usr/libexec/java_home -v22

References



Getting Started: