Error: the chosen directory does not contain the required product while installing STS - spring-tool-suite

While installing STS using installer, I was asked to select the JDK path:
I used the following command to get the jdk path:
However it shows the error:
The chosen directory does not contain the required product
Please advice.

Somebody solved selecting path up to JDK directory (removing final bin).
Otherwise try downloading zip file instead of installer and unzip it somewhere (not in Program Files).
Then you can configure it manually setting the "-vm c:\pathtojdk\bin\javaw.exe" argument in STS.ini.

Related

How to fix Eclipse Error: The eclipse executable launcher was unable to locate its companion shared library? Windows 10

How do I fix the error "The eclipse executable launcher was unable to locate its companion shared library" on Windows 10. I wasn't able to find it elsewhere and I would appreciate it if someone can explain it to me in layman's terms. TIA
This type of error message, ofter, occurs when Eclipse bundle that you downloaded was not correctly unzipped.
Try to simply delete the Eclipse folder and then extract it again with a well known unzip tool (have a look at the extension of the file, if it's tar, rar or zip and use a extract tool that supports it).
Finally you can try running eclipse.exe

Typesafe activator not installing

I want to install typesafe activator. I have installed jdk 7 and have path and java_home variable to correct location.
path :
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.7.0_67\bin
Java_Home
C:\Program Files\Java\jdk1.7.0_67\bin
Activator.bat opens and disappears. I dont know what the problem is.
You need to mention the path of the Typesafe activator folder in that line too. First download the Typesafe Activator and unzip the folder into a drive ("c:/" preferred). Now copy the link of that folder : (look like this : C:\activator-1.2.8 ) should be included into the path you have mentioned like the jdk path followed by a ";" semi colon.
Sample:
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.7.0_67\bin;C:\activator-1.2.8
After Restart you can check installation by simply typing "activator" in the command line.
Thanks!
You need to mention the path of the Typesafe activator folder in that
line too. First download the Typesafe Activator and unzip the folder
into a drive ("c:/" preferred). Now copy the link of that folder :
(look like this : C:\activator-1.2.8 ) should be included into the
path you have mentioned like the jdk path followed by a ";" semi
colon.
Sample:
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program
Files\Java\jdk1.7.0_67\bin;C:\activator-1.2.8
After Restart you can check installation by simply typing "activator"
in the command line.
Thanks!
I have the same error here now and followed your steps but when I try "activator" on prompt, it seems to execute the activator.bat file and retrieve me the same error log.
Is there anything that must be installed before. Can it be in any ways a Proxy trouble?
In time: My .sbt folder is almost empty. There is only a folder with the error log inside.
UPDATE
after trying for a while, i've come with a solution. The activator command requires the proxy to set. Didn't try to do this before 'cause I'm new in the company and didn't had full permission. Now, when use the console command:
set HTTP_PROXY=http://host:port
It just worked fine.
Hope it helps!

Running Eclipse on desktop = can't find companion library

I just downloaded Eclipse Juno onto my machine. I extracted the files to an Eclipse subdirectory in "C:\Program Files". When I try to launch eclipse from here, it works great! But I don't want to have to navigate to this directory every time I want to launch eclipse. I tried just moving the executable to my Desktop, but then when I try to run it I get this message:
The eclipse executable launcher was unable to locate its companion library.
How do I let eclipse know where it's companion library is if I don't plan to have them in the same folder? Please be very specific.
Thanks!
You dont move the executable to your desktop because the executable needs to be in the same directory with other files where it was. get it back and then make a shortcut or link to it. you are free to make the shortcut or link where you want.
Well i had the same problem sometime back, and i figured out that since i've changed the location of my elcipse.exe , it has some how effected the "eclipse.ini " file
1.Path to -startup
D:\ < elcipse folder> elcipse:\ plugins\org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar \this is the start up jar file.
2.Path to shared lucher library
D:\ < elcipse folder> elcipse:\ org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813 \this is the shared launcher library jar file.
just set the follwing two paths and ti will start up again like befor..
Happy coding..
This is a bug filed with Eclipse for Windows and Mac:
When attempting to launch Eclipse (double click on Eclipse.app), the launch fails. The only action is a dialog box with this message:' the eclipse executable launcher was unable to locate its companion shared library'. I found an online description of the problem and the workaround here:
Specifically, as per the instructions above:
I opened the Eclipse.app package, located eclipse.ini, edited it
searched the plugins folder for something matching org.eclipse.equinox.launcher.carbon.
copied the maching folder name (from plugins)
pasted it as the terminating portion of the path for --launcher.library
replaced the --launcher.library line with that path
https://bugs.eclipse.org/bugs/show_bug.cgi?id=288112
Eclipse Neon, 2017:
I copied my old .p2 folder found in my home.
Ran eclipse again and it worked.
It used to be that you could just copy eclipse as a zip and it would work fine, but it seems some plugins now rely on the .p2 folder.

Unable to start Eclipse -- can't open \Java\jre6\lib\i386\jvm.cfg

could not open C:\Program Files\Java\jre6\lib\i386\jvm.cfg
is the error coming when i am trying to start eclipse ide.
my C:\Program Files has
jdk1.6.0_14
jdk1.6.0_17
jre6
folders.
path is set to
PATH: C:\Program Files\Java\jdk1.6.0_17\bin
what is the problem
i have seen this link but it is not solving my problem
can't find JRE in the JDK
I had similar problem on a Windows machine. I had moved my Java directory from inside "Program Files" (the space in the directory name was giving me trouble) over to c:\
I set all my PATH variables to the new location, restarted the machine and thought that would be enough. Nope
java -- version
Error: could not open `C:\Program Files\Java\jre1.8.0_66\lib\i386\jvm.cfg
This solution came from the good folks over at coderanch
Start regedit (just type "regedit" into the Run program) and work your way down to HKEY_LOCAL_MACHINE > SOFTWARE > JavaSoft
There you will find several different java directories
Java Development Kit
Java Plug-in
Java Runtime Environment
Java Update
Java Web Start
In each directory you'll find different directories for the different version of java (esp. Java Web Start). Open each and every one and you'll see that your old path is still listed. Double click the Name (left column) of the listing and manually type in the new path.
Open a new terminal and type in Java - version and you should be fine.
This problem can show up if you initially install Java in the default location (C:\Program Files) and then later re-install into another location.
The default installation copies java.exe, javaw.exe and javaws.exe to C:\Windows\System32. If you are in this situation and delete these files it will likely solve your issue.
(Thanks to Jay: http://jaykhimani.blogspot.com/2012/09/error-could-not-open-cprogram.html)
Problem: Eclipse Neon error: "C:\Program Files\Java\jre1.8.0xx.xx\jvm.cfg"
Solution Win7 Pro: System Properties > Enviorment Variables > System Variables > Path > Edit > #make sure the current JAVA directory appears first in the path if more than 1 JAVA directory exist.
In the path that follows, I moved "C:\ProgramData\Oracle\Java\javapath" behind the current directory "C:\Program Files\Java\jdk\bin;C:\Program Files\Java\jre\bin" > save
Path
C:\Program Files\Java\jdk\bin;C:\Program Files\Java\jre\bin;C:\apache-maven-3.5.0\bin;C:\ProgramData\Oracle\Java\javapath
I also had this problem and was having trouble finding a solution, but now I did!
If you uninstall your current running jre version and then install higher one you are good to go.
I was using jre1.6 when I had this problem but after installing 1.7 it was solved!
I recently got the same problem on my Windows 7. The issue was that two different paths were specified for Java in the path environment variable. This can be checked as follows.
On the command prompt, run the following command:
> where java
C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe <br/>
C:\Program Files\Java\jdk1.8.0_192\bin\java.exe
The first one was the cause of the issue and removed it from the path.
Eclipse is working now without re-installation.
Note: The environment vars have been as follows always:
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_192
JRE_HOME=C:\ProgramFiles\Java\jdk1.8.0_192\jre
The problem is that your eclipse cant find jre.Just copy and paste your jre folder into eclipse folder and then start eclipse.Delete environment variable.
What worked for me was to go back to the Java webpage and download the Java jre instead of the jdk, since that is what the stupid computer is now looking for. Then open the C: Program Files>Java and make sure you see jre7 instead of jdk.
RS
Have a simpler solution:
Check your PATH. Most likely it is referring to incorrect java.exe. This started happening to me when I installed OS patch. In process of checkpoint etc, PATH got modified. Once I corrected it (using Environment Variables...), it worked immediately.
Try putting below line in your eclipse/STS -STS.ini file
-vm
C:\Program Files\Java\jdk1.8.0_121(your JDK version)\bin\javaw.exe
Put it at the top of the file.
Most probably it will work.
Sometimes putting javaw.exe in eclipse folder also work (where eclipse.exe is there)
This is an old post, but what solved my solution was editing the `eclispe.ini' file to include the correct path to the JDK.
Building off of what Lars answered, I did reinstall Java, so that may have been the source of the issue. Reglardless, this is the solution that worked for me. I did not have to delete any files from C:\windows\system32, however. I merely told eclipse to look in the new Java installation directory.
These docs indicated I needed to specify the path to the VM:
-vm
C:\Java\jdk1.7.0_25\bin\javaw.exe
This problem mainly occurs when we install new jre or jre gets updated automatically since jdk version and jre version are different and path variable i.e. JAVA_HOME contains jdk path with version included in it . Eclipse might be using that to generate the jre path name for the said file.
I did workaround i.e. changed name of jre folder to the older version e.g.
jre1.8.0_191 is after installing update and
jre1.8.0_60 was before update.
I renamed jre1.8.0_191 with jre1.8.0_60 to solve the issue
I had faced similar problem. Environment variable path problem
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_192
Set the Environment variable after going
Control Panel\All Control Panel Items\System and select Advanced System Settings then set Environment Variables
In System Variables add a new variable JAVA_HOME and variable value = C:\Program Files\Java\jdk1.8.0_192, the path of the jdk file in your system.
and %JAVA_HOME%\bin in the path of the system variables.
Hopefully the problem will solve.
After doing this It works fine for me.

How do you install JDK?

I have eclipse and I can test run java apps but I am not sure how to compile them. I read that I should type javac -version into my cmd.exe and see if it is recognized. It is not. So I went to sun's website and downloaded/installed JDK v6. Yet it still says 'javac' is an unrecognized command. What am I doing wrong?
Thanks!
UPDATE
OK after reading some replies it seems like what I am trying to do is create a .jar file that can be ran on another computer (with the runtime). However I am having trouble figuring out how to do that. This might be because I am using Flex Builder(eclipse), but I added the ability to create java projects as well.
Thanks
UPDATE
OK I do not want to make a JAR file, I am not trying to archive it...the whole point of making a program is to send it to users so they can use the program...THAT is what I am trying to do...why is this so hard?
To setup Eclipse to use the JDK you must follow these steps.
1.Download the JDK
First you have to download the JDK from Suns site. (Make sure you download one of them that has the JDK)
2.Install JDK
Install it and it will save some files to your hard drive.
On a Windows machine this could be in c:\program files\java\jdk(version number)
3.Eclipse Preferences
Go to the Eclipse Preferences -> Java -> Installed JREs
4.Add the JDK
Click Add JRE and you only need to located the Home Directory. Click Browse... and go to where the JDK is installed on your system. The other fields will be populated for you after you locate the home directory.
5.You're done
Click Okay. If you want that JDK to be the default then put a Check Mark next to it in the Installed JRE's list.
You don't need a separate compiler, eclipse already compiles the application for you. What you probably want to do is to create an "executable" JAR file, which you can do in eclipse by selecting File->Export->Runnable JAR file.
Note, however, that the resulting JAR file is not a "real" (i.e. Windows binary) executable - it still needs a JRE installed on the target computer. There isn't really a way to create windows binaries; that's not how Java works. On the upside, it will work without recompilation on a Linux or MacOS machine (if it has a JRE installed).
javac is located in the "bin" folder of your JDK installation. In order to run it you must either use full path or add this directory to your systems search path via the Control Panel.
If you installed to c:\program files\java\jdk1.6.0 your call will have to look like this:
c:\> "c:\program files\java\jdk1.6.0\bin\javac" -version
Umm, eclipse is an IDE, it compiles things as you go. You don't need javac.
If you have Eclipse installed and you can write new java apps from within it, your compilation should work already..
Eclipse automatically builds/compiles your system when you're saving new Java files. Just try to write a new simple Hello world app, printing something to the console (just type sysout and Ctrl+Space inside Eclipse)
Eclipse automatically compiles all project in the workspace. YOu can disable this option if you like under Project->Build Automatically.
A JAR file can function as an executable, when you export your project as a JAR file in Eclipse (as Michael Borgwardt pointed out) you can specify what's the executable class, that meaning which one has the entry point [aka public static void main(String[] args)]
If the user installed the JRE he/she can double-click it and the application would be executed.
EDIT: For a detailed explanation of how this works, see the "How do I create executable Java program?"
Eclipse to use the JDK you must follow these steps.
1.Download the JDK
First you have to download the JDK from oracle site.
Download link - > https://www.oracle.com/technetwork/es/java/javasebusiness/downloads/index.html
2.Install JDK
Install it and it will save some files to your hard drive. On a Windows machine this could be in c:\program files\java\jdk(version number)
3.Eclipse Preferences
Go to the Eclipse Preferences -> Java -> Installed JREs
4.Add the JDK
Click Add JRE and you only need to located the Home Directory. Click Browse... and go to where the JDK is installed on your system. The other fields will be populated for you after you locate the home directory.
5.You're done
Click Ok. If you want that JDK to be the default then put a Check Mark next to it in the Installed JRE's list.