Development environment Eclipse 2024-03: Refactoring function Make Static for Java

Eclipse, the open source IDE for Java, C/C++ and other programming languages, has been released in version 2024-03. In addition to minor improvements and bug fixes, there is the new Make Static refactoring function and the new option for annotation-based resource leak analysis for Java development. What is also new is that when Windows Defender is active, a dialog appears when you start it for the first time that offers to exclude Eclipse from the scan, which significantly speeds up starting and running Eclipse at the expense of security.

Advertisement

New to the Java IDE is the Make Static refactoring function for methods. It is in the Refactor main menu, in the right-click menu of the same name or via the keyboard shortcut Alt+Shift+K available. Make Static can also convert methods that access instance variables or methods to static. To do this, the function adds an additional parameter for the instance.

Another innovation in the Java IDE is the so-called annotation-based resource leak analysis, which ensures that a resource, such as a FileInputStream, will be closed even if the resource is used in a method other than the one it was created. The principle is similar to annotation-based null analysis: With the help of annotations, specifications are made, compliance with which can be easily checked for each individual method by humans and the Java compiler, without having to analyze the cross-method program flow, which can be arbitrarily complex. In order to transfer the responsibility for closing another method, the parameter of the resource must be included in the called method @Owning be annotated. One with the Eclipse JDT annotation @Owning Annotated method, on the other hand, returns a resource that the caller is responsible for closing.

Windows Defender significantly slows down launching and running Java applications on Windows, not just Eclipse. Microsoft has been aware of the problem for years, but has not yet fixed it. After installation, Eclipse will now check whether Windows Defender is active when you start it for the first time. If this is the case, a dialog will appear asking whether Eclipse should be excluded from Windows Defender scanning for speed reasons and pointing out the associated security risks.

Ten expandable basic packages of the Eclipse development environment are offered for Windows, Linux and macOS for different purposes. All packages contain everything you need to run Eclipse and develop: Java and Git, as well as Maven and Gradle in the Java IDE packages. The Eclipse IDE packages can be accessed via the Eclipse Installer installed or downloaded as ZIP files become. An existing Eclipse IDE can be used via Help | Check for updates be updated.

Further information and the What’s new in the Eclipse projects involved in this release is available on the Eclipse IDE website.


(map)

To home page

source site