How to change behaviuor of the Run action ?

Hi!

By pressing the "Run" toolbutton IDEA excutes something like "java.exe ... MyApp".

What should I do if I want to run code on a remote machine (closer to the data the program will work with) ?

How to change the action to something like "rsync.exe .... && ssh.exe ... /usr/bin/java ...<remote dbg keys>... MyApp" ?

Thank you.

3 comments

There's no run configuration type in IDEA that would allow you to enter completely custom command line. There are possibilities to launch whatever using Settings | External Tools or using Command Line Tools Plugin, but it's easier to have a bat file that you launch manually and connect to IDEA debugger using Remote run configuration.

0

Hi Alexander!

Is there a single click way to build the project and then run the .bat file ?

Build an IDEA, wait the biuld to finish, then switch to command line window, type name of bat file, exec it...
It is too long sequence to repeat it manually many times.
That does not include the remote debugging which would add switching back to IDEA and start remote debug sessing.

Any suggestion how to authomate it ?

Thank You.

0

You could write an Ant script. Select the option in IDEA to Make before launch, than have the Ant script either do the desired functionality (via common or custom tasks) or simply have it call the command line items you want.

0

Please sign in to leave a comment.