-
Notifications
You must be signed in to change notification settings - Fork 17
setting up an intelliJ dev environment for ilastik4ik
Dominik Kutra edited this page Sep 8, 2020
·
5 revisions
Summary of setting up a development environment for the non-java-aware people (summarizing in-person help by @emilmelnikov) during a tiny ilastik4ij hackathon. Following this allows you to conveniently debug the plugin from within IntelliJ.
- Download and install IntelliJ IDEA
- Obtain jdk - I'm using conda to manage java versions, so
conda create -n java -c conda-forge openjdk=8 maven
- clone the ilastik4ij repo
git clone https://github.com/ilastik/ilastik4ij
- Open IDEA (if you have installed deps via conda, activate the java environment before starting IDEA from the terminal), import project, point to the
ilastik4ij
folder. - Get dependency sources and docs: Top right corner of IntelliJ houses the search anything toolbar; type in "Download", choose Download Sources And Documentation.
- Go to File -> Project Structure; Click on SDKs, make sure the JAVA 8 sdk is used (for me JDK HOME is
/home/MYUSER/miniconda3/envs/java
). Make sure this SDK is selected as project SDK and also check that Project Language Level is 8 .... - create a new file in
src/main/test/java/org/ilastik/ilastik4ij
calledDebugIJ.java
with the following contents:package org.ilastik.ilastik4ij; import net.imagej.ImageJ; public class DebugIJ { public static void main(String[] args) { ImageJ ij = new ImageJ(); ij.launch(args); ij.log().info("Hello from ilastik4ij!"); // ij.command().run(IlastikCommand.class, true); } }
- with this file open click on run to create a new run configuration. If you're successful, ImageJ should start up.