Search code examples
javagoogle-colaboratory

How to change runtime type in google colab when the change runtime type option does not show?


I would like to run java in colab.

I successfully installed ijava and reloaded the page, but the "change runtime type" option does not show.

In this case, how do I switch from Python to Java kernel? Is there a command line trick by which I could manage to do it?

This is my colab link: https://colab.research.google.com/drive/1XyVBfMJ3m23IsDVjPER7G-UZ0vd4gT2c?usp=sharing

Thank you.


Solution

  • The only way to change to ijava is to download the notebook. Open it with a text editor and edit it manually.

    So normally, you would use a pre-edited notebook. At the start, it cannot find ijava so it will use python3. After you install ijava, and reload, it will then use ijava.

    Here's a shortcut to a pre-edited ijava notebook

    https://colab.to/java