The original Netbeans Kotlin plugin is no longer actively developed. See JetBrains#122 for more information.
I tried to install the above on Netbeans 12.2 (running on Java 11) but it exited with a NullpointerException. I tried to build it but had to learn that it needs some dependencies I could not find.
Luckily I found a fork of the above by the Github user mario-s - Thank you!. He has solved the build problem but the NullpointerException remained.
I forked his work again to get it working.
I removed the a existing branches except master. Further I added
- fix_nullpointer: Fix the NullpointerException but do not update dependencies.
The build works only on Java 8 due to dependencies to sun.misc.Unsafe. I prefer to
-
Download a JDK of version 8.x at https://adoptopenjdk.net/ as archive file and unpack it
-
Set JAVA_HOME to the path of the JDK
export JAVA_HOME=/the/path/to/the/jdk
-
Build with /path/to/maven/bin/mvn clean package
-
I got an error when I run /path/to/maven/bin/mvn clean test
The plugin could be installed via NetBeans Update Center.
- Download the latest release: 0.2.0.1
- Launch NetBeans IDE
- Choose Tools and then Plugins from the main menu
- Switch to Downloaded tab
- On the Downloaded tab click Add Plugins... button
- In the file chooser, navigate to the folder with downloaded plugin. Select the NBM file and click OK. The plugin will show up in the list of plugins to be installed.
- Click Install button in the Plugins dialog
- Complete the installation wizard by clicking Next, agreeing to the license terms and clicking Install button.
- Syntax highlighting
- Semantics highlighting
- Diagnostics
- Code completion
- Navigation in Source Code
- Quick fixes
- Intentions and Inspections
- Occurrences finder
- Code folding
- Unit testing support
- Ant, Maven and Gradle support
- Navigation by Kotlin class name
- Debugging support