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.

9 comments
Comment actions Permalink

Hello,

Yes, you can specify the name of the .ipr file as the command line parameter
and IntelliJ IDEA will open it.

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.

---
Original message URL:
http://www.jetbrains.net/devnet/message/5249687#5249687

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

So I just use the path to the project, not -p <pathname> or -o <pathname> or something

0
Comment actions Permalink

Hello,

So I just use the path to the project, not -p <pathname> or -o
<pathname> or something


Exactly.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

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?

0
Comment actions Permalink

Hello Martin,

Simply pass the directory which contains the .idea subdirectory on the command
line.

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?


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

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.

0
Comment actions Permalink

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.

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?


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

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

0
Comment actions Permalink
  1. Do one of the following:             
    • On the Welcome screen, click Open Project link.                 Alternatively, locate the desired project in your file  chooser, and then drag and drop it onto the Welcome screen.
    • On the main menu, choose File | Open Project.
  2. In the Open Project dialog box, navigate to the desired *.ipr,                 .classpath, .project, or pom.xml,                 file or to the folder marked with the intellij icon, that contains project .idea directory.
  3. Specify whether you want to open the project in a new frame, or close the current                 project and reuse the existing frame. Refer to the section Opening Multiple Projects for details.



____________
agile methodology

0

Please sign in to leave a comment.