Compile on save not working on NetBeans 14, 15 - netbeans

I have checked a lot of messages and the different solutions where people get issues on Netbeans that is not compiling on save.
I was previously working with Netbeans 12 and this was working fine : compile was done on save.
But recently I have updated to Netbeans 14 and now 15 and compile on save is not working anymore. I cannot pinpoint where is the issue and how to solve it.
For the moment I have set :
1 - In Netbeans "Options" : Tab Java -> Java Debugger : I activated "Apply code changes after save (in "Compile on Save" mode only)
2 - In project properties : Build -> Compiling : I deactivated "Compile on Save"
Then when a modification is made and when I save I see in front of the file I have modified a small wrench and then I have to hit F9 to manually compile and then the wrench is gone.
I have tried all combinaisons of those 2 options but only this one is close to the old "Compile on save".
Am I the only one with that issue ?

Ok. So your method worked but with a slight difference, i did NOT deactivate "Compile on Save" - Everything works fine now.

Related

Eclipse - An internal error occurred during: "Compute launch button tooltip"

I launched Eclipse earlier to jot down a snippet and was faced with the following as an error when I tried to run a fresh project:
An internal error occurred during: "Compute launch button tooltip".
That popup window shows as soon as I mouse-over the run icon in the top bar, or if I right click on the class in the explorer window and select any of the run/debug options.
After doing some research on the error, I see several people who posted similar messages but they all have been fresh installs of Eclipse. So note that this is not a fresh install, and that Eclipse was working fine earlier today. Also note that not only does my new project not run (with the normal main method), but projects I was running earlier have all stopped working with the same error.
Finally, also be aware that after seeing other people's suggestions on fixing this, one specifically said to select run configurations from the top of the page run menu. When I selected run configurations from this dropdown, I got the following message:
Exception occurred creating launch configuration tabs
Reason: Plug-in org.eclipse.jdt.debug.ui was unable to load class org.eclipse.jdt.internal.debug.ui.launcher.LocalJavaApplicationTabGroup
After that message, the run window opens but all of the tabs are missing. Like where you can set the display width and height, and the other tabs, they are all missing from the window now.
I was using Eclipse trouble free earlier today and I am sure no updates took place between when Eclipse was working and now. My question is of multiple parts: What is wrong in a nutshell? What could have caused this?
Got this from another site of some guy who got this same error after upgrading.
Worked for me as well.
Apparently putting the following line in your eclipse.ini helps:
-Dcom.ibm.icu.util.TimeZone.DefaultTimeZoneType=ICU
Try setting the launch properties in:
Window>Preferences>Run/Debug(Expand)>Launching(Click)
Under launch Operations menu set it to:
Always launch the previously launched application
Click:
Apply>Ok
I never found out what went wrong, but a reinstall of eclipse fixed it. All projects survived seemingly undamaged.
Thanks for the reply on the .ini but that did no good.
I had same error today - in an eclipse installation (Juno SR2 64bit) that has been running fine for months.
0: There were no changes on svn for my projects since yesterday (when it was running fine).
1: I restored the workspace from a 'Windows 7 -> Properties -> previous copy' backup. This failed because the directory structure of the '.metadata' contains folders with a deeper structure than is supported.
2: I restored the workspace from a overnight archive (gzipped so file depth is not an issue).
This had no effect.
3: I tried to restore the eclipse installation directory (which seems to be updated an awful lot) from a 'Windows 7 -> Properties -> previous copy' backup. Again this failed - because of folder-depth issues (Note: it is installed in the root directory of my disk - so there is actually no way to use a restore on this installation!)
4: Had to delete the .metadata from my workspace and reinstall eclipse (and all the additional plugins), and re-import my projects, and setup all the servers, and android, etc, which took many hours.
The moral of the story? Backup both your workspace AND the eclipse installation every night manually. Windows Restore will NOT save you. Backing up your workspace is NOT enough.
I had the same problem using eclipse mars. I cleared the folder .recommenders\index
And that solved my issue.
Hope it helps.
incase you are having the eclipse files which you have downloaded from the official site .Just extract those file in the same folder where your previous eclipse was installed and select replace all.
best solution
I also encountered this issue, the reason why this issue occurred on my project was due to I was missing the JRE System Library in the root folder of my project.
To solve this issue, make sure you have the libraries like JRE System Libraries on the root folder of your project.

Zend Debugger Eclipse Startup Error: eclipse.php.debug.core was unable to load class debug.core.model.PHPConditionalBreakpoint

I work on Mac OSX Lion and ever since I've installed the Zend Debugger and gotten it to be able to debug php web applications, I often encounter this Eclipse startup error:
Error creation extension for extension-point
org.eclipse.php.internal.debug.daemon.communication Plug-in
org.eclipse.php.debug.core was unable to load class
org.eclipse.php.internal.debug.core.zend.communication.DebuggerCommunicationDaemon.
An error occurred while automatically activating bundle
org.eclipse.php.debug.core (258).
The error log contains the following stack trace:
org.eclipse.debug.core.DebugException: Plug-in org.eclipse.php.debug.core was unable to load class org.eclipse.php.internal.debug.core.model.PHPConditionalBreakpoint.
at org.eclipse.debug.internal.core.BreakpointManager.createBreakpoint(BreakpointManager.java:554
at org.eclipse.debug.internal.core.BreakpointManager.loadBreakpoints(BreakpointManager.java:264
at org.eclipse.debug.internal.core.BreakpointManager.initializeBreakpoints(BreakpointManager.java:449)
at org.eclipse.debug.internal.core.BreakpointManager.getBreakpoints0(BreakpointManager.java:418) at org.eclipse.debug.internal.core.BreakpointManager.start(BreakpointManager.java:408)
at org.eclipse.debug.core.DebugPlugin.start(DebugPlugin.java:682)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
... Omitted for brevity ...
This error often goes away when I just restart eclipse a few times. I've googled for solutions and tried reinstalling eclipse a couple of times. This error only seems to occur if I have both ADT (Android Development Tools) and PDT (PHP Development Tools) + Zend Debugger installed.
Please let me know if you have information about how to solve this problem. On a related note, I never really got the PDT + Zend debugger to work (as in debug) PHP apps on Windows.
I have seen this error a few times, even in the Zend Eclipse PHP version. It only seems to happen when two things are true:
1) The "breakpoints" view is visible on eclipse start (that is, you can see where breakpoints would be listed)
and
2) The file open and active in the editor is NOT a PHP file
For example, I got this repeatably with a CSS file open in the editor on the debug perspective with the breakpoints tab active.
To get around it: Start eclipse and ignore the bug about loading the plugin (for now). Make a PHP file the active document in the editor, and change from the debug perspective to the PHP perspective. Close eclipse and restart. On restart, the error should be gone and debugging should be active again.
I can't guarantee this is the solution everytime, but I can reliably replicate this failure (and solution) with the breakpoint/non-PHP conditions described above.
I had a similar issue (yours came up top of Google when I pasted my error message) after a few similar and different errors I decided to check my Eclipse workspace settings after an alternative workspace of mine worked and debugged fine.
It turns out my PHP executable pathway was empty (after having previously set it), so I added it back in. No problems so far.
(i.e. here...) Eclipse -> Window -> Preferences -> PHP -> PHP Executables -> Add/replace/reselect here.
UPDATE:
sometimes the simplest thing is to select 'Skip all breakpoints' under the 'Breakpoints' view (which opens in debug perspective). Then restart Eclipse. I have had similar error messages since first answering and that usually does the job (of course you can deselect 'Skip all breakpoints' after that from the same place.
This is a workaround instead of a solution, but so far, it's going good:
I downloaded and installed Eclipse for PHP Developers(aka Zend Eclipse PDT) version 3.0.2 from Zend website and I'm now able to debug Wordpress and Joomla, both pretty complicated projects as far as PHP goes.
I will update if I experience a problem.
I am using Eclipse Indigo on Ubuntu 12.04 and I received this error after installing Java 7. My PDT settings which used to work stop working. My solution was to uninstall PDT and reinstall it. I am not sure if this is relevant to your question but it might solve the issue.
Help -> About eclipse platform
click "Installation details" button
click php development tools (PDT) sdk feature
click uninstall
follow prompts
reinstall pdt in the normal way
My previous debug launches were deleted but my old project was left untouched. I re-ran a debug from Run -> Debug Configurations.
I've only ever gotten this after closing down an Eclipse php project that I've enabled various breakpoints in.
My workaround is once the project opens and I get the error message I select skip all breakpoints, close the project and re-open it. I then deselect the skip breakpoints and start working. The error, at least in my case happens randomly and for no other reason than I closed the project with breakpoints enabled.
Wish I had a more technical solution or fix but I decided my time was better spent working on actual work than chasing this deeper.
The problem happened when I closed Eclipse while a project was still running in debug mode.
I did more or less the same as #rahvin_t to fix it.
Run > Skip all breakpoint. Close Eclipse, start eclipse and I could start the project again.
there are a few errors that happen on start-up similar to this one. They seem to occur when there are 'unusual' files open in the editor (e.g. css or javascript)
What usually works for me:
Close all your files in Eclipse (Ctrl+Shift+W)
Restart Eclipse.

Eclipse - Galileo IDE force save of changed files before build?

When I used previous versions of Eclipse (e.g. Ganymede/Europa) if I had edited a file and then attempted a build Eclipse would prompt me to save first.
Since I updated to Galileo (Build id: 20090920-1017 & just checked for updates) when I build I'm not prompted to save first. Perhaps the dialog had a checkbox for "don't tell me again" which I mistakenly checked on???
I figure it is just a preference setting some where but I can't seem to find it, search in Preferences for 'save' and for 'build' but did not find it. I tried "Save automatically before build" but that actually did not work for me, and isn't really what I was looking for anyways.
Any ideas?
thanks.
Edit: I'm actually using an Ant script to 'build' (right click on script and Run As...Ant Build). So perhaps my original wording was a bit off base since I did not state how I was building.
It's under Window -> Preferences -> General -> Workspace -> Save automatically before build. This works for me if I'm doing an Eclipse build (Project -> Build All). Is that how you're building?
As mention in this thread, the only other options (other than the "Save automatically before build") which actually prompt for the user for file saving are:
> Run/Debug > Launching > Save required dirty editors before launching
> Run/Debug > Launching > [x] Build (if required) before launching
Answer of VonC looks great, but does not work as it seems (Eclipse 3.5.1.R35x_v20090910 on WinXP-Pro-32). However Eclipse and I seem to think differently about what is a "required dirty editor" :-( --
Would be nice if it would be possible to define a scope of resources to check for dirtyness for every single launch configuration -- with "containing project & refernced projects" as the default setting.
But it looks like 3.5.2 fixes this problem.

How do I enable undo in eclipse ant editor?

Undo is not working for me in ant editor in eclipse.
When I press Ctrl-Z nothing happens.
Is it possible to enable undo somehow or is this a bug?
I am using Eclipse 3.4.2 (Ganymede) on Windows XP Professional.
Yes undo should be working perfectly in an ant editor.
For Ctrl-Z to not workcould mean:
the shortcut has been assigned to another action (Windows > Preferences > General > Keys)
the undo buffer size is somehow at '0' (Windows > Preferences > General > Editors > Text Editor)
a plugin somehow 'steals' the key event for itself
Try a fresh install, and check also with a latest Galileo (3.5RC2) install to see if the problem persist.
Note: zvikico mentions the existence of a known bug with ant editor in 3.4.2
After a quick search, the following bugs might explain your situation:
267780 [ant editor] delete line cannot be undone after cursor has been moved
247434 Failed to undo removal of line in Ant editor, only with 'Eclipse IDE for Java Developers', with Eclipse Classic you don't get this behavior
and finally:
239115 Undo functionality does not work anymore in the ant editor, mainly because a WTP issue, only solved in 3.5
I see this post is very old, but I am adding a response for the people who find this through the search engines.
Ctrl-Z stopped working in eclipse for me when I made a small change in one part of my code which in turn triggered an unexpected infinite loop in a different part of my code.
I used the windows task manager to kill the application that I had been testing when Ctrl-Z had stopped working, and then I used system.out.println() to identify the part of the code where the infinite loop was being triggered.
I then disabled that section of code, which in turn caused Ctrl-Z and everything else to start working again.
I was able to finish debugging from there.
If the CTRL-Z (undo) does not work anymore, you might try that. It worked for me:
go to Preferences -> General -> Keys and click on apply button or restore defaults button

In Eclipse, why does "Build Automatically" get mysteriously disabled?

I'm running Eclipse Europa (3.3). I leave the "Build Automatically" setting, under the Project menu, on all the time. Once in awhile my code isn't compiling, and I puzzle over it and then pull down the Project menu ... lo and behold, it's not set anymore. What gives? Is this a bug, or is there something else I'm doing that could cause it?
Edit: I am running the regular Java developer installation, plus Subversive and its connectors, Jetty Launcher, and I believe no other plugins. Other people at my workplace have had the same problem.
Edit: I am still having this problem once in a blue moon, only now I'm using Eclipse Galileo (3.5) for Windows. I haven't had this problem in Galileo for OS X, neither in Cocoa nor Carbon, but I have not used that for as long.
With Eclipise Mars.1 (4.5.1), Oomph may be the culprit. Eclipse Oomph supports automatically disabling Build Automatically with entries in
On Windows
%USERPROFILE%\.eclipse\org.eclipse.oomph.setup\setups\user.setup
If you want to disable this Oomph behavior try deleting the following setting
"Eclipse->Navigate Menu-> Open Setup menu entry-> Open User menu entry", a Preference Task under "User Preferences -> org.eclipse.core.resources -> description.autobuilding"
I learned about this setting by posting to the Oomph Eclipse Community Forum on Feb 8th, 2016. I posted a question titled "Oomph Defect? Build Automatically Keeps Getting Disabled". Ed Marks replied the same day with details about Oomph's support for managing the Eclipse "Build Automatically" setting.
https://www.eclipse.org/forums/index.php/m/1722751/#msg_1722751
I don't have eclipse right here to test and make sure but here is an idea.
Is any of the project or even workspace file in SVN ? if they are and they were uploaded with auto build disabled that might explain it
You update and overwrite your settings. This doesn't become apparent until you restart eclipse. this would also explain why other people at your workplace experienc this. it would even explain why some don't : thay are the ones who are careful what they update and don't allow eclipse to overwrite their own settings plus the ones who actually prefer to have autobuild disabled :)
I had the same problem and when I looked at the Source tab under Java Build Path (under the menu Project > Properties ) there were some source directories that didn't exist anymore (marked with a red X). After I deleted them, compilation worked fine and all new .class files are under the bin folder.
Strange. Is there perhaps a plugin installed that turns this off without your knowledge?
Maybe there is some conflicting shortcut. For example, some duplicated shortcut may be toggling it.
I am running 3.4 and I also have this mysterious behavior. I had it in 3.3 as well. I use CVS not SVN. Does not seem to follow a pattern just once in a while it gets switched off and then weird confusing stuff happens until I remember to check it and switch it back on. I am almost to the point where I want to write a plugin to always turn it on when eclipse loads.
When installing Google Plugin for Eclipse, 'Google App Engine for Android' is also installed.
For me, I uninstalled 'Google App Engine for Android', which I didn't need, and solved this problem.