Preview command line that is genereated by Intellij
Answered
Is there any way to preview the command line that intellij will generate and run when you add a run configuration for Java?
I'm running into issues where my command line is too long for windows to handle, but even after relocating and renaming a buch of files it still is too long. I would like to check the exact command line generated so I can find out the exact issues.
I have tried the built-in command line shortening, but this gives other issues in the project I'm working with.
Please sign in to leave a comment.
If it is not a Gradle task - you see the full command in the very first line of Run(Debug) tool window when you launch the run configuration. What exact error do you see? What Shorten command line method do you use?
See description of Shorten command line option for the application run configuration in the docs.
When the command line is too long, Intellij doesn't show the run window, so I can't check. I've tried all methods of command line shortening, but none of them works for my project.
Hello Sebastian,
Please clarify how do you run the configuration? What output is shown after the run? Please share the screenshot if possible.
Hi,
I'm also having the same problem. Here's my Run Configuration:
This is what happens when I try to Run or Debug:
I would also like to be able to view the command that IntelliJ is trying to invoke, so that I can determine exactly how long the command line is.
>I would also like to be able to view the command that IntelliJ is trying to invoke, so that I can determine exactly how long the command line is.
@Michael Smith could you please clarify how would it be helpful for you? How would you use this information? It seems that the Shorten command line option must just simply solve this problem altogether.
Have you tried different means of Shorten command line option? Doesn't it work for you?
If it does not work, it might be this issue: https://youtrack.jetbrains.com/issue/KTIJ-17492 Then please try adding
into Help | Edit Custom VM Options and restart IDE.
Hi Andrey,
Since none of the options for shortening the command line are working for me, I thought it would be beneficial to see the actual command line just to confirm that IntelliJ is actually shortening the command line as specified in the options.
The only two options I have for Shorten command line are JAR Manifest, and @argfile (Java 9+). Neither of those options work.
I tried adding the property into the Custom VM Options and restarting IntelliJ, and that has fixed the problem, thank you. :) Can you explain what that flag does, and why it would work when the normal options don't work?
This flag is actually used for informing the IDE runner that command line shortening must be used. Looks like it just does not work for Kotlin automatically at the moment due to the bug mentioned.