Ben Chuanlong Du's Blog

It is never too late to learn.

A JNI Error Has Occured

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

Error Messages

Error: A JNI error has occurred, please check your installation and try again

Caused by: java.lang.ClassNotFoundException: org.apache.spark.sql.SparkSession

Cause

Some dependencies (Spark in this …

Use Kotlin in a Scala Project

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

  1. Methods of a Kotlin object can be called in a Scala project by KotlinObject.INSTANCE.methodToCall()

  2. You might need to provide the Kotlin standard library kotlin-stdlib.jar in order to run …

Ways to To Run a Kotlin JAR

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

If you generate a uber JAR, then you can directly using the java command to run the JAR file without specifying additional Kotlin runtime/stdlib JAR.

https://stackoverflow.com/questions/9355690 …

Using Kotlin With Gradle

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

https://kotlinlang.org/docs/reference/using-gradle.html

https://github.com/Kotlin/kotlin-examples/tree/master/gradle/hello-world

User in Docker

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

User switching in Docker

  1. USER some_user in Dockerfile, some_user has to exists
  2. su in Dockerfile or shell scripts
  3. docker run --user some_user

@pedrolucasoliva i am docker specialist i give you a …

Kotlin vs Scala

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

https://www.quora.com/Is-Kotlin-so-similar-to-Scala-What-are-the-differences/answer/Bruce-Richardson-4