What would be the use case of installing IBM Java on a Linux machine? We tested our application on Linux using Oracle Java but one of ours customers installed it on a machine which only has IBM Java and the application gives errors for some missing classes and jars.
I'm assuming that the IBM java would probably have been installed because some IBM products mandate use of IBM java but this should not be a deterrent to install Oracle Java in addition to IBM java. Is my understanding correct?
Please share your thoughts.
I believe IBM doesn't ship its Java as an independent package -- so, yes, if IBM Java is present it's because an IBM product was installed that came with the IBM Java environment. (IBM supports Java on some platforms Sun doesn't; I believe the reverse is also true -- I don't think IBM bothers producing its own Java for Solaris, for obvious reasons.)
There's no problem having multiple Java's installed, each in its own directory. In some Linuxes, the alternatives mechanism can be used to select which Java is the default when you type java at the command line; in others, you would have to manually change the path or adjust symbolic links appropriately (the later is what alternatives does semi-automagically).
If you're working in Eclipse, its configuration menus will let you pick which installed copy of Java it will use to execute/debug applications, either on a workspace-default level or per launch.
(I have something like eight JREs/JDKs installed on my Red Hat machine -- a mix between Sun and IBM. Some are for my own use, for testing code for compatibility or trying to reproduce customer bug reports. Some were installed because a particular tool shipped with its own JRE rather than risk possible incompatabilities with another version; that's the only reason I still have a Java 1.5 JRE installed, for example. It's an annoyance, and it slightly belies Java's original promise of "write once, run everywhere", but it does work.)
There is nothing stopping you from having multiple installs of Java on a single linux system. However when running your application, you need to make sure that you are using the oracle version of java and not the IBM version.
which java
and
java --version
can help you find which version of java you are using.
Java is usually installed under /usr/lib/jvm or something similar to that. Checking there can help you find which java installs you have available.
You are correct that IBM java comes with IBM product installation - IBM does not ship their Java as standalone product. However, they provide provision to download their JRE for Linux from developerworks.
Ideally product running on Oracle JRE should run on IBM JRE and vice versa. However, to ensure that each product on the system runs on the JRE they are tested on, set java home properly for respective products. In case both the products use the same system-wide environment variable (which should not be the case anyway) - you may need to tweak your product settings so it does not break any IBM product running on the system.
As long as you properly isolate multiple JREs as used by different products through product/system property settings, there should not be any issue.
Related
I want to make a Mac Application using Java code I wrote, and I want to make it that the person using it doesn't require Java to be installed on their own computer.
Is there a way to create a Mac Application so it can run on any mac, whether they have Java installed or not?
Either bundle a JVM or compile native
You have a choice of three ways to deliver a local Java-based app to a Mac user.
User installs a JDK or JRE on their machine. (Or I.T. sysadmin person does so.)
App comes bundled with a JVM for a specific OS and specific chip architecture.
App is compiled to native code for a specific OS and specific chip architecture.
Install JDK/JRE
In a controlled environment such as a corporation or school, it may be practical to install a JDK or JRE on every Mac. If you are writing JavaFX apps, you could install an edition of a JDK/JRE that comes with the OpenJFX libraries.
Your Java app can then execute by using the already-installed JVM.
By the way, in such a controlled environment, OpenWebStart is a way to deliver and launch a local Java app by using the convenience of a web browser.
In contrast, Oracle has abandoned the approach of expecting common consumer machines to come equipped with Java pre-installed. For details, see the Oracle white paper, Java Client Roadmap Update. So expecting individuals to have Java installed is not practical.
Bundle JDK/JRE
You can build your app in such a way as to include a JDK/JRE for a specific kind of machine, meaning a specific operating system and a specific chip architecture.
For Macs, that means you need one build for Macs with Intel (x86) chips, and another build for Macs with Apple Silicon (ARM, AArch64) chips. You would need to to either supply two separate versions of your app, one for each child, or perhaps a “fat binary” that includes two JDKs/JREs for both chips. The fat binary approach was supported by Apple (and its originator, NeXT Inc.) in previous chip transitions, but I’ve not verified is this is the case now in the Intel to Apple Silicon transition.
Modern tooling helps with embedding a JDK/JRE. See jlink and jpackage. See Packaging Tool User's Guide. As of Java 9, the Java Platform Module System enables including only the parts of the JDK/JRE actually used by your particular app. Unused parts are omitted, making for a smaller-sized final app artifact.
Compile native
The last way uses GraalVM technology to compile your code to native code specific to the targeted runtime machine. Instead of compiling to bytecode for a conventional JVM to interpret and optionally JIT-compile at runtime, full compilation to native machine language is performed when you build your app. This approach is cutting-edge, perhaps bleeding-edge. So research carefully and test thoroughly if you dare to consider this novel approach.
With both of the last two approaches, you have the option of distributing through the Apple App Store.
You don't need JDK to install on the client machine but as we know java converts the program into bytecode and a java compiler is needed to compile that bytecode into machine language you must install JRE on the client computer whether it is mac or windows or any other operating system
I want to run a Java Application on an Intermec scanner with Windows Embedded Handheld 6.5 Operating System. I used this tutorial.
The problem is I don't know how to run my application on the Intermec scanner.
I downloaded and installed PhoneME Advanced and PhoneME Feature from here.
I searched for JavaFX like in this tutorial, but when I follow the link to JavaFX on the Oracle site, it says it's included in the current JDK, which I can't install ("The file *** cannot be opened. Either is not signed with a trusted certificate, or one of its components cannot be found"). I tried installing the JRE but I get the same message.
Help please?
The Intermec Java installation doc is very outdated and related to IBM WEME, which is no longer be sold for a long time.
The IBM J9 licensing is strange and can only be achieved with a larger number of installations. But you may get a validation copy from microdoc.com
You may go with another JAVA VM like PhoneME or CrEme. JavaFX seems to be discontinued, whereas IBM J9 or CrEme are more or less current and supported products.
Which JVM you choose depends also on your intention. The Intermec Java Datacollection jar will only run with J9. But you can write your own JNI for the native Scanner API.
Why do we have two versions of Java ?
The jdk from Oracle and the one from OpenJDK.
And why is it that
OpenJDK is available only for Linux ?
And on Wikipedia,I find that
Java is open source .But ,I find a copyright information inside the
Oracles JDK saying everything restricted ???
Open JDK is trying to reinvent the wheel by giving you freedom of choice (you can use cool OpenJDK JVM or the mainstream Oracle one)
If something is that cool OBVIOUSLY it's only for linux
that question is out of SO scope, besides I'm not sure myself...
There are many java distributions. Oracle JDK is just the reference one, but others like Open JDK exist. IBM has its own, for example. While they all share the mandatory set of features, each one goes beyond that and implement their own proprietary set. Parts of Oracle JDK are not open source and it requires licensing for embedded devices, and this is why Open JDK exists - to provide a fully free Java implementation. Now, Java, as in "the spec" is open source and most of Oracle JDK is as well. Other companies are allowed to make their own implementations as long they pass Oracle's test that certify compatibility. Still, Oracle owns the Java trademark and I think the ability to certify other implementations. Somewhere there lies in the dispute with Google and their Java implementation (same with now defunct Apache Harmony).
As for the Open JDK on Windows, it can be done by building the sources (like this guy here did). The binaries do not exists probably because there was no demand. It's only Linux that imposes limitations on proprietary software.
Where can I find the headless version of JDK7 for the linux-i586 architectures?
I couldn't find anything on Oracle's page, maybe I am just blind, or there is no such pre-compiled JDK...
The purpose is that I want to port the runtime library of the JDK to a operating system with a custom JVM, and I think this should be the one suiting best for my needs.
AFAIK there isn't a special headless version of Java 7. But you can easily tell ordinary Java to run in headless mode. For example:
java -Djava.awt.headless=true com.acme.project.Main
For more information on headless Java, read this Oracle page:
Using Headless Mode in the Java SE Platform
I would need this version to keep it as slim as possible.
Your only options would appear to be:
Ask Oracle if they can provide you with a special build (for money!!!).
Attempt to create your own stripped down build from the OpenJDK sources.
Beware that the Oracle binary distribution licence forbids you from distributing a JRE produced by "cutting down" a normal one. I don't know if this applies to a JRE that you have built from source code. Read the relevant license agreements carefully.
But my advice would be to just use a standard JRE installer.
I'm trying to get a rather JDK-sensitive piece of Oracle software working with Websphere, and I need to find some particular versions of the IBM JDK to try. The problem is that IBM doesn't really make these readily available like Sun/Oracle does with theirs, and all the versions I've been able to get my hands on haven't worked for one reason or another.
Specifically, I need one of:
IBM Java 5 SR9 for Windows (ideal)
IBM Java 5 SR2 for Windows
IBM Java 5 SR10 for Windows
How could I get these directly from IBM? My company has a support contract for Websphere, and I hopefully could have one of our Websphere engineers download it if I can tell them where to go.
I don't know if this is still true(but this was certainly true in the past), but here is the story.
Due to Java License restrictions earlier, the JDK cannot be provided alone by vendors like IBM.
I am unable to pull this info from any IBM site at the moment but i am pretty certain about these license restrictions in the past.
Here is a post by another gentleman in this space:
From : http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14514070
Unfortunately you can get hold of the JDK only as part of another IBM product (say, Websphere or any Rational product) that you purchased. Our licensing agreement with Sun/Oracle forbids us from providing direct downloads of the IBM JDK on any platforms that Oracle/Sun also support (namely Windows and Linux). If you look at the Java downloads section of the developerWorks website, you'll only find SDKs for AIX, z/OS and Linux on System p/z, since those are IBM owned platforms that Oracle doesn't support.
Since the JDK is shipped along with Websphere/Rational/Tivoli products, you can use it if you already have one of them deployed(though even then you may have SR8 FP1, unless you also install the very latest fix packs for those products).
(Unless you work for IBM) there is no way to download the IBM JDK separately. It's shipped with the IBM Rational Suite of Software IBM develops.
The IBM JDK comes also with IBM Java Profiler (which isn't free).
The Eclipse Platform that is found here https://www.ibm.com/developerworks/eclipse/downloads/helios/#download is similar to the Eclipse download found on the Eclipse Site. IBM makes it easier for those who can't afford WebSphere Application Developer or Rational Application Developer (which are both Eclipse flavour) to use Eclipse.
Currently, (July 12 2017) you can find the older bundles for java 6, 7 and 7.1 here https://www.ibm.com/developerworks/java/jdk/eclipse/index.html
The latest one can be downloaded from here https://developer.ibm.com/javasdk/downloads/eclipse/
Yes IBM JRE/JDK is typically shipped with products, not stand-alone.
How about you get the WebSphere version that is the target for your activity and install that? Won't that give you what you need? The Single server edition is comparatively small footprint.
Here's a page with some IBM JDKs made available on developerWorks that may be useful to you.
https://www.ibm.com/developerworks/java/jdk/
the SR9 fix pack for WAS V6.1.0.25 is available here - http://www-01.ibm.com/support/docview.wss?uid=swg24023276. Click on the FTP link to download the PAK file (and rename to zip).
Previously I've found that the Eclipse bundles from IBM also contain the IBM JVM. This might still be the case but the bundles are too big for me to check now.
See http://www.ibm.com/developerworks/eclipse/downloads/
I hate to answer with the obvious... but if you have a support contract with IBM, why not just call IBM support? If you haven't seen it already, IBM's main JDK page is at: https://www.ibm.com/developerworks/java/jdk/.
However, the Windows offerings are pretty pitiful. IBM hasn't released a new JDK for the Windows platform since early-2006. That JDK was of the Java 5 generation, but there's no indication on the download page (or in the installer's file name) of an SR version. I can't install it and check for you, because of the other Windows caveat of which I hope you're aware: The IBM JDK will not install on a Windows machine unless the installer detects an IBM BIOS.
Given that IBM sold their PC division to Lenovo, I'm not even sure that it is possible AT ALL to install their standalone JDK on a contemporary box. I would contact IBM support if you have a contract... they might be able to tell you differently.
Either way, the preceding answer points at another possibility. IBM frequently bundles its JDK/JRE, without the crazy restrictions found in the standalone version, inside of other downloads. For instance, I know that WebSphere Community Edition (i.e. IBM's version of Apache Geronimo) comes with one. Good luck finding the specific version you need... but if you do, and don't mind the possibility of violating some license legalese, then you can just ZIP up that directory and copy it to the target machine.
This whole topic is a damn shame. In terms of bechmarks and runtime performance, the IBM JDK/JRE has always been awesome. However, on the larger "ecosystem" level it's always sucked.