Eclipse IDE – No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?

Maven compile a project in Eclipse IDE, but hits the following error messages : $ mvn clean compile [ERROR] COMPILATION ERROR : [INFO] ————————————————————- [ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK? [INFO] 1 error [INFO] ————————————————————- [INFO] ———————————————————————— [INFO] BUILD FAILURE [INFO] ———————————————————————— …

Read more

Eclipse – How to know this class belongs to which JAR

For example, I want to know this SpringBootApplication class belongs to which JAR or dependency : import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SpringBootWebApplication { public static void main(String[] args) throws Exception { SpringApplication.run(SpringBootWebApplication.class, args); } } Solution In Eclipse IDE, double clicks on the class name, press CTRL + SHIFT + T (win/*nix) or …

Read more

How to change Eclipse theme

In this tutorial, we will show you how to change the Eclipse Theme. Tools used : Eclipse 4.4 Luna, works on earlier version. Eclipse Color Theme Plugin Figure : This is how your final Eclipse IDE looks like 1. Install Eclipse Color Theme Plugin Install the theme plugin and restart Eclipse. Eclipse menu -> Help …

Read more

Where is Eclipse deploy web application – Tomcat

By default Eclipse deploys web application to a internal plugin folder called wtpwebapps, which is located in the following directory : {Your_Workspace}/.metadata/.plugins/org.eclipse.wst.server.core/tmp{number}/wtpwebapps #Example 1 – Windows C:\Users\mkyong\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps #Example 2 – Mac OSX /Users/mkyong/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps How it works In Server view, double clicks on the “Tomcat Server”, the deployment work is defined in the Server Locations To …

Read more

How to configure hot deploy in Eclipse

In this tutorial, we will show you how to configure Eclipse debugger to support hot deploy, hot swap or hot code replace without restarting the Server, this speed development a lot. Environment : Eclipse 4.4 (Supported in older version as well) Eclipse Tomcat Plugin 1. Hot deploy example Review a simple hot deploy example, code …

Read more

Eclipse – red-x icon didn’t display on project explorer

In Eclipse IDE, If a project contains errors, a small “red-x” icon will be displayed in the files that are causing the error. This useful feature is supported in Java related perspectives only, for example, “Package Explorer”. 1. Problem Personally, I prefer to use the “Project Explorer” perspective (pure folder structure), but the “red-x” icon …

Read more

Eclipse – SimpleTagSupport was not found on the Java Build Path

Here is the development environment Eclipse 4.3 Kepler Java 1.7 Spring 3.2, a MVC project using JSP view. 1. Problem Recently, Eclipse IDE is prompting following error message on top of all of the .tag file. The superclass "javax.servlet.jsp.tagext.SimpleTagSupport" was not found on the Java Build Path. See figure : P.S The SimpleTagSupport class is …

Read more

Eclipse + Tomcat – java.lang.OutOfMemoryError: Java heap space

In Eclipse IDE, run a Java web application with Tomcat server plugin, but the console prompts Exception in thread "x" java.lang.OutOfMemoryError: Java heap space 1. Solution – Increase Heap Size in Tomcat By default, Tomcat allocated a small amount of heap size. To solve it, you need to increase the Tomcat’s heap size manually. 1.1 …

Read more

Eclipse – java.lang.OutOfMemoryError: Java heap space

This article shows how to solve the java.lang.OutOfMemoryError: Java heap space in Eclipse IDE. Table of contents 1. Eclipse – OutOfMemoryError: Java heap space 2. Temporary fix – Increase the heap size 3. eclipse.ini 4. The solution, find the reason behind the heap size error. 5. References 1. Eclipse – OutOfMemoryError: Java heap space In …

Read more

Eclipse – How to attach JDK source code

This article shows you how to attach the JDK source code in Eclipse IDE. In Eclipse, select Windows -> Preferences -> Java -> Installed JREs , expands rt.jar, select “Source attachment” and find the src.zip from your disk drive. P.S JDK source code is inside the src.zip. Note You may interest at this article – …

Read more

How to add copyright to Eclipse automatically

A quick guide to show you how to add @Copyright comment to new and existing Java files in Eclipse IDE. Solution 1. Eclipse Code Templates Go to preferences -> Java -> Code Style -> Code Templates, expands Code and select “New Java Files”, edit the template to add whatever copyright messages you want. Now, that …

Read more

How to find Java class in Eclipse?

In Eclipse IDE, you can type CTRL + SHIFT + T in Windows or *nix or Command + SHIFT + T in Mac OSX to prompt an Open Type dialog box to find details about a specified Java class. For example, if you want to know the detail of this Java class – FlatFileItemWriter (Spring …

Read more

Generate getters and setters in Eclipse IDE

Still busy writing setters and getters method manually? Actually, Eclipse IDE is able to help you generate the setters and getters method automatically, and this feature is bundle with Eclipse IDE long time ago, surprisingly, many Java developers are not aware of it? See following steps to show you how. 1. Java Pojo A simple …

Read more

Eclipse IDE – Tomcat version 6.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 Web modules

Problem Import a Java web project in Eclipse, build with Maven, once create a Tomcat server instance, unable to add the Java web project, and showing Tomcat version 6.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 Web modules Tools used : Eclipse Juno 4.2 Tomcat 6.0.35 JDK 1.6 Solution In project, “.settings” …

Read more

Eclipse : “Install download1” has encountered a problem

1. Problem While installing Google plugin for Eclipse, hit following weird error messages, and caused a long download time and stopped at the end. "Install download" has encountered a problem "Install download1" has encountered a problem "Install download2" has encountered a problem "Install download3" has encountered a problem "Install download4" has encountered a problem See …

Read more

How to remove unused imports in Eclipse

Often times, after code refactor or bug fixed, Eclipse IDE will show a yellow underline for all unsed imports at the top of your class and said “The import xxx is never used“. To remove those unused imports automatically, just click on the class and press the shortcut “Ctrl + Shift + O” to initilize …

Read more

How to display line numbers in Eclipse

By default, Eclipse’s editor will not display line numbers, it’s no good for debugging. Here’s a tip to show you how to turn on the “display line numbers” feature in Eclipse. In Eclipse IDE, select “Windows” > “Preference” > “General” > “Editors” > “Text Editors” , check on the “Show line numbers” option. See result.

How to enable Subversion (SVN) in Eclipse IDE

Eclipse IDE has build-in integration with Concurrent Versions System (CVS), but not Subversion (SVN). Here’s a guide to show you how to make Eclipse IDE support Subversion (SVN) via Subclipse plugin. 1. Subclipse Plugin Visit this link : http://subclipse.tigris.org/ , click on the “Download and Install” tab. Get the “Eclipse update site URL” for Subclipse …

Read more

Eclipse : Java EE Module Dependencies is replaced by Web Deployment Assembly

In Eclipse Galileo (3.5) or Ganymede (3.4) or older version, you can control the project packaging structure via the “Java EE Module Dependencies” option, so that the project dependencies are deployed to the correct folder. However, in the latest Eclipse Helios (3.6), the “Java EE Module Dependencies” is replaced by “Web Deployment Assembly“, which provide …

Read more

Eclipse IDE : Unsupported content type in editor

Problem Using Eclipse Ganymede (3.4) , developing JSF 2.0 web application. However when open the xhtml file with the Eclipse web page editor , it prompts a dialog box and saying … Unsupported content type in editor To associate file extension with a supported content type, please see Content Types Preference Page. P.S The .xhtml …

Read more