Quantcast
Channel: openSUSE Forums
Viewing all articles
Browse latest Browse all 40713

Scripting Help needed for Install Oracle Java

$
0
0
After banging my head against this specific issue for nearly a day, I'm hoping other eyes can see what I can't seem to see.

Original Documentation

http://en.opensuse.org/SDB:Installing_Java

Issue:
The original documentation takes a lot of time to implement. My original install was done by modifying and pasting into an admin console.
After facing having to do all again in another machine, I decided I wanted to script the hundreds of commands in the original documentation, hopefully into 6 individual scripts, more or less

Scripts can be downloaded from here
Simply clone my github repo (or fork if you wish), the following command downloads everything to your local machine
Code:

git clone https://github.com/putztzu/openSUSE_Oracle_Java_Install.git
For Alpha Testing (recommend in a virtual Guest but it's up to you)
Requirements (for now)
64-bit openSUSE (13.1 preferred, but likely works in any version of x64 openSUSE)

Basic changes and description from the original documentation:
The scripts should be OK to run from anywhere, there is no need to run from any speciic directory.
The scripts should be run from a root console instead of the sudo used in the original documentation.
The original documentation is based on the TAR but there are good reasons to use the RPM instead so that is what I'm basing on.
I've programmatically accomplished some steps which in the original documentation was done with individual commands, in particular compressing the MAN pages and creating symlinks from the Oracle source files to the /usr/lib64 directory which does a complete job. The original method was not only time-consuming it was incomplete (maybe some files were added after the openSUSE documentation was created

Basic steps:
Download current Oracle Java RPM from the Oracle website.

At the time of tis writing this is jdk-7.0_51 and the scripts reference specifically this.
Install the Oracle RPM
Code:

zypper in jdk-7u51-linux-x64.rpm
Run the scripts in a root console.

As described in the README, the first 5 scripts should work just fine. So the main parts of Oracle Java can be successfully configured in update-alternatives at present. Maybe even web browser support (I haven;'t tested but probably is OK).
The PROBLEM, script 6
But, I'm having a bear of an issue getting the sixth script to run. I've posted the two versions of the script I've tried to create... one based on script 4 which runs successfully and the other based on the formatted command as described in the original documentation.
I recommend running each in your own environment for testing, they each attempt to install javac into update-alternatives but will fail without leaving anything behind.

Of course, the results will be offered to the original documentation or if rejected posted as an alternative approach.

Comments/corrections can be posted here as well as in the github repository "issues"

TIA,
TSU

Viewing all articles
Browse latest Browse all 40713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>