Configuring JRE in AIX without installp - java

Is it possible to configure JRE in AIX without using installp.
By simply downloading the archive file which contains a complete java directory (like in windows).
And later on, setting environment variables like JAVA_HOME in os (if required).
If yes then please provide me link where I get that archive of jre.
If no then please suggest me to install jre in AIX without overwriting the previous version of java (which is already install in machine)
and environment variables related to installed java.

The only provider of JDK/JRE for AIX is IBM. And as far as I know the only format they provide is in package (to be installed with installp). And AFAIK you can't install it on different place. Moreover this installation will update probably your current installation. And of course will keep all your settings

Related

JAVA_HOME path required to be updated after each update of JDK/JRE

In the windows environment variable the JAVA_HOME path needs to be updated after each time upgrading the JDK/JRE. Is there any solution for this to maintain the default path for JAVA_HOME irrespective of the version it gets upgraded?
Let me know if anyone has any solution for this.
we tried of setting the new path while installing the JRE, even this path changes after upgrading the JRE.
By default, (Oracle) Java installers for Windows put the installation in directory whose name matches the Java version and patch number; e.g.
C:\Program Files\Java\jdk1.6.0_30
This allows you to have multiple different versions of Java installed. That's a good thing because a lot of applications require a particular Java version. And to that end, you probably want to use different Java versions for different applications.
However, if you want a default version that you can easily change without changing lots of classpath settings in lots of places, the obvious way to do it is to use a symbolic link or symlink. For example:
C: Program Files:
Java:
jdk1.6.0_30:
...
jdk1.8.0_77:
...
default -> jdk1.8.0_77
Then your use C:\Program Files\Java\default\bin in %PATH% and C:\Program Files\Java\default in %JAVA_HOME%, and similarly change any -cp options in batch files, etc.
Once you have done all of that, you can switch to a different default Java version, by simply updating the target for the default symlink to a different installation directory.
Note that Linux has a more sophisticated way of doing this using the alternative utilities. But under the hood that is all done with symlinks.

What java installation folders can I get rid of?

My machine runs Windows 64 bits. I have multiple IDEs installed (eclipse, intelliJ, qt creator, visual studio) and I daily run some work applications that use java (vpn connector being the most important one).
Usually, when I get a java update notification I just accept and everything runs smoothly, but today I found that Eclipse is not starting because of exit error 13, which I read is caused by 32-bit/64-bit conflicts between Eclipse and Java. When I checked my java installation folders, I found out I have multiple folders, both for 32 bits and 64 bits:
I'm not even sure how those JRE folders ended up there, since I only download the JDK when I have to. Maybe they are the JRE installed with JDK but not sure.
Anyway, this is my 32-bit JAVA folder:
And this is my 64 bit-JAVA folder:
How can I get rid of all of those safely, download and install the latest JDK afresh and have everything running smoothly?
Thanks :)
The safest way remove Java installations on Windows is to run the respective uninstaller via the control panel. In addition to deleting the installations themselves, the uninstaller will (should) remove related entries from the Windows registry.
As other answers note, you would still need to ensure that the JAVA_HOME environment variable is updated to refer to the new Java installation, once you have installed it.
However, the problem with uninstalling copies of Java that you didn't explicitly install yourself is that you may end up breaking tools and applications that depend on those copies. If the tools use JAVA_HOME you should be fine. Otherwise, you might need to modify launcher scripts, etcetera.
If you are worried about this, you could rename the Java installations that you intend to remove, launch each of the apps, and see which of them breaks. (Then rename the Java installations back ...)
I had a problem like this before (with a lot of version and JDKs installed).
The best way is just to delete everything and download it again, i know that it isn't the best solution and it will take some time to download and install everything again but it worked for me before.
It does not matter how many jdk/jre folders you have. Just make sure environment variable JAVA_HOME and JRE_HOME points to the 64 bit jdk and jre folders correspondingly. You can remove other folders which are not pointed. The other applications may break after this change. You can fix them by pointing to this JAVA_HOME.
Refer this for setting JAVA_HOME env variable

How to install multiple versions of JDK without destroying current settings?

I'm on an Ubuntu Desktop that is set up with JDK 1.6.34 and everything works great. I'd like to install JDK 1.5.11 in such a way that my environmental variables, etc. don't get "blown out" by the installation of 1.5.11.
Is this even possible? Can the same machine have 2+ JDKs installed on it? If so, what are the necessary steps one needs to take to achieve this?
Yes, you can install as many JDK's on a machine as you want. As for "blowing out" environment variables, this is how you control which jdk you'll use (i.e. make sure the desired jdk's /bin directory is first in the path and that JAVA_HOME points to the JDK you want to be using).

download jdk1.5.0_18 source code

I'm looking for the JDK source code for Java 1.5 update 18 (on win XP). I don't want to install a JDK, I don't want the source code for the entire VM, just the source for the JDK libs, so that when I navigate to a Java class in Eclipse, it opens up the source code.
Is it possible to download just src.zip (or a zip that contains src.zip)? I don't want to install a new JDK/JRE just to get access to src.zip as I'm concerned that this will have undesirable side-effects such as modifying JAVA_HOME.
Thanks,
Don
The best place to go to get old versions of Java stuff is the Archive page. JDK 1.5.0_18 is there.
However, I don't think it is possible to download just the source code ZIP file. But hey, you could always get a friend to download the relevant JDK and copy it onto a CD/DVD for you.
EDIT re your concern about environment variables being changed.
Installing a JDK does not modify the JAVA_HOME environment variable or any other environment variable. Indeed, the JDK / JRE installation instructions explain that you need to update JAVA_HOME and PATH manually.
Sun have always been careful to allow you to install multiple JDK/JREs side-by-side. The only thing of that nature that gets changed by the installer is the version of Java used by your browser's Java plugin. And that only changes if you give the installer permission to change it!!
Below is the source for the latest JDK 1.5 but it seems difficult to find update 18 specifically, at least there is no obvious link :-(
http://java.sun.com/j2se/jrl_download.html
Only place I know of that you can get them is with the JDK. You can grab it here
Installing it shouldn't modify JAVA_HOME
http://download.java.net/jdk6/source/
Is that what you want?
Download the JDK for the release you want to use, and install it.
Then start Eclipse and go to Window -> Preferences -> Java -> Installed JREs, and Add the JDK you just installed, and ensure it has the checkmark!
That should do it (and it doesn't mess with the default java versions and JAVA_HOME and all)

How can I compile Java code in Windows without installing the whole JDK?

Let’s say the runtime environment (version 1.6.0_01-b06) is already in place, but since I lack administrative privileges in this particular PC, the JDK can’t be installed. So, is there any portable JDK or standalone Java compiler for Windows that doesn’t require installation?
You might try taking the tools.jar file from the JDK (you would have to copy it over from another machine) and see if that worked.
javac is essentially a small exe that starts the VM with the specific class for the compiler.
Also, there is nothing (that I am aware of) about the JDK install that you couldn't do with a copy of it from another machine. So get on a machine you can install the JDK on, install it, and then copy the files to a place on the machine that you lack the rights to and it should work.
You don't need to install JDK. Just copy it over from another machine, and set PATH to %jdk%/bin and JAVA_HOME to %jdk% (actually, only PATH is often enough). I do it all the time.
Eclipse works very well. being a portable ide, it will use it's own jdk. I personally use jGrasp w/ the jdk's folder as a PATH when I'm trying to write something quick.
You can try Jikes.

Categories