Reputation:
I am learning spring and it seems that STS will make me more productive. I have downloaded and extracted STS only to find that it will not load because the JRE is not in the path. I proceeded by writing a batch file to stick it into the path, but it still would not run. Finally I tried the -vm
switch while launching STS and got a new error message:
A Java Runtime(JRE) or Java Development Kit(JDK) must be available to run STS. No Java Virtual Machine Was Found After Searching The Following Locations
C:/java/jre7/default.ee
C:/java/jre7/javaw.exe
C:/java/jre7/jvm.dll
Why can STS not see the JRE when it is right in front of it? I am using STS 3.6.1 and do not have admin privileges.
Thanks.
Upvotes: 0
Views: 6480
Reputation: 69
Check under C:\Program Files for the java folder, if you have that installed, then you probably don't have java in your environmental variable path. You can check this by clicking on windows start then type in cmd press enter. then type java enter. If it doesn't recognize it then click again on windows start, type in Advanced system setting. Click on the Advance tap. Click on the environmental variables:
under 'user variable for ...' click on path and and then edit. Depending on your Java installation folder add the following to the end: ;C:\Program Files\Java\jdk1.8.0_101\bin
Upvotes: 0
Reputation: 1572
Eclipse would either use java installed on your system or you'd have to specify the JVM path in the eclipse.ini file like this: -vm
(so -vm on one line and the path on the next) STS is based on Eclipse. Therefore, this behavious is coming from Eclipse itself. The message that states that STS found Java in the following locations is probably some smarts added in STS to suggest where JDK might be located on the system. However, which JVM to pick is the user's choice and not STS's (i suppose that is the reason for not picking the found JVM automatically)
Upvotes: 1