Setting up Java environment on VMware Solaris 10 | Unix Linux Forums | Solaris

  Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Setting up Java environment on VMware Solaris 10

Solaris


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-08-2013
SSUUser SSUUser is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 11 February 2013, 4:54 AM EST
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
Setting up Java environment on VMware Solaris 10

Hello chings ,

Oracle Solaris OS Install (JDK)


My host is win7 X64 and guest is solaris 10 X64 .
My share file name is sharefile10

I unzip the file from host so I dont need type tar or gzip command through solaris .

I have downloaded JDK from oracle offical website and the name :
jdk-7u13-solaris-x64.gz
and I found that..



So , do i put those files into solaris 10 somewhere manully.?
I have no idea where I should place it and what I should do .

I have read offical instruction..but it just seems ..a rough guild .
I found some instruction on the internet but jdk*.bin or .sh used in the instruction .
And I cannot find .bin or .sh of new jdk version on offical website
Sponsored Links
    #2  
Old 02-08-2013
Panzerkampfwagn Panzerkampfwagn is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 7 November 2013, 4:07 AM EST
Location: Hanover,Lower Saxony,Germany
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

itīs all fine. copy the directory jdk-7u13 where u want (maybe /opt under solaris). Important is, to export the path.

You can export the path:

* global (for all)
  • vi /etc/profile

Code:
PATH=/opt/jdk-7u13/bin:$PATH
export PATH

*for a special user only
  • vi /home/user1/.profile

Code:
PATH=/opt/jdk-7u13/bin:$PATH
export PATH

You can test it also with your actually session (will be lost after closing the session):


Code:
shell$:> export PATH=/opt/jdk-7u13/bin:$PATH
shell$:>java -version

I prefer to put the jdk in a special directory called "java-versions" an link the latest version. for example the /opt directory would look like:


Code:
..
java-versions <--------include all jdks
java <-----itīs a symbolic link to the latest version: /opt/java-versions/jdk-7u13

So, only the path to /opt/java/bin must be export or set. a java-version change is so much easier. just unlink java and create a new link to the newer version. thatīs all..

PS: Do u plan a java-enviroment for an application-server (jboss/tomcat)? If yes, the path-variable will be set in the catalina.sh (tomcat) or run.sh/run.conf (jboss) and will be called JAVA_HOME.

best regards

Last edited by Panzerkampfwagn; 02-08-2013 at 09:48 AM.. Reason: edit
Sponsored Links
    #3  
Old 02-08-2013
SSUUser SSUUser is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 11 February 2013, 4:54 AM EST
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Panzerkampfwagn View Post
Hi,

itīs all fine. copy the directory jdk-7u13 where u want (maybe /opt under solaris). Important is, to export the path.

You can export the path:

* global (for all)
  • vi /etc/profile

Code:
PATH=/opt/jdk-7u13/bin:$PATH
export PATH

*for a special user only
  • vi /home/user1/.profile

Code:
PATH=/opt/jdk-7u13/bin:$PATH
export PATH

You can test it also with your actually session (will be lost after closing the session):


Code:
shell$:> export PATH=/opt/jdk-7u13/bin:$PATH
shell$:>java -version

I prefer to put the jdk in a special directory called "java-versions" an link the latest version. for example the /opt directory would look like:


Code:
..
java-versions <--------include all jdks
java <-----itīs a symbolic link to the latest version: /opt/java-versions/jdk-7u13

So, only the path to /opt/java/bin must be export or set. a java-version change is so much easier. just unlink java and create a new link to the newer version. thatīs all..

PS: Do u plan a java-enviroment for an application-server (jboss/tomcat)? If yes, the path-variable will be set in the catalina.sh (tomcat) or run.sh/run.conf (jboss) and will be called JAVA_HOME.

best regards

Thank you for your instruction !
I totally f-up...becase I am poor in english to read offical website instruction .
I have 2 questions would like to ask:

1.In the instruction ,

"" The supplemental files for 64-bit support are installed in directories named for the machine architecture model, which are added at several locations within the same jdk1.7.0_<version> directory where the 32-bit JDK was installed. For example, on SPARC processors the 64-bit Java VM Library file (libjvm.so) is stored in the jdk1.7.0_<version>/lib/sparcv9/server directory, whereas the version for x64/EM64T is stored in the jdk1.7.0_<version>/lib/x64/server directory. ""




Do I need to place amd64 into (x86) /jdk/bin file ? OR put all files in amd64
to overwrite files in (x86) /jdk/bin ?


2. I have checked my jave version that is shown below


I installed jdk1.7.0_13 , so I dont know why the version is 1.6.0_26

---------- Post updated at 09:45 AM ---------- Previous update was at 09:33 AM ----------

setting-up consumes my time so much , but it is interested .
I setting up java environment plan to write android apps .
I am still a newbird..beginner
Maybe I set up any kind of server .. um because I learn unix that is powerful OS to do anything . I dont wanna waste anything i learn
    #4  
Old 02-08-2013
Panzerkampfwagn Panzerkampfwagn is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 7 November 2013, 4:07 AM EST
Location: Hanover,Lower Saxony,Germany
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
No problem, my english isnīt very well too

I guess there is a java already installed. Do a "which java" on the shell:


Code:
shell$:> which java
/usr/bin/java

Okay, Quick-and-Dirty fix is, to remove the old link:


Code:
shell$>ls -la /usr/bin/java
lrwxrwxrwx   1 root     other         16 Dez 10 16:23 /usr/bin/java -> ../java/bin/java
shell$>unlink /usr/bin/java
shell$>ln -s /path/to/jdk17 /usr/bin/java

The other way would be to find the package (pkginfo | grep java) and remove it.

Found a Website with instructions



Last edited by Panzerkampfwagn; 02-08-2013 at 11:09 AM..
Sponsored Links
    #5  
Old 02-22-2013
Panzerkampfwagn Panzerkampfwagn is offline
Registered User
 
Join Date: Jan 2013
Last Activity: 7 November 2013, 4:07 AM EST
Location: Hanover,Lower Saxony,Germany
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,

srry for beeing late.

I told u totally crap.. Thats the right way:

get as an example jdk1.6.0_26 on ur system:

1. download jdk_6u26-solaris-sparc.tar.Z (32Bit)
download jdk-6u26-solaris.sparcv9.tar.Z (64Bit)

2.uncompress tar.Z (uncompress *.tar.Z), maybe put these 2 files in a extra directory

3. install with pkgadd -d .

4.its installed, but u must relink (all java versions are under /usr/jdk/)

---> unlink /usr/bin/java
---> ln -s /usr/jdk/jdk1.6.0_26 /usr/bin/java
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Redhat LINUX 5 setting In VMWARE SasiWipro Homework & Coursework Questions 2 04-09-2012 06:14 PM
Uncompress a gzip and bzip file using java on unix solaris environment wadhwa.pooja Programming 0 10-14-2009 10:49 AM
Binary not getting executed from Java on Solaris environment shafi2all Programming 0 07-03-2008 06:25 AM
Setting environment variable on a remote solaris machine using shell script eamani_sun Shell Programming and Scripting 1 05-30-2008 11:05 PM



All times are GMT -4. The time now is 07:55 PM.