Reza M.
Reza M.

Reputation: 1223

Intellij output too much information

Wondering if there is anyway I can clean the output of intellij when executing a java app with arguments. I require to see only the arguments and all the information before the app name have no use for me and hoping I can turn them off for now.

e.g.:

"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. I would just simply like to see the app.java arg1 arg2 ...

Upvotes: 3

Views: 3767

Answers (1)

Lukas Knuth
Lukas Knuth

Reputation: 25755

Despite that I don't think you can change this, 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("--------");
    }

}

Seems I'm right. Here is the documentation for the "Run"-View. It doesn't include any information on doing something like this.


An idea to not forget to remove this in final releases would be to add a //TODO Remove this. IntelliJ can list all ToDo's in a list and before you ship it out you just look over all todos and remove it.

Another idea would be emulating a #define from C by simply having a public static final boolean RELEASED which you set to true when you release the code. You can check for that flag and modern Java compilers will most likely optimize the output-block away.

Upvotes: 2

Related Questions