Ben Chuanlong Du's Blog

It is never too late to learn.

The JAVA_HOME Environment Variable

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Point to the JDK directory if you can. Otherwise, point it to the JRE directory.

References

https://docs.oracle.com/cd/E19182-01/820-7851/inst_cli_jdk_javahome_t/

https://www.quora.com/What-is-the-use-of-JAVA_HOME

Debug Code in JupyterLab Notebooks

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Use the %debug Magic

The easiest way to debug a Jupyter notebook is to use the %debug magic command. Whenever you encounter an error or exception, just open a new notebook …

Calling Rust from Java

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

https://github.com/drrb/java-rust-example

https://users.rust-lang.org/t/ffi-java-call-a-rust-dynamic-library/19924

https://docs.rs/jni/0.14.0/jni/

https://stackoverflow.com/questions/30258427/calling-rust-from-java

https://github.com/java-native-access/jna …

Install Kotlin

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Ubuntu

Unfortunately, there is no apt-get installation (even no Ubuntu PPA) for Kotlin at this time. There are basically 3 options to install Kotlin on Ubuntu.

  1. Install manually.
  2. Use snap app …

Gradle Kotlin DSL

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

AVOID using the Kotlin DSL for Gradle! The Kotlin DSL for Gradle is not mature and lack of documentation at this time. Stick with Groovy DSL for Gradle.

shadowJar

https://github …