IntelliJ IDEA "Make project automatically" woes
Solution 1
I ended up creating a Macro which does the Save and the Make Build. I then assigned the Ctrl+S shortcut to this Macro and then it works fine.
Solution 2
What if you just remap the keys from Ctrl+F9 to Ctrl+S? Basically you will just keep up with the habit of pressing Ctrl+S since you do that in Eclipse - just a matter of pressing a different key in IntelliJ.
IntelliJ IDEA 12 indeed comes with out-of-process compiler which compiles the project classes automatically, but it seems to be unpredictable - you might refresh the page and the class is not yet compiled. So in the scenario with JRebel the off-process compilation is no use, unfortunately.
Solution 3
My IntelliJ IDEA version is 2017.3.4, and I modified some values so that it compiles automatically.
Solution 4
This may not be exactly what you want but normally I leave auto-save on, and when I need to compile the current class I'm working on, I just do Ctrl + Shift + F9.
Related videos on Youtube
Marcel Overdijk
Updated on June 04, 2022Comments
-
Marcel Overdijk over 1 year
Back in December I switched from Eclipse to IntelliJ IDEA but within a couple of days I switched back. Today I tried IntelliJ again and basically I have only one issue left.
The issue is I want to compile Java classes on saving. The reason is I'm using JRebel which will pick up the new class. I don't want to hit ⌘+F9 every time to compile the changed class.
I read about the EclipseModel plugin but this does not seem to work (anymore) as can be read in the comments on the plugin's page: http://plugins.jetbrains.com/plugin/?id=3822
I also tried the "Make project automatically" but this compiles ALL classes and not only the changed class. This is only not more time consuming it will also cause JRebel to reload all classes.
Any suggestions?
-
CrazyCoder almost 11 yearsIn addition to Anton's answer check my answer explaining why automatic compilation is disabled when there is an active run configuration. See also the explanation from the developer in the forum.
-
-
Aamir Afridi over 10 yearsHow, please give details :)
-
Alex Bitek over 8 years@AamirAfridi You need to record a macro for the two actions (File -> Save All and Build -> Make Project) as explain here jetbrains.com/idea/help/recording-macros.html and then you need to assign the CTRL + S keyboard shortcut to that macro as explain here: jetbrains.com/idea/help/… (When prompted for conflict just press "Remove" button to deassign the CTRL + S shortcut from the previous action)
-
Aamir Afridi over 8 years@MnemonicFlow hahah you replied after like 2 years. Yes I figured that out. Thanks :)