Intellij displays too much information

Surprisingly, anyway I can clear the intellij output when executing a Java application with arguments. I only need to see the arguments and all the information before the application name is used for me and hopefully I can disable them now.

eg:.

"C:\Program Files\Java\jdk1.7.0_11\bin\java" -Didea.launcher.port=7538 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.0\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.7.0_11\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.7.0_11\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.7.0_11\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.7.0_11\jre\lib\jce.jar;C:\Program Files\Java\jdk1.7.0_11\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.7.0_11\jre\lib\jfxrt.jar;C:\Program Files\Java\jdk1.7.0_11\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.7.0_11\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.7.0_11\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.7.0_11\jre\lib\resources.jar;C:\Program Files\Java\jdk1.7.0_11\jre\lib\rt.jar;C:\Program Files\Java\jdk1.7.0_11\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.7.0_11\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.7.0_11\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.7.0_11\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.7.0_11\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.7.0_11\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.7.0_11\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.7.0_11\jre\lib\ext\zipfs.jar;C:\Users\asd\IdeaProjects\Assignment1\out\production\Assignment1;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.0\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain Problem2 25 -5 10 5frf

      

As you can see, the arguments are the last 4 words in this one. I just would like to see app.java arg1 arg2 ...

+3


source to share


1 answer


Even though I don't think you can change that, what about this simple Java solution:

class Something{

    public static void main(String[] args){
        for (String arg : args){
            System.out.println(arg);
        }
        System.out.println("--------");
    }

}

      

I seem to be right. Here is the documentation for the "Run" -View . It does not contain any information on how to do this.




The idea to remember to remove this in final releases is to add it //TODO Remove this

. IntelliJ can list all the ToDo's in the list, and before submitting it, you simply go through all the todo and delete it.

Another idea is to emulate #define

from C by just having public static final boolean RELEASED

which you have installed in true

when you release the code. You can check this flag and modern Java compilers will most likely optimize the output block.

+2


source







All Articles