trouble uninstalling java on win7 machine - java

I am trying to uninstall java through control panel-->uninstall, however when I run cmd and type java -version, I still obtain:
java -version
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java Hotspot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)
Thanks.

You should check your path from the command line.
I have multiple JDKs and JREs installed and if needed (for an old application), I change my path.
Go to your command like, type path and hit enter.
Also, in order to see the JAVA_HOME, type echo %JAVA_HOME% in your command line.
Check exactly which version of java is still installed on your system.
Then find it in the control panel and remove it.
Please provide feedback. The more extreme solutions would be:
Try another uninstaller such as revo uninstaller (I am not affiliated with them).
Remove the directory, also the entries in your environmental variables (path, etc).
Option 2 is the last solution and not the best.

Open cmd
C:> for %i in (javac.exe) do #echo. %~$PATH:i
If you have a JDK installed, the Path is displayed,
for example: C:\Program Files\Java\jdk1.7.0_07\bin\javac.exe
You can remove them.
And you have to remove JAVA related system variables by going here
Start -> Computer -> System Properties -> Advanced system settings -> Environment Variables -> System variables -> PATH.

It seems you are having another java installed in your machine. Go to environment variable as said here then find out where your JAVA_HOME has been set and remove that installed java from your system.

Restart the windows system and check again.
prior to restart remove JAVA_HOME and PATH variable from system environment variables.
if still the problem persists that mean you have jre left with uninstalled. so,check properly and try to find it and uninstall it.

Related

jmeter wont run !Not able to find Java executable or version. Please check your Java installation"

I installed java from the offical java download page https://java.com/en/download/win10.jsp
It installed what appears to be a 32bit on my 64 bit system, which I can only guess is OK, as it did not present any other options.
I edited my system environtment variables, and added JAVA_HOME and added %JAVA_HOME%\bin to my "user variables" Path definition.
typing "set" in a cmd window produces:
JAVA_HOME=C:\Program Files (x86)\Java\jre1.8.0_151
:
Path=C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;.....C:\Program Files (x86)\Java\jre1.8.0_151\bin;
At the command prompt, "java -version"
produces:
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) Client VM (build 25.151-b12, mixed mode)
But when I try to launch jmeter.bat, I get:
jmeter wont run !Not able to find Java executable or version. Please check your Java installation"
Any ideas?
If possible move your JRE to folder which doesn't have spaces in its path.
If for some reason it is not possible - surround path to "bin" folder of your JRE installation with quotation marks
In any case you should be able to run JMeter as:
java -jar ApacheJMeter.jar
See Setting the JAVA_HOME Variable in Windows for more details.
I would strongly recommend switching to 64-bit server JRE as on 32-bit one you won't be able to allocate more than 4 GB to JMeter which might be not enough when it comes to high loads.
Check out JMeter Best Practices and 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure articles for more information on tuning JMeter for maximum performance
Your Java home is connected to JRE and not JDK (C:\Program Files (x86)\Java\jre1.8.0_151). See tutorial:
Windows: Set the environment variable JAVA_HOME to C:\Program Files\Java\jdk1.7.0_25
It should be connected to C:...\jdk[version] path, so set JAVA_HOME as:
set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_151
You can try to add JAVA_HOME "c:\Users\User\.jdks\corretto-1.8.0_322" to System variables, but in my case I had to add %JAVA_HOME%\bin to PATH System variable as well. As a result - I can you orignal jmeter.bat file.
Check-out this article, best way to set JAVA_HOME. The long and short of it, if using Windows, download the JDK, open your command prompt and type in the following command:
setx -m JAVA_HOME "C:\Progra~1\Java\jdk1.8.0_XX". Normally, the JDK is stored in your C:\Program Files\Java...

Java -version will not update after SDK installation

I am having an issue launching Eclipse saying incorrect JVM version(1.5, needs 1.7+), I installed both Java 7 and 8 from the website but when checking the version in cmd, i am still seeing 1.5
java version "1.5.0_30"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_30-b03)
Java HotSpot(TM) Client VM (build 1.5.0_30-b03, mixed mode)
It was my understanding that when I install a newer jdk, this version would update. How can I manually update this?
My Java_Home variable is pointing to the newer jdk.
C:\Program Files (x86)\java\jdk1.7.0_79
check your PATH environment variable
Start eclipse with the -vm argument, followed by the address of the jvm you want to use.
This way, you'll be sure of the version you're using.
Example:
eclipse.exe -vm C:\_jde\Java\jdk1.8.0_45\bin\javaw.exe
I think you need to add your JAVA_HOME variable to path as well.
appending the JAVA_HOME like this should set java 7 to default in your system .
%JAVA_HOME%\bin;
or you can check this link to see how to set java.
It's most likely that your system variable is still having this. Please recheck your system variable.
Also, you have an option of setting your default JRE:
Open Eclipse.
Navigate to Window > Preferences > Java > Installed JREs
Set your default JRE
I face this issue whenever i switch between various Java versions. The solution is below:
Go to c:\Windows\system32
Delete java.exe, javaw.exe, javaws.exe files
Open the command prompt and check the java -version.
Hope this is helpful!

JDK 8 not available in classpath

I have Java 7 in my machine from a long time .And now I have installed Java 8 too .The problem is even after changing the JAVA_HOME & path variable to point to jdk 8, I still get jdk 7 in the classpath.
Snapshot of the environment variables below
But I get the below when checking the version in windows.Is there anything else I should do to get it pointed to jdk8?
C:\Users>java -version
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
Snapshot of the environment variables below
Remove java.exe, Javac.exe and javaw.exe from system32
Remove oraclePath like some text in path of system variable(from jdk8 it will create a new system variable when installing)
Can you check in your System variables that in the PATH variable, there is no path to your JDK 7?
Even if you define or override a Path variable in the "user" variables, Windows just concatenate the system variables with the user ones, in this order.
So if there is a path to your JDK 7 in System path, you will have this kind of value :
PATH=;.....;D:\java\jdk8;%MAVEN_HOME%
Four things that come to mind:
You seem to have edited the user variables. Have you looked at the system variables? I would prefer to set the JAVA_HOME and PATH variables at system level.
Have you restarted cmd/Windows?
You could type where java in your cmd to see where Windows finds Java(s).
What is your PATH variable? Looking at your snapshot I it to contain at least %JAVA_HOME%\bin.
Go in control panel and type java in the search box type java. Click on the link on the java label. Then click on tab java. You will see the active runtimes. Untick the one you don't need.

Need to install Java 6 for Mac to compile Android source code

I am trying to setup Android build environment for my Mac 10.8.3
I dont understand, Apple provide instructions on how to revert mac back to Java 1.6 here :
http://support.apple.com/kb/HT5559?viewlocale=en_US&locale=en_US
They are clear instructions that I followed.
Yet when I still get the following :
unknown-98:fe:94:3f:92:ce:~ newuser$ java -version
java version "1.7.0_13"
Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
Please please help me solve this problem.
The Mac comes with, and occasionally updates, JDKs 1.4 through 1.6. You can see the versions you have installed in this directory:
/System/Library/Frameworks/JavaVM.framework/Versions
This is how you change the JDK
1. Command Line Java
My Java is coming from /usr/bin/java, which points off to one of the versions in the 'Versions' dir described above. To change the version of the JDK you're getting here, use the Java Preferences application under Applications -> Utilities -> Java:
You can drag the JDK you'd like to the top and it should be reflected immediately from the command line:
hostname% java -version
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_16-133, mixed mode)
hostname% java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)
2. Scripts and Applications That Use Java
Generally, other built-in applications or one that you install will use the JAVA_HOME environment variable to pick a JDK. By default, you won't have this set, and Mac-specific versions of startup scripts will usually create one by using the CurrentJDK link in the Java 'Versions' directory. The steps to add environment variables are documented in this article, but I can save you a little time. Create a directory .MacOSX in your home directory and add a file called environment.plist. Here are the entire contents of my ~/.MacOSX/environment.plist file:
<!-- When changing this, also run Java Preferences and change there. -->
<key>JAVA_HOME</key>
<string>/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home</string>
With this value set, all processes started as you will have JAVA_HOME available to them. Since this file is read when you log in, you'll have to log out/in once after you create or edit this file.
Special case: NetBeans
The IDE I use is NetBeans, but the following idea probably applies to other large applications as well. When NetBeans is installed, it will pick a JDK to use and hard code it in a properties file. If you want it to rely on the JAVA_HOME that you're now setting in environment.plist, you just need to edit one file. Edit this file:
/Applications/NetBeans/NetBeans\ 6.5.app/Contents/Resources/NetBeans/etc/netbeans.conf
..and you can set the JDK by changing this line:
netbeans_jdkhome=$JAVA_HOME
Note that, as the netbeans.conf file points out, you can always force a different JDK to be used by specifying it on the command line when starting the IDE. For your copying and pasting pleasure, here is the command to use to start it from terminal (I'm giving the 'help' option in this case). If you're using a different version, autocomplete ought to help with the version part of the path:
/Applications/NetBeans/NetBeans\ 6.5.app/Contents/MacOS/netbeans
--help
Recap
To recap, you can switch JDKs for your whole system by using the Java Preferences application along with changing the value in your environment.plist file. To switch on the fly, use the Preferences app and set a new value for JAVA_HOME in whatever terminal you're using, though some apps like NetBeans will still pick up the system value and you should specify the desired JDK on the command line.
Resources where I found this solution: https://blogs.oracle.com/bobby/entry/switching_jdks_on_mac

Setting the java path

I am having some difficulty.
I am trying to set the path on a machine, i have set Java_Home to C:\Program Files\Java\jdk1.4.2_01\bin
and Path to C:\Program Files\Java\jdk1.4.2_01\bin;C:\Program Files\Common...
yet whenever i do java -version in cmd i get
Java(TM) 2 Runtime Environment, Standard Edition (build
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)
any ideas why this might be?
Thanks
First, JAVA_HOME should be set (if it is set) to the root directory of the Java installation, or in your case
C:\Program Files\Java\jdk1.4.2_01
Second, JAVA_HOME is an older way of letting programs know where Java resides. It should be set more for "backwards compatibility" and less for "making it work".
The Path then should have an entry
${JAVA_HOME}\bin
And it is the additional "bin" on the path that will allow the executables to be found. Make sure that this java executable is found on your path first, and you will see a difference in output
Finally, unless you absolutely need Java 1.4, an upgrade is recommended.
You don't have to care about JAVA_HOME as it is not needed to run Java. It's used by some applications.
Check your path for additional entries that contain a jdk/jre. Move your PATH values to the front of the current path.
If you've changed the PATH environment variable in windows (through the dialogs), make sure that you spawn a new console because running consoles will not pick up global changes...
JAVA_HOME should be set to C:\Program Files\Java\jdk1.4.2_01, and the path should contain both C:\Program Files\Java\jdk1.4.2_01\bin and C:\Program Files\Java\jdk1.4.2_01\jre\bin

Categories

Resources