Posts

Showing posts with the label Eclipse

How To Resolve "Java compiler level does not match the version of the installed Java project facet." Issue in Eclipse, STS tool or Eclipse Based Tools

Image
                  I have faced this issue during the Java 7 upgrade from Java 6 into one of our application. You will face this issue suppose if your application or project built on lower versions of Java (in my case it is Java 1.6) and you are trying to upgrade it to the Higher versions of Java (in My case it is Java 1.7), then Eclipse will throw this error in the tool. You will face this error even after changing the compiler version from build path. To fix this issue Follow the Below Mentioned Steps. 1.  Open the ' Markers ' Tab at the bottom of the eclipse or STS tool beside the ' Properties ' Tab. (as shown in the below figure) 2. Right Click on the Error as mentioned in the below figure. in The context menu click on the ' Quick Fix ' item as shown below in the figure. 3. Select the correct Java Project Facet from the ' Quick Fix ' Window. and click on the ' Finish ' Button. 4.  After Clicking on '

How To Increase PermGenSpace Of Eclipse ?

If you see  java.lang.OutOfMemoryError: PermGen space  errors, you need to increase the permanent generation space available to Eclipse. PermGen is the permanent generation of objects in the VM (Class names, internalized strings, objects that will never get garbage-collected). An easy, if somewhat memory-hungry fix is to enlarge the maximum space for these objects by adding, “-XX:MaxPermSize=128M” as an argument to the JVM when starting Eclipse. The recommended way to do this is via your  eclipse.ini  file . Alternatively, you can invoke the Eclipse executable with command-line arguments directly, as in “eclipse [normal arguments] -vmargs -XX:PermSize=64M -XX:MaxPermSize=128M [more VM args]” Note: The arguments after  -vmargs  are directly passed to the VM. Run  java -X  for the list of options your VM accepts. Options starting with  -X  are implementation-specific and may not be applicable to all JVMs (although they do work with the Sun/Oracle JVMs). Eclipse

Useful Java Debugging Tips with Eclipse

Image
In this tutorial we will see about debugging java applications using Eclipse. Debugging helps us to identify and fix defects in the application. We will focus on run-time issues and not compile time errors. There are command line debuggers like gdb available. In this tutorial we will focus on GUI based debugger and we take our favorite IDE Eclipse to run through the tutorial. Though we say Eclipse, the points are mostly generic and is suitable for debugging using most of the IDEs like NetBeans too. Do not use  System.out.println  as a tool to debug. Enable detailed log level of all the components involved. Use a log analyzer to read logs. 1. Conditional Breakpoint Hope we know how to add a breakpoint. If not, just click on the left pane (just before the line number) and a breakpoint will be created. In debug perspective, ‘Breakpoints’ view will list the breakpoint created. We can add a boolean condition to it. That is, the breakpoint will be activated an