Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Tuesday, May 26, 2020

Switching Java Versions

Believe it or not, I was unfamiliar with this way of switching Java versions:

$ export JAVA_HOME="$(/usr/libexec/java_home --version 1.8.0_251)"

Hope this helps somebody!

(because I know that someday that somebody will be me!!)

Friday, March 04, 2011

Java switches

Why can I never remember this?

$ javac -d ./classes ...

$ java -cp ./classes ...

I.e. I can never remember which one gets the -d and which gets the -cp. I need to make up a little song or something.