packaging program for win7 /32 / java8 - java

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

Related

Java version - compile libraries versus JRE

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.

Java issue with h2o - not recognizing java version

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.

Why is Java installed in (x86) folder?

I installed new Java from https://www.java.com/en/ but I am little confused about where installer store the java folder. It is stored in Program Files (x86). I don't understand what it means. I would like to to use 64-bit architecture. Why is it installed in (x86) program folder? Is that mean I am using 32-bit java?
Yes, it appears that you have installed the 32 bit version of Java. You can verify this by opening a Command Prompt, changing to the bin directory of the Java install, and typing:
java -version
If you are running 64 bit Java 8 you would see something like this:
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode)
You want to download the Windows version which is labelled Windows x64.
Here is a link where you can download it.

Unable to install Java Runtime (6) on Mac

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).

Java version cannot be recognized on java.com

Recently reinstalled system and meet interesting problem. I installed java jdk8, however when I try to verify version on java.com it asks to install java. Meanwhile:
java - version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
echo %JAVA_HOME%
E:\Programms\Java\JDK8
echo %JRE_HOME%
E:\Programms\Java\JDK8\jre
echo %PATH%
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Wi
ndows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;E:\Pr
ogramms\Java\JDK8\bin;E:\Programms\Java\JDK8\jre\bin;
Java Control Panel > Security > Enable Java content in Browser is checked
Why browser and java.com does not recognize my java instalation? Java plug-in is not included in jdk?
I suspect that you need to install the JRE rather than a JDK using the Windows installer at (java.oracle.com).
This should set up everything properly.
Posting comments as an answer as per request by Yarh:
Probably the browser is 32 bits, then indeed there are not going to be any Java plugins installed in it if you installed the 64 bits Java runtime as part of the JDK. I always install the 64 bits JDK and then separately I install the 32 bits runtime through java.com (minding not to install the flipping toolbar).
There is no conflict to install both a 32 bits runtime and a 64 bits runtime, that is the advised way to support all types of browsers.

Categories

Resources