Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Quickly Create a Scala Project Using Gradle in Intellij IDEA

Easy Way

  1. Create a directory (e.g., demo_proj) for your project.

  2. Run gradle init --type scala-library in terminal in the above directory.

  3. Import the directory as a Gradle project in IntelliJ IDEA. Alternatively, you can add apply plugin: 'idea' into build.gradle and then run the command ./gradlew openIdea to …

Call Java Using PyJNIus from Python

PyJNIus is a simple-to-use Java interface for Python. However, JPype is a better alternative.

Installation

pip install Cython
pip install pyjnius

Example with Imported Jar

import os
os.environ["CLASSPATH"] = "/path/to/your.jar"
from jnius import autoclass
YourClass = autoclass(path.to.YourClass)
yourObj = YourClass()

Note: Avoid using the same …