I am trying to install Apache Spark on my Windows 10 computer. My first step to install Spark was to download Java from here it was then downloaded through this path: C:\Program Files (x86)\Java the one folder that was downloaded during this installation was: \jre1.8.0_151
Next I installed the JDK from here and downloaded the windows x86 version. I used the same path as above in the Java folder to download it. After it was done I had two folders inside the Java folder: jdk1.8.0_151 and jre1.8.0_151
Afterwards, I set the JAVA_HOME variable to point to C:\PROGRA~1(x86)\Java\jdk1.8.0_151 and in Path I added %JAVA_HOME% I then installed Scala from here and downloaded the Scala binaries for Windows. The environment path was added in path as: C:\PROGRA~1(x86)\scala\bin
Next I installed Spark from here and installed spark-2.2.1-bin-hadoop2.7.tgz Afterwards, I placed this folder here D:\spark-2.2.1-bin-hadoop2.7I then added the environment variable as SPARK_HOME with the path: D:\spark-2.2.1-bin-hadoop2.7\bin and I then updated path to %SPARK_HOME%\bin
Finally I tried to see if everything was installed. I typed java -version and the correct java was installed. I then typed scala and scala was open for me to type in expressions and such. I then typed in spark-shell but I got this error:
'spark-shell' is not recognized as an internal or external command,
operable program or batch file.
What am I doing wrong that is not making spark open? Please note: I am using cmd for everything.
It looks like you set your %SPARK_HOME% to a wrong place and thus when "I then updated path to %SPARK_HOME%\bin" it resulted in adding D:\spark-2.2.1-bin-hadoop2.7\bin\bin with double \bin which is obviously wrong. %SPARK_HOME% should be without \bin.
Generally you can test your environment variables by calling echo %PATH% in the command line or SET to show all of them
Related
I want to install the android SDK command line tool version 25.2.3 on my Windows 10 x64 pc. I've installed Java SDK and created two system variables JAVA_HOME and JRE_HOME which point to the corresponding path, but it still doesn't work. I can't do the next-previous-solution since I want to install the command line version. I've attached an image showing the error and the system variables. Thanks in advance!
You have set JAVA_HOME and JRE_HOME but, missed to set Java's bin directory to be able to execute java, javac etc commands. Do to so, set PATH(replace first java entry) to include Java's bin directory as JAVA_HOME\bin.
I am trying to install Oracle SOA Suite 12 on Windows 10. I set the JAVA_HOME correctly (able to echo it), and then trying to run the JAR. It gives me the following message:
This installer must be executed using a Java Development Kit (JDK)
but C:\Program Files\Java\jre1.8.0_161 is not a valid JDK Java Home.
It seems to look for the JRE folder and by default neglecting the JAVA_HOME environment variable. I did a workaround by navigating to the JDK folder, and then running the java.exe inside the JDK folder (java.exe -jar /path/to/soasuite). It works well. I just want to know what might be the reason.
I advise you to set the properties as follow. Adapt correctly to your path in the JAVA_HOME property, and the others will follow.
JAVA_HOME := C:\java\jdk1.8.0_151
JDK_HOME := %JAVA_HOME%
JRE_HOME := %JAVA_HOME%\jre
CLASSPATH := .;%JAVA_HOME%\lib;%JAVA_HOME%\jre\lib
PATH := %JAVA_HOME%\bin;%PATH%
EDIT:
I did a workaround by navigating to the JDK folder, and then running
the java.exe inside the JDK folder (java.exe -jar /path/to/soasuite).
It works well. I just want to know what might be the reason.
This means that you are missing the change in the PATH environment.
I was not able to utilize the path variables described - did not want to restart the machine durng and install of oracle software. I was able to successfully complete the install of weblogic oracle fusion by doing the following.
RUN JAR files using command prompt due to having issues running the java installed setups for oracle12c, weblogic ,etc.
RUN command prompt as adminsitrator:
1. CHANGE DIRECTORY IN COMMAND PROMPT TO:
C:\Program Files\Java\jdk1.8.0_181\bin
RUN the command like this - pointing to the proper JAR file.
java -jar c:\oracleformssoftware\fmw_12.2.1.3.0_infrastructure.jar
This definately worked for me but please note I did finally setup the path variables instructions noted here.
My Talend tool version is 5.6. As mentioned in Talend documentation it needs Java Runtime Environment 7 i.e jdk1.7, which is installed - along with set java_home in my environment variables. As per me it should work.
However I have jdk1.8 installed too, but I'm correctly pointing jdk1.7 path at environment variable.
Alternatively I have tried giving jdk1.7 path in Talend's Talend-Studio-win-x86_64.ini file. It's still giving me error.
Below is snapshot: in cmd the installed version shows jdk1.8 where in echo %JAVA_HOME% it shows path of jdk1.7
While starting tool this error comes:
Create a batch file with the following command:
Talend-Studio-win-x86_64.exe -vm "[jdk path]\bin"
Then start the studio by executing this batch.
Talend is based on eclipse, so you can set the java vm to use in the ini-file. (Sorry, I don't have an installation here right now, I think it is called talend.ini - nevertheless, it is located in talend's installation folder.)
Add the following to the top of the file:
-vm
[path to your java 7]/bin/javaw.exe
try to make changes in TOS_DI-win-x86_64.ini file
add line
-vm
C:\Program Files\Java\jdk-11.0.14\bin\javaw.exe
And update or confirm the version as below.
-Dosgi.requiredJavaVersion=11.0.14
Hope it'll help to fix the issue
Suppose you have talend in c:\talend and jdk1.7 is in C:\jdk1.7.
You can do like the following in windows environment.
Open command prompt.
Goto the bin folder location where jdk 1.7 is located. For example if you have jdk in C:\jdk1.7 then
cd\
cd C:\jdk1.7\bin
Then from bin folder of jdk type the full uri of the executable and hit enter.
In the above supposition c:\jdk1.7\bin>c:\talend\tos_di-xxxxx.exe
In the above statement tos_di-xxxxx.exe is the executable file depending on the os environment
I am trying to install tizen wearable sdk in windows 7 64bit. I have donwload the .exe however when I am trying to isntall it I am getting the following error:
error - Cannot execute Java even if it was installed. Check environment variable or Java version(over 1.6) please.
I have installed in my computer java 1.7.0_80. I have put to the path of the system C:\Program Files\Java\jre7\bin and in JAVA_HOME C:\Program Files\Java\jdk1.7.0_80
I have tried to follow the instructions from here here however I didn't mange to solve my issues.
EDIT: I followed the instructions from that link I went to cd\Users\AppData\Local\Temp and I run from there the command in console java -jar installmanager.jar. THe installation began normally. However, during the installation I got several errors.
I've had a few problems with the Tizen Wearable install too.
You can either make sure that you have Java in your path by going to a command prompt and typing java -version for example. If it works then Java is in your path. If it doesn't you have to fix it:
Win+Pause/SysRq then click on Advanced System Settings
Click on environment variables
Look for PATH and edit it
Add the path to your Java install (eg: C:\Program Files (x86)\Java\jre1.8.0_31)
Or run from the command line:
Go to a command line
cd to %TEMP%
Run Java by first entering the path to your java version (eg C:\Program Files (x86)\Java\jre1.8.0_31) then bin\java, so C:\Program Files (x86)\Java\jre1.8.0_31\bin\java.exe
If you are still having problems then edit the question to add more specific information so any other issues can be fixed.
Try to check if this directory is in the path too:
C:\ProgramData\Oracle\Java\javapath
and if there is links to missing java executables.
If this is the case, you can remove that folder to the path, replacing with the current java version you want, or fix the link from there.
It seems like the VBS script tried to delete a file that doesn't exist, you can go to the VBS file and go to the problem line, and check out which file was missing. Then decide what to do.
Maybe you should install the latest JDK, try the latest JDK and see if the problem can be solved.
OS: Windows XP
I am using yuicompressor-2.4.2 to compress some CSS before uploading to my server.
But when I run it, the following exception appears:
Exception in thread "main" java.lang.UnsupportedClassVersionError:
com/yahoo/platform/yui/compressor/Bootstrap (Unsupported major.minor version 48.0)
So I think it's because of the JRE.
I typed in the command:
cmd: java -version
And it says:
java version "1.3.1_01"
But it should say 1.6.0_16, since I have installed the latest version.
What should I do to make Java use the latest version instead of the old one?
Set the environment variable JAVA_HOME pointing to the directory where you have jdk 1.6.0
set JAVA_HOME=your_path_to_jdk1.6
set PATH=%JAVA_HOME%/bin;.;..;%PATH%
That's from a command window. Also you can do it from "My PC > Properties > Advanced > Environment variables"
Go to the system32 directory C:\Windows\System32 and delete following 3 files
java.exe
javaw.exe
javaws.exe
Now create a JAVA_HOME environment variable with value={root path of your jdk installation} and add the path till bin folder of your jdk in the PATH environment variable.
Open a fresh command prompt and run java -version to confirm the change
If you are using windows 7/10 go to command prompt and type
where java
Delete all the symbolic link shows below other than your actual installation directory.
Even if correctly added all the environment variables still sometime you can get wrong versions especially when you have multiple version installed in your system and want to switch between them.
On Windows, the JRE installs a java executable in the Windows directory, which should be the first java in your path. This is just a wrapper that looks in the Windows Registry to find the Java home directory (should be "%SystemDrive%\Program Files\Java\jre6" for Java 6) and runs using the libraries there.
Run %SystemRoot%\system32\java -version and see what you get. If that is Java 6, you have entries in your path before %SystemRoot%\system32 (which really should be first). Either fix your %PATH% variable, or you'll have to be explicit whenever you want to run this version of Java.
If running that instance of java doesn't report Java 6, its not installed (correctly). Uninstall and try installing again.
If you are having trouble because of the PATH, it is because you or some software you installed monkeyed with it; I recommend using the default which is to have system32 first. Everything works fine if the defaults are used.
Also, %JAVA_HOME% is not used by the JRE itself at all. Some common Java applications like tomcat and ant honor the %JAVA_HOME% setting, so perhaps yuicompressor does too. But this is a de facto convention, not a standard.
after where java in Command prompt
for example
where java
C:\Program Files\Common Files\Oracle\Java\javapath
C:\Program Files\Java\jdk-11.0.10\bin\java.exe
delete C:\Program Files\Common Files\Oracle folder
then close all terminals and write java -version in the terminal. it will show the right version
worked for me
You should modify your PATH environment variable:
My PC > Right click > properties > Advanced > Environment variables
And modify "Path"
Append at the end the path to your 1.6 installation:
;C:\jdk1.6.xxx\bin
and remove the previous one if present.
Add %JAVA_HOME%/bin to your PATH environment variable where JAVA_HOME is set to your JRE6u16 directory
I had the same problem. In System Properties > Environment Variables > System Variables > PATH make sure there is no other path associated with Java. To make sure, type in and check Java paths.
where java
Re-open Command Prompt and type java -version again. I hope this helps.
first by the following command, you should be aware of .exe file which runs when you type java in the command prompt
where java
C:\Program Files\Common Files\Oracle\Java\javapath
C:\Program Files\Java\jdk-11.0.10\bin\java.exe
as you see above , cmd first reads java from
C:\Program Files\Common Files\Oracle\Java\javapath
so go to the path above and remove java files .
then it should work fine
You should check your PATH environment variable. It is possible that some application you have installed has put its version of the jre in front of yours in the path.
It looks like the older Java version is still on the system PATH environment variable (where the OS looks for commands) or JAVA_HOME (where yuicompressor may look for the java executable)
How those variables are changed depends on your operating system.