specified JRE installation does not exist - java

I'm trying to launch a server on my tomcat 7 on my eclipse indigo EE
and I get the following error:
"'starting Tomcat v7.0 server at localhost' has encountered a problem.
The specified JRE installation does not exist"
I checked the build path configuration and on the libraries section I have the
JDK7 as JRE System Libraray and when I check "Installed JREs..." the correct
path is there - "C:\Program Files\Java\jdk1.7.0_01".
What else can be done? Many thanks.
p.s. - I'm also using maven 3.0.3

Double click on the server to bring up the Overview.
Click on Runtime Environment.
Select the JRE from the dropdown list. You may need to set this up by clicking on Installed JREs and clicking Add.

If the instructions above did not help you can do the following:
1- from the run menu choose "Run configurations..."
2- Choose your maven run profile and then click on the "JRE" tab.
3- Select "Alternate JRE" and from the drop down select "jdk1.7xxx" (or whatever jdk you want to use"
you can also select the workspace default jre.
I was facing the same problem and this helped.

Go to the build file.
Right click on it.
Do the following as per the screenshots

Window-->Prefenerces-->Server-->Runtime Environment; like this....
Edit your Apache,and select your jdk dir....

Go to Properties → Java Build Path → Libraries.
Here you will see a red cross on the library whose path is not correct.
Select this library, click the Edit button, and change it to the correct path.

Here is a solution with pictures
http://javahonk.com/specified-jre-installation-does-not-exist/

It worked after running "mvn install clean -P prepare"

For Eclipse MARS, for maven projects.
After you install the new JRE as explained (for instance here: http://javahonk.com/specified-jre-installation-does-not-exist/), don't use your old configuration, BUT create a new configuration.

Updated the Java , JRE. so I have faced this same issue, I have tried all this but i continued with this issue. then after that, i have removed the server from application and then added new server and with that i have mentioned new JRE version now its working fine.

Open eclipse and find the server tab and try to open it.
There click on Runtime Environment
Select the JRE from the dropdown list to set this up by clicking Installed JREs and Add.

If you use Maven, try:
EclipseMavenJRE_1
EclipseMavenJRE_2

Window-->Prefenerces-->Server-->Runtime Environment;
like this....
enter image description here
Edit your Apache,and select your jdk dir....

It worked after updating Server Runtime environment JRE .

At my case, I've changed the JRE installed at Eclipse and still the messages came out.
So,
1 - Right click at the JBoss Server > Open Lauch Configuration
2 - Select tab Classpath and click "Restore Default Entries"
3 - Close the window and Right click again the Jboss Server
4 - Select Properties > General
5 - Click two times 'Switch Location' (it returns to [workspace
metadata])
6 - Click Apply and Close
Afterwards, a new right click at Jboss Server > Clean, and the Jboss Server stopped the message.
Hope it helps.

Related

Cannot set the glassfish server runtime enviroment in eclipse

I changed my default jre to jdk 1.7x in eclipse kepler. I was getting a null pointer exception when I started glassfish 4. To fix this issue, I did all the steps to change the jre/jdk of my glassfish. On the final screen, when I click finish, nothing happens. This looks like a bug in the software. Please help me to fix my problem.
Note: When I try to clean the server using my server > right click > clean, I get the same null pointer exception again.
Edit-
I tried one solution which does not help:
Apparently when Glassfish is installed it hard-codes its reference to
your JDK location, so to fix this problem I ended up having to edit a
file named asenv.bat. In short, I edited this file:
C:\glassfish\config\asenv.bat.
and I commented out the reference to JDK 6 and added a new reference
to JDK 5, like this:
REM set AS_JAVA=C:\Program Files\Java\jdk1.6.0_04\jre/..
set AS_JAVA=C:\Program Files\Java\jdk1.5.0_16
This solved the problem, and Glassfish started right up after this
change.
But my asenv.dat file contains no such path. Anyway, I added set AS_JAVA = my jdk path here and it did not help.
set AS_IMQ_LIB=..\..\mq\lib
set AS_IMQ_BIN=..\..\mq\bin
set AS_CONFIG=..\config
set AS_INSTALL=..
set AS_DEF_DOMAINS_PATH=..\domains
set AS_DEF_NODES_PATH=..\nodes
set AS_DERBY_INSTALL=..\..\javadb
REM I added my line here
Another solution which leaves me with the same problem:
Install latest eclipse luna with latest glassfish 4.
It is a bug - see here the comment by BalusC
The only sure way to workaround is to delete your server runtime and create it anew.
And by the way - Luna is the latest eclipse release - maybe update ?
First, delete the glassfish server in servers window in eclipse. Then, in my second screenshot, in the window below the front window, i.e where you see Invalid JRE in red, delete the glassfish server. Then, recreate a glassfish server from the servers window from scratch. Your problem will be solved. I had also reinstalled my jdk, so I am not sure if that also helps. Anyway the glassfish server is atleast running now.
Here is the Answer :
Glass-fish Requires JDK , somehow it is unable to get it.
We can solve this issue just click on the JRE preference link.
And add one more entry of JDK in that popup window.
Now you should be able to select & proceed further with the Glass-fish installation.
Save the server and try to add a new module again.
See more: https://www.eclipse.org/forums/index.php/t/1072242/

Specified VM install not found: type Standard VM, name jre7

Specified VM install not found: type Standard VM, name jre7
Have you ever encountered this problem in Eclipse while building an ant file? Then this article is for you. Deleting and recreating the workspace is not the solution. There is an easy solution to fix this issue without recreating the workspace.
Right Click on build.xml
Go to "Run As" >> "External Tools Configurations..."
It shall open new window
Go to JRE tab
Select proper JRE if missing (sometimes jre tabs shows error mark on that.)
For more technical details or issue similar to this find my blog here.
In my case it happen as I have changed my JRE.
Solution :
Right click on your ant script > Run as > External tool configurations... > Go to JRE tab > select JRE
Hope this help.
Thanks,
Sagar Vyas
Best answer found at
It happened for me after Un-installing Java and installing new version.
All I have to do is in eclipse open Installed JREs from
Windows --> Preferences --> Java --> Installed JREs
Then Add new JRE information. Details can be found here
This is a preferred way tell projects which JDK container to use, especially true if two or more devs are using the same version controlled eclipse project folder.
Window/Preferences/Java/Installed JREs
List one or more JDKs installed on your computer. Eclipse defaults name to jdk1.X.X_XX you should keep it as is. Never link project build settings directly to use these names.
Window/Preferences/Java/Installed JREs/Execution Environments
List of common jvm environments such as JavaSE-1.6 and JavaSE-1-7 names. Click rows and choose jre instance on the right side panel. These names are common and all team members should already have them in Eclipse installation.
Step 1: This is where you may accidentally have nothing chosen if JREs were uninstalled or names changed in InstalledJREs setting. You may get
Specified vm install not found error dialog.
Step 2: Choose 2nd mouse on build.xml file/Run As/Ant Build... popup menu entry. Click on JRE tab and choose execution environment. This may have obsolete value from the previous jdk values.
Project Properties/Java Build Path/Libraries
Add Library.../JRE System Library/(x)Execution environment
Choose execution environment to be used for this project. Team members may not have exact _XX jdk build but they can use the same version controlled eclipse project settings. Execution environment mapping hides user specific details.
Just had this issue & the solution above does not work, atleast not for me.
Instead I went the solution provided here:http://www.javaworkspace.com/VMNotFound.do
Essentially you go to the directory C:\projects\WORKSPACE.metadata.plugins\org.eclipse.debug.core.launches
In there search for the string of the JDK that that eclipse is moaining about & change it to the name of your installed JDK that you want to use that eclipse knows about.
You can change what JRE the ant bulid file is launched with inside eclipse.
Right click on the ant file in the ant view and select "Run As"->"Ant..." from the context menu.
Then in the launch dialog select the JRE tab. Note the error message at the top if it can't find the JRE that it expects.
Select a JRE that you have installed or manage install a new one. You can also add vm arguments (enable logging or change memory alocation) if you need to in this dialog.
Just delete the below file
"<Your eclipse workspace location>\.metadata\.plugins\org.eclipse.debug.core\.launches\<projectname>.xml.launch"
link to post
The last answer is absolutely correct, however a fast track way is to delete the project reference from eclipse (make sure to keep unchecked delete source) and import your project folder again. This way the project configurations are reset by eclipse using the new jdk.
But a wonderful post it did help me.
After Java update ant build failed and the below steps fixed it .
Right Click on build.xml-Run As-External Tools
Go to JRE tab and check the box to use the JRE same as workspace.
Removed below file and build maven project again, worked for me.
.metadata.plugins\org.eclipse.debug.core.launches\.xml.launch"
(ant file)Run As--> External Tool Configuations,
go to JRE tab and choose JRE

Eclipse: 'System' cannot be resolved

First i installed java 7.0 update 25 and then installed eclipse.
Later as per requirement, I uninstalled this java version and installed earlier version 5.0
Now in every eclipse program, it is showing error with word 'System'.
Solution is to add path of java.exe to eclipse.
Can anyone guide me to do it?
To resolve this problem perform below steps:
Go to Package Explorer -> Select your Project -> Right click on your project -> go to Properties-> Click on Java build path -> select your JRE file (mostly it will display error) and click on edit button which is on right side -> new dialog box will get displayed as “JRE System Library” in this window select radio button i.e"Workspace default JRE(jre6)" or whichever you have installed.
Then click on finish.
Errors will not come.
The solution to the above problem is, change the JRE system library by doing the following:
Right click on your project and select properties.
Select Libraries from the tab.
Select the current JRE system library and click on edit.
Select either Alternate JRE or Workspace default JRE (Latest version of JRE).
Click Finish and then OK.
On Eclipse Oxygen, follow steps from (1) to (6) shown below figure.
For those who make errors as I do, check whether the error is "'System' cannot be resolved" or "'system' cannot be resolved." In the latter case, capitalizing system will likely cure the problem. In the former case, follow directions above. Only wasted an hour figuring that one out.
I solved the problem a little bit different. That may be because on my computer "java" doesn't work at Windows/cmd.exe because it is not listed in the Windows-PATH variable.
My solution is this:
Project -> Properties -> Java Build Path -> Libraries
Add Library -> JRE System Library -> Alternate JRE -> Installed JREs…
Dialog “Installed JREs” open -> [Add…] -> “Standard VM”
Dialog “JRE Definition” opens -> JRE home: [Directory…]
Select the path to your JRE.
Use [Finish] or [Apply] several time. I hope it also works for you.

Add Jars to User LIbraries in Eclipse Helios, Mac OSX

I've created a new Java project (testProject) and begin to add jars to a user library, but I'm getting project errors after adding jars to a "User Library"
Here's what I'm doing:Create the User Library
Right mouse click the project and click Properties
Click Add Library..., select User Library, and click Next
Click button, User Libraries...
Click New... and give it a name: mule; click OK.
Select mule and click Add JARs...
Add a jar (e.g. I've added two, one from the root project, log4j.jar, and another from /opt/mule/lib)
Click OK
Click Finish
Now I'm seeing a red x show on the mule library.
1. Click Edit, and click User Libraries
2. The message on each jar says the library is missing, and it seems to be losing the actual path.
See attached image:
I'm running On a Mac OSX 10.5.8, running Java
openjdk version "1.6.0-internal"
OpenJDK Runtime Environment (build 1.6.0-internal-landonf_17_may_2009_13_58-b00)
OpenJDK Client VM (build 11.0-b17, mixed mode)
This doesn't seem to be a problem on a Vista PC, running Eclipse on Java 1.6.0_16. (Or under Ubuntu).
Is anyone else seeing this?
I have had a similar problem in Eclipse Indigo SR2 on a Windows XP workstation. It ran perfectly for a long time until it broke and displayed the behavior that the OP has observed.
I have found out more what causes the problem and have found a workaround.
The problem is caused when I choose Preferences -> Java -> Build Path -> User Libraries | Add JARS... and add a new jar file. What happens is that although the user library is given an absolute path (C:\Documents and Settings\a23456\box_corefx\1box-corefx\box-build\target\deployment\weblogic\APP-INF\lib\antlr-2.7.6.jar) it only stores a relative path (\1box-corefx\box-build\target\deployment\weblogic\APP-INF\lib\antlr-2.7.6.jar). This relative path is what makes it say "missing."
The workaround is to export a good user library and massage the jars so that it has entries like:
<archive path="C:/Documents and Settings/a23456/box_corefx/1box-corefx/box-build/target/deployment/weblogic/APP-INF/lib/antlr-2.7.6.jar"/>
Then import the new user library.
There have been a number of problems reported by people trying to run Eclipse on Open JDK. Plus it looks like you are using some sort of pre-production build of it. The first thing I'd do is to try running Eclipse with JDK that comes with Mac OSX.

How to get Java API Javadocs to show up in Eclipse in Ubuntu

I'm here again with a docs question.
At my university, when using Eclipse, when placing the cursor
over a Java API method name (for example: .size() ), I get
very nice documentation about it.
Here at home I get
Note: This element neither has attached source nor attached Javadoc
and hence no information could be found.
Any quick and simple apt-get fix?
Thanks in advance!!!!
Go to your JRE settings (Window > Preferences > Java > Installed JREs), select your current, then Edit it and set the Source Attachment for rt.jar.
You might have to install the sun-java6-source or openjdk-6-source packages depending on what you are using.
For the Sun JVM, sources will end up in /usr/lib/jvm/java-6-sun-1.6.0.15/src.zip.
PS: I'd suggest to use Sun JDK and to set it as default with sudo update-alternatives --config java but this is more a side note.
In Preferences, make sure that under Installed JREs you are using a JDK and not a JRE.
I don't think that the JRE installs include the source attachment.
Try out apt-get install eclipse-source.
The following procedure will enable Java documentation to be available in Eclipse when you hover over some Java class. Download the Java Documentation (this is for version 6) from http://www.google.co.in/url?sa=t&source=web&ct=res&cd=4&ved=0CC0QFjAD&url=https%3A%2F%2Fcds.sun.com%2Fis-bin%2FINTERSHOP.enfinity%2FWFS%2FCDS-CDS_Developer-Site%2Fen_US%2F-%2FUSD%2FViewProductDetail-Start%3FProductRef%3Djdk-6u10-docs-oth-JPR%40CDS-CDS_Developer&ei=T-z3S87CAYuyNq3UweAF&usg=AFQjCNH54wkg50p7PJGmv6dEJd0zxXTGRA&sig2=Pv8-OZ7ZQEAsh89kUFhvUw This is a zipped file jdk-*-docs.zip ( * indicates the version number, for e.g., 6u18 which implies Java Version 6.18). Open Eclipse. Click on Window > Show View > Javadoc Right click on the Javadoc console. Select Open Input. Click "Change Attached Source". Select "External File". Navigate to the directory in which jdk-*-docs.zip exists. Open it. And there you have it - the entire documentation available to you at your fingertip(mousetip?).
Download Java sourece.
i get it from http://download.java.net/openjdk/jdk8/
2.Go to Window > Preferences > Java > Installed JREs
Select the installed JDK and double click on it, a edit JRE window will get open.
select rt.jar click add source and and select the patch where you have downloaded java source in step 1.
then exit by clicking OK/ Finish

Categories

Resources