Command Line options for Intellij
Is it possible to specify command line options when starting Intellij ?
Specifically, I want to tell it which project to open with.
I have been unable to find any documentation about command line options at all.
请先登录再写评论。
Hello,
Yes, you can specify the name of the .ipr file as the command line parameter
and IntelliJ IDEA will open it.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
So I just use the path to the project, not -p <pathname> or -o <pathname> or something
Hello,
Exactly.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
This Anwer seem a litte old as it does not take projects with .idea directories into acount. But since it pops up top on Goolge:
Which command line option is used to open a Projekt stored in a .idea directory?
Hello Martin,
Simply pass the directory which contains the .idea subdirectory on the command
line.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
Are there other switch to initiate functions from the command line? in particular I would like to initiate the compilation needed to invoke a particular target.
The context here is that a batch process external to Intelli-J runs overnight to handle synchronization of the source with ClearCase and rebuilds it via ant. I then want to invoke intelli-J and have it re-parse and recompile all affected classes so all is ready at the start of my working day. Is this possible?
Thanks.
Hello Steve,
At the moment there's no way to trigger a compilation from the command line.
You can write a very simple plugin that would trigger a make of the project
when it's first opened.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
I'm running 10.5.2 Ultimate on Linux (Debian squeeze), where I had a little trouble getting this to work at first. After a few tweaks, it works fine now.
We have several projects in IDEA, and I wanted to be able to launch IDEA into the project of interest. I setup Panel app launchers that contain the following command line, which works fine:
/usr/local/bin/idea /home/acarwile/work/project1/project1.ipr
and
/usr/local/bin/idea /home/acarwile/work/project2/project2.ipr
These work fine. At first I used "~" (tilde) in place of "/home/acarwile" but this led to errors. The ~ reference was not being handled properly, causing an error when I tried to launch the other project. Apparently this is because, in the context of the first project, project2.ipr was not understood. Basically I got a "File not found" error and then the first project was loaded up.
So, avoid using ~ references on the command line to the idea program, at least with the version mentioned above.
Alan
____________
agile methodology