44

Coming from a Visual Studio background...

How do I tell Eclipse that it should auto save when ever I build rather than ask each time.

VS.NET has it under "Options", but I can't find it in Eclipse.

I use a Mac.

UmAnusorn
  • 10,420
  • 10
  • 72
  • 100
Ian Vink
  • 66,960
  • 104
  • 341
  • 555
  • 1
    None of the answers seem to work anymore (Eclipse 2019-09). Note that "save before launching" is not the same as "save before build" – Maple Mar 19 '20 at 20:29

6 Answers6

82

First, try

Window -> Preferences -> General -> Workspace. There you can check "Save automatically before build" and "Build automatically."

If that does not work,

PLEASE TRY

Preferences -> Run/Debug -> Launching -> "Save dirty editors before launching"

UmAnusorn
  • 10,420
  • 10
  • 72
  • 100
65

Go to

Window -> Preferences -> General -> Workspace

and there you can check:

Save automatically before build + Build automatically

catch23
  • 17,519
  • 42
  • 144
  • 217
Matschie
  • 1,237
  • 10
  • 9
  • 4
    ur answer saved me downloading some plugin – Tarun Jun 17 '11 at 07:02
  • 7
    this is not what OP is asking for, see answer below @um.anusorn – Scott Stensland May 31 '13 at 12:29
  • 2
    @Scott Stensland These answers are now the same for "build". "Prompt" is now the installed default under run/debug->launch. Cross developers would never think to look there as they may not ever run/debug. – mckenzm Jul 20 '19 at 14:23
18

Save automatically before build

Window > Preferences > General > Workspace > check "Save automatically before build" > OK

Window Preferences General Workspace

Save dirty editors before launching

Window > Preferences > Run/Debug > Launching > check "Always" for "Save required dirty editors before launching"

Launching

Save resources before launching

This is actually an alternative to "Save required dirty editors before launching"

Change something in the current file > Run > check "Always save resources before launching" > OK

enter image description here
enter image description here

Details:

  • IDE: Eclipse Kepler
  • O.S.: Windows
Community
  • 1
  • 1
ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
4

Preferences -> run/debug ->launching -> Save required dirty editors before launching.

Yury
  • 65
  • 1
  • 1
1

This has changed in Eclipse Luna (or maybe it's just because I'm on a mac and the answerers are on a PC).

You find it under this menu:

Eclipse -> Preferences -> General -> Workspace

From there, you check "Save automatically before build" + "Build automatically". On a Mac, Preferences isn't under the Window menu, so that confused me for a bit.

Daniel Kaplan
  • 62,768
  • 50
  • 234
  • 356
0

(Just for completeness)

After Window -> Preferences -> General -> Workspace

(x) Save automatically before build + Build automatically

You must go to:

Windows -> Save Perspective As...

And select a name according to the perspective you are using. You can overwrite the old ones...

jruiz
  • 71
  • 10