I'm trying to determine if java programs I write will run on a user's computers that may have only Java 8 or Java 11.
On my Windows 10 laptop, I have 4 Java versions installed; jdk1.8.0_281, jdk-12.0.2, jre1.8.0_311, and zulu-11.
Querying the java version in the command prompt yields
openjdk version "11.0.13" 2021-10-19 LTS
OpenJDK Runtime Environment Zulu11.52+13-CA (build 11.0.13+8-LTS)
OpenJDK 64-Bit Server VM Zulu11.52+13-CA (build 11.0.13+8-LTS, mixed mode)
The Apache NetBeans IDE shows I have Java Platforms 1.8, 11, and 12. 12 is the default.
If I build a small System Info application (using System.getProperty("java.version")) with Java 8 or 11 platforms and run it within NetBeans, it reports
This computer is running Java version 1.8.0_281
or
This computer is running Java version 11.0.13
However if I run the program from Windows (outside NetBeans) it reports
This computer is running Java version 12.0.2
I'm confused.
Related
I'm beginner with java Eclipse and i have to deploy a program (i recovered) on machines which are differents than the one i use to compile.
I have a dev PC : win 10 / 64 bits / java 10 / jdk & jre 8.271.
The program works fine under Eclipse environnement.
java version command returns :
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
Now I have to execute this program on win 7 / 32 bit / java 8(previously installed) machine.
I understood that 32/64b difference shouln't be a problem but mostly the java version.
The source code is compiled and packed with launch4j & inno setup to create an installer .
buildsetup.xml uses kind of reference:
<property name="javac1.8.0_271" location="C:/Program Files/Java/jdk1.8.0_271/bin/javac" />
<property name="versionJAVA4JAMIE" id="versionJAVA4JAMIE.prop" value="jre1.8.0_271" />
Java build path of Eclipse project contains JRE sytem library 1.8.0.271
that i don't know is if the installer contain java 10 for the target or if it is independant.
and also if java 10 is compatible with win7/32bit because i didn't see it on oracle website.
If not, does a java 10 unstallation and java 8 installation could be sufficient or have i to reinstall eclipse after java 8 ?
thank you
I installed Netbeans today, and downloaded java JDK yesterday.
When i try to create a new project it douse nothing. I checked if i have java JDK in the terminal by typing
#Terminal
java -version.
#Output
openjdk version "10.0.2" 2018-02-17
openJDK Runtime Environment (build 10.0.2+13-Debian-1)
openJDK 64-bit Server VM (build 10.0.2+13-Debian-1, mixed mode)
I have:
#NetBans File
netbeans-8.2-linux.sh
#Java JDK
jdk-11.0.1_linux-x64_bin.tar.gz
Netbeans 8.2 isn't compatible with Java 10. Download the latest version. The support to Java 9 and 10 was added in Netbeans 9. You can see more here:
http://netbeans.apache.org/download/nb90/
I've always used a Mac and don't remember encountering this in the past so I'm not sure what I'm doing wrong. Theres a bit of q's on this on the internet already but I didn't find a solution yet for me.
I just got a new mac and I'm trying to use rJava & h2o specifically. Below is a couple of things I ran and the output from them. Can someone help me out?
Java --version
java --version java 10.0.1 2018-04-17 Java(TM) SE Runtime Environment
18.3 (build 10.0.1+10) Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)
Javac --version
javac 10.0.1
/usr/libexec/java_home -V
Matching Java Virtual Machines (2):
10.0.1, x86_64: "Java SE 10.0.1" /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home
1.8.0_171, x86_64: "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home
/Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home
Sys.getenv('JAVA_HOME')
"/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk"
library(h2o)
h2o.init()
H2O is not running yet, starting it now... Error in value[3L] : You have a 32-bit
version of Java. H2O works best with 64-bit Java. Please download the
latest Java SE JDK 7 from the following URL:
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
I definitely have the 64 bit of java installed as I re-installed it to be sure and see above the x64 notification from the output. Also, I have gotten this to work on another computer and so I don't understand what is going on with this one.
I also did
vim ~/.bash_profile
EXPORT JAVA_HOME = "/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk"
but this doesn't seem to help me target the Java 8.
You have various problems.
H2O currently does not support Java 10 (that you are using). You need to use Java 8 or Java 7.
Supported versions include: Java 7 or later.
Note: Java 9 is released, but is not currently supported.
Java 9 support will be added in an upcoming version.h2o website
For rJava on Mac I send you to
Loading rJava on Mac OS High Sierra
I am running h2o on a mac with high sierra (and rJava, for a different project) with R v. 3.4.4 and Java 8. All good.
I want to make a python-android-app using this software. I have installed java JDK, when i run java -version i get:
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
However running the line python android.py installsdk from witin rapt directory (as described in the tutorial) tells me that i have no JDK:
I'm compiling a short test program, to see if you have a working JDK
on your system.
I was unable to use javac to compile a test file. If you haven't
installed the Java Development Kit yet, please download it from:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
The JDK is different from the JRE, so it's possible you have Java
without having the JDK. Without a working JDK, I can't continue.
You need to set your jdk to be accesible, and within path / java home :)
Here help from google:
To set JAVA_HOME environment variable, do the following: Launch
Terminal by pressing Ctrl + Alt + T on your keyboard. Depending on
where you installed your Java, you will need to provide the full path.
For this example, I installed Oracle JDK 7 in the
/usr/lib/jvm/java-7-oracle directory.Aug 13, 2012
I'm having a problem of installing java SE runtime 6 on mac, without that, I can't open my eclipse or install Intellij. However, I download the .dmg through an Apple - Java link, but it just doesn't install!
And there's no error message, just the page of falling installation.
I really don't know how to solve it.
This is kind of an update of my problem... I used to have Java SE runtime 6 and tried to install jdk 1.8 and failed. Same picture appeared. Just said failed installing with no error messages. I guessed might be a conflicts? and deleted Java 6 and basically can't run eclipse & Intellij (this solved thought) I still have java 1.7 here.
I just can't figure out why I can't install (or reinstall) java 1.6 or java 1.8. What could be the problem?
Some system updates:
if I do: "which java":
/usr/bin/java
if "echo $JAVA_HOME":
/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home
if java -version:
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
What could be possibly wrong?!!!????
God
You need to get Java directly from Oracle (http://www.oracle.com/technetwork/java/javase/downloads/index.html) as Apple stopped supporting Java some time ago. Unless you have pressing reasons for using Java 6 I suggest also installing at least Java 7, although you can have all three versions installed and select the appropriate version for the app you want to run/develop.
Edit Also, if you want to use Eclipse or IntelliJ (go for IntelliJ) you want to get the JDK and not the "runtime" (JRE).