JRE included in JDK cannot be used as public JRE? - java

So I installed the latest Java SE Development Kit (jdk1.8.0_112) that come with JRE (jre1.8.0_112) so I notice I now have two JREs one I got from java.com (jre1.8.0_111)
So what I did is I uninstalled the (jre1.8.0_111) but then when I tried to visit java.com to verify if my JRE is working it seems like it does not work. it just ask me to download it which is the version (jre1.8.0_111).
My question is does the JRE included in the SDK is for development purposes only? and is different from the JRE the end users get??

both JRE foot prints are same. only difference is additionally you get development libraries(+ JRE) with JDK(java development Kit) as opposed to standalone JRE installtion

My question is does the JRE included in the SDK is for development purposes only?
No.
and is different from the JRE the end users get??
No.
What has actually happened here is that your web browser's Java plugin apparently cannot find the previously configured Java installation anymore. The "verify" page is checking that the Java that your browser is using in its plugin is the right one.
If you don't have Java enabled in your browser (wise move!!) then it doesn't matter that it won't work (!)
If you do need the browser's Java plugin to work, the I suggest that you uninstall the JDK and reinstall it. If that fails, you will need to dig deeper to find out why the plugin is not working.

Alright, so reinstalling the SDK didn't actually solve my problem but I think I figured out what's wrong. So the JDK that I downloaded is for 64bit windows thus it includes 64bit JDK and JRE BUT the browser that I am using is 32bit! which is why it needs a 32bit JRE to run Java. So basically I need 32bit JRE for it to work on my browser.
(by default internet explorer and firefox uses 32bit regardless if u have 64bit OS, but u can freely switch to 64bit if you want but not recommended since some web content may not work properly in a 64-bit browser - got this info from this link)

Related

How get a Mac JRE (on linux) that is ready for embedding?

For years I have distributed a piece of software that relies on javafx, and the solution has been to include a JRE in the distributed software and run my .jar file with a script that sets JAVA_HOME. It has worked great.
The Mac version has always been a challenge: I have to download the .dmg from java, unpack it, and tweak the script for (historically) a different directory structure (which may be an artifact of the .dmg packaging, I don't know). But it always worked. (I do this on Linux.)
I recently updated the included JRE to the latest version (1.8.0_291) and it no longer works on the Mac, even after I corrected for the new directory structure. Users report that the script errors with:
Error: could not find libjava.dylib
Error: Could not find Java SE Runtime Environment.
...and indeed, there is no libjava.dylib. In the previous Mac JRE version I was using (1.8.0_92) this file was at:
lib/jre/Contents/Home/lib/libjava.dylib
...but it is not present anywhere in the latest. I also note that the latest JRE totals 107 MB, where the older one was 164 MB, so it would appear that there is something I'm not understanding about these more recent JRE downloads. E.g. perhaps the mac version requires an installer to run to be complete?
Where can I download a distributable Mac JRE?
Failing that, what is the proper way to make a contained Mac JRE?
It appears that AdoptOpenJDK is a good general way to go for multi-platform pre-built JREs, but they do not include JavaFX.
I attempted to use OpenJDK in conjunction with libraries from OpenJFX from openjfx.io, and although my application superficially worked, there were very many exceptions implying poor compatibility between the two. (I was unable to match versions precisely for JDK 11. It's possible that the latest version of both (JDK 16) might interoperate better.)
I found the Liberica JDK from BellSoft. Their "Full JRE" includes javafx and is working. I do get one swing-related exception on startup, but it doesn't seem to matter to functionality.
Apparently there is also the Azul platform, but I have not investigated it.

JRE Missing when installing eclipse

So I'm trying to install Eclipse IDE for Java on my main pc.
I had no problem installing it on my laptop but when trying to install it on my PC I get JRE Missing webpage.
I've installed the JDK and JRE and they are both working. I could use some advice.
i also had the problem with eclipse and the JRE.
Try to delete the 2 Java versions and deinstall eclipse.
then install the JDK first and seccond the JRE. after the 2 installations install the new eclipse version(in the installer you chan choose between some installations take the first).
i hope I can help you.
Unless explicitly told in eclipse.ini Eclipse uses the system wide java command.
Easiest for you right now is to install a system wide JRE (same 32/64 bit flavor as eclipse).
I had the same issue. It was happening when installing different match of JDK version (11 in my case), with JRE (8 in my case).
So, in order to have this installation of Eclipse working make sure that you have both JDK and JRE referring to the same version. Installation will not work if they have different versions.

What happen to my pre-installed JRE when I download a JDK?

I am just interested, as far as I know if you want do some Java programming, you will need to download a JDK. As part of the JDK, it comes with the JRE. However, I think most Windows OS has pre-installed JRE already. I have several questions:
Does this mean this pre-installed version will get overwritten by the freshly downloaded and installed JRE?
Does a JRE have a version e.g. JRE-7,JRE-8?
If there is version for the JRE and the pre-installed JRE gets overwritten, does that mean there is a risk that some old applications will not work anymore?
1) This depends on your installation directory choice.
2) JRE is just a runtime part of the JDK (no compilers and tools) and thus is has the same versioning scheme as JDK.
3) Java is developed in the way that guarantees backwards compatibility. However you can get incompatibility problems with tools like Maven or libraries like JAXB.
Go to the Windows control panel, click Java, click the Java tab and then View. You will see all of the versions of Java that have been installed.

Error: jdk1.7 or higher needed to run Google plugin for eclipse

I have been trying to make this work all day long but there seems to be no end to my frustration. I want to use Google App Engine for my android application. I have downloaded the jdk 1.7 u51 but still whenever i start the eclipse ADT, a dialog box appears saying that jdk 1.6 is in use; jdk 1.7 or higher needs to be installed. I have set the path in the preference to jre inside the jdk 1.7. Also, the app engine SDK path shows the error "Failed to initialize App Engine SDk[path]". I have referred all the threads here and over the internet relating to this issue and have tried all the proposed solutions but to no avail. Any help would be greatly appreciated.
versions
eclipse 4.2(ADT)
JDK 1.7u51
App Engine SDK 1.8.9
Try uninstalling the old java version, and making sure that the latest version is the only one installed. Another problem might be if you have a 64-bit computer, you may have the older version installed to one program files, but Eclipse is looking through the x86 program files and not finding the correct version(or vice-versa). You may also want to set your PATH and CLASSPATH.
Type
java -version
javac -version
into the command prompt, and it will return with what Java you have installed.
If all else fails, try reading https://developers.google.com/appengine/docs/java/gettingstarted/installing for more information and see what went wrong.
You must have matching architecture for Eclipse and JDK. If you are using 32-bit eclipse, then use 32-bit JDK else use 64-bit versions of both.
Everything else will fall in place automatically
I am using Indigo and found this forum thread to do the trick.
To your eclipse.ini file add
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_WHATEVERTHESUFFIXIS/Contents/Home/jre/lib/server/libjvm.dylib
Note the suffix "lib/server/libjvm.dylib" which is not what you use for later versions of Eclipse. (For them you link to "bin/java".) This needs to be above any "-vmargs" flags in eclipse.ini.

Do I need JDK or only JRE?

I use Solr in my website, and now I am about to configure my VPS account.
I am at the stage where I need to install java in order to make Solr work.
Now, I only plan on running solr, and using it as it is (I have no java programming skills at all), so my Q is, do I need the entire JDK which includes JRE, or is JRE enough?
Thanks
BTW: My server OS is Linux (ubuntu 9.10).
Thanks
To only make it run JRE is sufficient.
However in development environment having a JDK is useful cause with it comes bunch of handy tools for profiling/monitoring the application.
In a production build while packing consider just the JRE.
This FAQ explains when a JDK is needed instead of just a JRE.
You need the JRE only. If you do use the admin screens you will however need the JDK as these are servlets.
Installing Solr just need JRE which is Java runtime environment, you require JDK if you intend to compile the java programs. Although, installing JDK gives you JRE as well but that is something which is not required by you.
Just install JRE and you will be good to go. For more details on difference between JDK and JRE, use following link:
Which one to download: JDK or JRE?

Categories