Install JAVA 8 in home directory Ubuntu - java

I have downloaded tar.gz file and unzipped it. I don't have admin access, so I added PATH variable: export PATH=$PATH:/home/shashank/jdk1.8.0_144/bin in .bashrc and reloaded by source ~/.bashrc. But when I do "java -version". I cant see any update.

The problem is that 64bit machine is not supporting 32 bit Java Compiler.
It got fixed when x64 version jdk is installed.

Related

How can I install JRE from source?

I tried installing the latest version of JRE on my computer running ubuntu 20.04. JRE was not installed prior to this.
Here are the steps I followed.
headed to https://www.java.com/en/download/linux_manual.jsp
Downloaded the Linux x64 package, and, got the file named jre-8u261-linux-x64.tar.gz.
From my terminal I ran the following command; $sudo cp jre-8u261-linux-x64.tar.gz /usr/local/src to copy the file to the /local/src directory.
Inside the src directory I decompressed the package using$ sudo tar zxvf jre-8u261-linux-x64.tar.gz and got the directory jre1.8.0_261
No further instructions were given on installation and the JRE doesnt seem to be installed.
Perhaps you needed to unpack it into the usr/lib/ Try to do as in this video: https://www.youtube.com/watch?v=Zp10aJqj51M
jdk 8 includes jre, so if you don't want to install open jdk follow the instructions in the video

JDK 1.8 not being installed, only JRE on Windows

I'm trying to make a Spring application with Kotlin and stumbled in a problem with the problem Unsupported major.minor version 52.0 on class KotlinJpaSubplugin. I went to Oracle's site to download JDK 1.8 (https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html). The problem is, the installer only installs the JRE and not JDK. I'm not very good with java versions, so what I'm missing?
Here is an image of the java folder in my PC. Only JRE 1.8 is installed, the only JDK is the old 1.7.
The link you've provided is correct.
You've most likely downloaded one of these items:
Windows x86 201.64 MB jdk-8u202-windows-i586.exe
Windows x64 211.58 MB jdk-8u202-windows-x64.exe
Something you can do:
Make sure to check both 'Program Files\Java' and 'Program Files (x86)\Java' folders. By default JDK should be installed there.
Use OS level search, to look for 'jdk1.8' or '1.8.0' folders
In case you're still missing it, you can try to manually extract the JDK folder from installer - https://stackoverflow.com/a/25384578/3523579
For whatever reason, Windows x86 202.73 MB jdk-8u221-windows-i586.exe only installs a jre. get Windows x64 215.35 MB jdk-8u221-windows-x64.exe which will install a JDK folder.

NetBeans 8.1 Activation Failure

I am trying to install NetBeans 8.1 on my Ubuntu 14.04.3 LTS. When I try to create a new project, it shows an error, saying that "not all requested modules can be enabled". I tried activating it from the plugins, but to no avail.
Why is this happening, and what can I do to resolve it?
I had the same problem with NetBeans 8.1 on Linux Mint 17.2 and I found the solution (during install a have chosen wrong JDK directory).
If a compatible JDK installation cannot be found, you might need to manually add a path to the JDK installation directory by doing the following:
Open the netbeans.conf file located in the netbeans/etc directory in a text editor.
Enter the location of a compatible JDK installation for the netbeans_jdkhome option. The default location in Windows is C:\Program Files\Java\jdk1.7.0_67 or similar.
In my case: /usr/lib/jvm/java-8-oracle/
Save the netbeans.conf file and run the executable file in the netbeans/bin directory.
https://netbeans.org/community/releases/81/install.html#install_zip
Just in case, I solved this just by commenting out the following line;
netbeans_jdkhome="/usr"
To
#netbeans_jdkhome="/usr"
Edit:
The directory of the above code is inside the file ~/netbeans-8.1/etc/netbeans
1) uninstall Netbeans & download JDK 8 http://www.oracle.com/technetwork/java/javase/downloads/index.html from Here
2) Extract JDK to /home/username/
3) Download Netbeans https://netbeans.org/downloads/
4) Install Netbeans from terminal follow this tutorial
5) Installation asks jdk location then browse to /home/username/jdk1.8.0_91
problem solved.....
I had the same exact issues,what I have done is :-1
uninstall net-beans,
2.I already have Oracle Java 8 installed.
3.install net-beans back and make sure to select Oracle Java 8 jdk during the installation .
Make sure that right JDK directory chosen in the installation wizard if you not sure you can change it from C:\Program Files\NetBeans {netbeans version}\etc you will see a file which is netbeans.conf edit it(I am using Notepad++ for that) At the bottom of the file, you will see a line netbeans_jdkhome="C:\Program Files\Java\{jdk directory you want}" make sure it is valid JDK and it is JDK, not JRE

JRE and JDK intalled but Eclipse doesn't starts

I have installed JDK and JRE.
I just downloaded ADT PLUGIN x64 and x86 in my Win 8 pro x64.
But when I start Eclipse, it still says "A JDK or JRE is necessary to run Eclipse....not found in your PATH..."
I added the PATH to bin directory of JDK too but It did not work.
possibly can have your jdk and jre duplicates. For safety uninstall completely and install again. As a recommendation works with the JDK and JRE for x86.
When you have them installed correctly added in the Windows environment variables JAVA_HOME the direction of JDK folder.
for example
JAVA_HOME = C:\Program Files(x86)\Java\jdk1.6.0_23
The problem is that Eclipse does not know where to find your JDK.
The easiest solution is to go into your Eclipse installation folder and edit the eclipse.ini file so that the top line contains
-vm
C:\Program Files\Java\jdk1.7.0_40\bin\javaw.exe
or wherever your JDK is located within your system.

sdk bundle install java error

I have tried to install sdk bundle on windows 8 64 bit and windows 7 64 bit machines.
After unpacking to c:\development dir I try to run te eclispe.exe from \adt-bundle-windows\eclipse and I get same error for both:
![error message][1]
"a java runtime enviroment JRE or JDK must be available to run eclipse. No java virtual machine found in c:\development\adt-bundle-windows\eclipse\jre..."
There is no jre directory in the installed c:\development... therefore the error.op
I tried installing java manually to the eclipse directory but it did not create a jre directory so error came up the same.
My understanding from the install instructions is that everything needed is provided in the "bundle"!
What am I missing? Why is the java stuff not there?
If you have the JRE installad on your machine, then go to Properties of my computer > Advanced tab > Select Environment Variables
Then in the section of System variables, look for the variable "Path" and edit that, and add you JRE path there with a semicolon.
like
";C:\Program Files\Java\jre7\bin"

Categories