Wednesday, January 18, 2012

The specified JRE installation does not exist

This error occurs when the jre specified in the ant run time configuration does not exist on the system. When we try to run the ant build file, it throws the following error.


Opening the details of the error shows that the ant build failed due to a coonflicted version of the jre.



In order to remove this error, you need to right click on the ant file. In the Run As you need to click on Open External Tools Dialog as shown in figure.



In the dialog box, under the Ant Build, select the ant build file you need to set the JRE for. Open the tab named JRE, probably at the extreme right of the dialog box. And select the JRE which you are using for development.






How to change server location in Eclipse



The radio buttons for changing location in server configuration file seem disabled. I loved myEclipse over Eclipse only due to this problem in Eclipse. The problem arises when we add or publish a project to a server in Eclipse. The screenshot of disabled location buttons is given as



There are three solutions to this problem.
  1. Server created but no projects published.
  2. Server Created and projects published into it.
    1. Change location in server properties
    2. Change location after removing projects.

  1. Server created but no projects published.
When a server is created and projects are added into it, DO NOT PUBLISH any projects into the server and you will be able to change the server location with the radio buttons.
  1. Server Created and projects published into it.
When a server is created and projects are added into it and we publish projects into the server, the location button in server configuration file go disabled. In these cases, in order to change the location, we must follow either of the following two methods
    1. Change location in server properties
Right click on the server, go to properties, go to general, you will see a change location button as seen in the screenshot.

 Press it and you will see a changed location left to it. You can either apply the changes directly from here or press the Cancel button and go to the server configuration file where you will see the enabled location radio buttons now.  
    1. Change location after removing projects.
Right click on server, click on Add and Remove…, remove all the projects. Then right click on the server and click Clean….
    
 




Now you will be able to see the enabled location changing buttons in the server configuration file.