shell script : finding out active configuration of java jdk and install bin there.
Dear sir,
i want to find out the active java configuration on ubuntu machine and go to that folder and install jai-1_1_3-lib-linux-i586-jdk.bin i have tried script like, Code:
#!/bin/bash to find out the active configuration there is a command also Code:
sudo update-alternatives --config java Code:
There are 2 choices for the alternative java (providing /usr/bin/java). please help me in this please Thanks & Regards rohaan |
Hi,
I don't recommend manually putting files under /usr/lib, but you can find the location of the default java with something quick and dirty like: Code:
readlink -f $(which java) Code:
update-alternatives --list java |
Quote:
Thanks for your rply n time, really thanks i am in need of installing the "jai-1_1_3-lib-linux-i586-jdk.bin" in to the active java JDK so i have to do this so that if i gave this script to some other PC the .bin should be installed on the their Active java JDK please suggst me changes in my given script i am not that gud shell script writer please and Thanks again Regards rohhan |
HelloOO
anyone please help me in this regards rohaan |
Dear sir,
Code:
readlink -f $(which java) Code:
/usr/lib/jvm/java-6-openjdk/jre/bin/java how to catch the output of the above command while using it in shell script like Code:
#!/bin/bash |
Hi,
this is marked as solved now, and I wonder what your solution was. Did you learn how to set variables in a shell script? Regardless I don't know why you are trying to manually dump that file in that particular location. If you want to install the java imaging api you should probably be using your package manager. Eg Code:
sudo apt-get install libjai-core-java |
Quote:
thanks for rply i find out how we can use that PATH getting from the readlink -f $(which java) and used that path in my script and done with the thing Actually i want it because as i told u i want to give this thing to the another users which may no have net or they should not have to do this apt-get bcz this has to be a part of my application which uses jai as library thanks again really thanks i not that gud at explaining then also u helped thnks regards rohaan |
Hii,
Quote:
Cheers, Evo2. |
Quote:
ohh thanks i wil try thing also regards rohan |
Quote:
i have the jai-1_1_3-lib-linux-i586-jdk.bin file dowloaded how can i make bundle this as .deb and another one is i have two files 1) sun-jai_codec.jar 2) sun-jai_core.jar how can i bundle it as .deb Regards rohaan |
Hi,
don't use the .jar or .bin files, instead download and use the .deb file from the Ubuntu repository. See for example http://packages.ubuntu.com/search?keywords=libjai Evo2. |
Quote:
Your perfectly right in approach but its size is around 5MB for each file libjai-core-java i have to give it with my package so i think it will be better to use this jai-1_1_3-lib-linux-i586-jdk.bin which includes all the functionality of two files sun-java_core.jar and sun-java_codec.jar and its size is also lesser around 3.5MB Thanking you Rohaan |
Hi,
did you check licence in regards to redistributing Sun/Oracle Java? I checked the FAQ https://www.java.com/en/download/faq/distribution.xml and it seems you are supposed to abide by the "Oracle Binary Code License" http://www.oracle.com/technetwork/ja...nse/index.html if redistributing their software. Oracle is a pretty scary company. Anyway, good luck. Evo2. |
Quote:
but i am not using it as commercial thing not going to distribute also as commercial app or anything :) regards rohan |
All times are GMT -5. The time now is 11:17 AM. |