How to open a project from the command line

I want to be able open a specific project by default when I click on an icon in Windows. I can not find a command line parameter that I can pass to idea.exe to tell it which project file to open...

Can anyone tell me if they have had success doing this (I am sure it is something simple that I am missing ... but 20 mins of google searching with no luck is about my limits) :)

2 comments
Comment actions Permalink

From trying a number of ideas (no pun intended), I finally stumbled upon this solution...

1. I added the project name I wanted to open on the command line (idea project.jpr)
2. I turned off "Reopen last project on startup" (Settings -> General -> General Options)

This seems to work properly.

0
Comment actions Permalink

People who use .idea folder, instead of a .jpr project file, can do:

"C:\Program Files\JetBrains\WebStorm 2018.1\bin\webstorm.exe" "C:\projects\my-project"

No need to turn off the "Reopen last project on startup".  At least it works for me.

1

Please sign in to leave a comment.