forcing Intellij to use Headless mode?

Hello I am writing an idea plugin that also overwrites the Appstarter extension in order to run as command line app. 

I want it to run in Headless mode but whatever iI do it keeps opening the gui. 

isHeadless(){
     return true;
}

and in the idea VM options file  -Djava.awt.headless=true is set.
What else do I need to do in order to force headless mode?

Please sign in to leave a comment.