ninjudd/drip

Use drip in intellij idea

kindlychung opened this issue · 4 comments

Is there a way to use drip in intellij idea? Possible usages:

  1. Run the IDE itself in drip
  2. Run main methods in drip (ctrl-shift-R)
  3. Run tests in drip

+1

This is rather easily done.

  • Modify idea.sh before the if statement checking if the jdk exists.
# DRIP
JAVA_BIN="/path/to/drip"

When this is done, idea launches using drip. However, it will not successfully launch another time, because drip launches its JVM with -Djava.awt.headless=true.

  • Find the line which is like this:
$drip_daemon $DRIP_JAVA_CMD "${jvm_args[@]}" -Djava.awt.headless=true \

and remove the -Djava.awt.headless=true so it is like this:

$drip_daemon $DRIP_JAVA_CMD "${jvm_args[@]}"  \

Idea should now launch successfully using drip.

Have fun.

Has anyone tried this on a Mac? It seems that everything specifies JAVA_HOME and not the java executable so not sure what the best approach might be.

ETA:

I ended up renaming java to java-orig in the JDK install I'm using, edited the drip script to use java-orig, then symlinked java to drip. Seems to be working so far...