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
Related
I have installed JDK in Mac OS.
I am trying to install Apache2,
sudo apt install apache2
Output :-
Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/bin/apt" (-1)
But, executable file is present in /Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/
$find /Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home -name java*
/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/bin/java
/Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/bin/javac
I have installed JDK in Mac OS.
Well, apt is not an MacOS command for package installation. Wherever you copied those instructions from was for Debian/Ubuntu, not Mac
If you want to install Apache HTTPd on Mac, I'd recommend using Homebrew or Docker. And if using Docker, you don't need Java installed on your Mac
You are not querying for the file they are asking home/bin/apt
If you look in your folder you will not find this file most likely.
Try installing an older version of the sdk.
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
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.
Mac OSX 10.11.14 (El Capatin) does not ship with Java, either the complete development kit (JDK) or the run-time environment (JRE). My need was to just run a .jar file and not for complete Java development. So I downloaded the JRE from here, which is a much smaller file compared to JDK (quite obviously).
This SO answer says that JRE is enough to run jar files.
After installation of JRE I couldn't locate the directory where installation happened or run java command to execute files on my mac. How do I run jar files now?
To run java application you can either use
/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
or (as you found)
/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
In any case, if you need to run java often, you should set JAVA_HOME in either your ~/.bash_profile or ~/.profile and amend the PATH to include the bin directory.
After JRE installation, the correct path is:
/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin
But now, how do I run the java command? It seems like the java file located in the directory above is not an executable.
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