Solved

JAVA - JVM ON SOLARIS SERVER

Posted on 2003-11-11
44
1,678 Views
Last Modified: 2013-12-05
Hi All,

would appreciate help pls.

I have a SOLARIS BOX. I have JDK1.2.2 installed on this machine.

I have TOMCAT-APACHE as WEBSERVER-SERVLET Engine on this box.

In this, I have bunch of application running (using 1.2.2, tomcat-apache).

I want to install a new application now on same box -- but this new application needs JDK 1.4.1 version..

I don't want to upgrade the whole server since it might break few things on my existing applications.

what is the suggestion here?

Can I have 2 JVM on my solaris box.. and my exisiting application pointing to JRE 1.2.2 and my new application pointing to JRE 1.4..  

This new application (for now) would be independant of existing application (it will just run with main method behind the scene), so probably would not be using web stuff apache and tomcat..

but may be in future it would need to use tomcat etc. also.. (not sure right now)..

what can you suggest on this pls..

0
Comment
Question by:shivani
  • 24
  • 18
  • 2
44 Comments
 
LVL 15

Expert Comment

by:jimmack
ID: 9722769
Yes.  You can have different JDKs installed on your system.  I have three different ones on my system (1.1.8, 1.3 and 1.4) for a variety of reasons ;-)

I haven't used Solaris for a *long* time ;-), but I had a quick look at the installation notes on the Javasoft site.  It looks like you might need to be a little bit careful.

Have a look at:

http://java.sun.com/j2se/1.4.1/install-solaris.html
0
 

Author Comment

by:shivani
ID: 9722997
But how to make it that my existing application still uses JDK 1.2.2 instead of 1.4?? and my new application 1.4 instead of 1.2
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9723033
You just need to run the "java" command with the full path:

eg. /usr/java/j2sdk1.4.1_02/bin/java

If you ensure that the PATH environment variable keeps the path to the 1.2.2 bin directory, your existing software will just use that and ignore the new installation.
0
 

Author Comment

by:shivani
ID: 9723226
PATH=/opt/TimesTen4.1/32/bin:/usr/local/mysql/bin:/opt/TimesTen4.0/32/bin:/opt/CN/CNbase/BIN:/opt/CN/CNicsx/BIN:/u00/app/oracle/product/8.1.7/bin:/usr/bin:

is my path..

it doesn't have java in it..

i have link /usr/java pointing to java 1.2 ..  is it something to do with this?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9723270
What happens when you do

java -version

at the command prompt?
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9723285
I should have read your comment properly before typing all the stuff about symbollic links that I've just delete ;-)

Yes, so long as your link still points to java 1.2, the new installation shouldn't affect it.

When you've installed the new version, it might be worth trying to change the link to point to that instead.  You may find that all the older software still runs OK.

(Just for info: The main reason I need JDK1.1.8 on my system is for compiling JavaCard applications.  It's not strictly necessary because you can give javac a command line parameter to tell it to build for older versions.)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9723355
Oh, and please tell us what

echo $PATH

prints
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9723376
Aha!  My suspicion seems to be confirmed.  CEHJ has given up sleep, replacing it with EE time instead ;-)
0
 

Author Comment

by:shivani
ID: 9723385
CEHJ,


$ java -version
java version "1.2.2"
Solaris VM (build Solaris_JDK_1.2.2_14, native threads, sunwjit)
$

JIMMACK..
is it only symbolic link which actually decided which JVM is needed?

So below is what I have understood,

I download SDK 1.4 FOR SOLARIS From sun site..
and install it according to the instructions..

and I don't touch the symbolic link. So my existing application will keep using JAVA 1.2
but if I have to do do modifications in my exisiting application,
I will have to compile java files (for exisiting application) with a command line parameter to use java 1.2 right?
is it possible to make default javac as 1.2 ?? because my new application is in too early stages.. but exisitng application needs frequent changes and modifications.

And if I want to test my existing application with 1.4, i should just modify symbolic link-- and my existing app will use 1.4 JVM now right??  
0
 

Author Comment

by:shivani
ID: 9723392
$ echo $PATH
/opt/TimesTen4.1/32/bin:/usr/local/mysql/bin:/opt/TimesTen4.0/32/bin:/opt/CN/CNbase/BIN:/opt/CN/CNicsx/BIN:/u00/app/oracle/product/8.1.7/bin:/usr/bin:
$
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9723426
>> I download SDK 1.4 FOR SOLARIS From sun site..
Yes.

>>and install it according to the instructions..
Yes ;-)

>>and I don't touch the symbolic link. So my existing application will keep using JAVA 1.2
Correct.

>>but if I have to do do modifications in my exisiting application,
Shouldn't be necessary

>>I will have to compile java files (for exisiting application) with a command line parameter to use java 1.2 right?
No.  Sorry.  I only provided that comment for information, just to explain why *I* have more than one JDK installed.

>>is it possible to make default javac as 1.2 ?? because my new application is in too early stages.. but exisitng application needs frequent changes and modifications.
If you don't change the symbollic link, the default should stay as 1.2

>>And if I want to test my existing application with 1.4, i should just modify symbolic link-- and my existing app will use 1.4 JVM now right??  
Yes.
0
 

Author Comment

by:shivani
ID: 9724844
seems I have to apply patches on SUN 5.8 right?

0
 

Author Comment

by:shivani
ID: 9724847
i mean before i install JDK 1.4 right?
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9724895
Yes.  That seems to be the case.  That's why I said you needed to be careful.  Sorry, I should have pointed out that the installation instructions mentioned patching the OS ;-)

When you say SUN 5.8, do you mean Solaris 5.8?  The installation instructions list the OSs that JDK1.4.1 will run on.  Is your version of Solaris included?
0
 

Author Comment

by:shivani
ID: 9724967
instructions says solaris 8.

i have SunOS 5.8. isn't this same?
0
 

Author Comment

by:shivani
ID: 9724973
wudnot applying solaris patch may impact my old version of JDK and thus exisiting application?
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9726187
I can't seem to find any clear information about how the terms SunOS and Solaris are related :-(

The best link I found only seemed to indicate that SunOS 5.8 is Solaris 8.  I think you need to be more confident about that before you begin.

Patching the OS should not affect the existing JDK, nor the existing application.  If anything changes, it should simply be faster or more robust.
0
 

Author Comment

by:shivani
ID: 9732254
Ok , I am downloading the patches right now. It will take me a while to install them and then JDK 1.4.2 since I have not done this kind of stuff on solaris before. So pls be patient. I have to do it since there is no admin here.

thanks
0
 

Author Comment

by:shivani
ID: 9732350
Jimmack,
I understand this question should not be asked here..
But in case you can help me with this, would really appreciate.

I got a zipped patch file from sun site.
instructions are there to install it.. but i have never installed patch.. so don't know much on it.
would appreciate if you can pls help..

where on solaris server shud i ftp the zipped file?
how shud i unzip it?
how shud i install it..?

shud i just save in /usr/local -- unzip it from some command.. and run a install_cluster script..
where will it install it? do i need to mention any path?
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9732437
To be honest, I don't know.  But...

Try unzipping it to a local directory and see if there is a README file (or INSTALL or RELEASE_NOTES or something like that).

I'm afraid that's the best I can do with this part :-(

Here are some links that *may* be helpful (the second one looks like it might be most useful):

http://docs.sun.com/db/doc/817-1658/6mhcgstvq?a=view
http://www.cisco.com/univercd/cc/td/doc/product/access/sc/rel9/relnote/sol8rn.htm#639816

You can find more if you enter the following in google (including inverted commas):

"installing solaris patch"
0
 

Author Comment

by:shivani
ID: 9733919
Ok well.. i am installing it now..

I have read me.. but doesnt say much for novice.

i anyway put zipped in /usr/local..
unzipped it..
and now running install..
0
 

Author Comment

by:shivani
ID: 9733995
well, I am unable to understand this thing..if you can help..

say for example --

I have websphere installed on my machine.. which supports JDK 1.3.1 version..

now if i update my PC to JDK 1.4, wouldnot  my websphere stop working (because my PC has JVM 1.4 now and websphere supports 1.3.1)..

Or is it that because I didn't uninstalled my JDK 1.3.1 -- so now after I install 1.4, my PC has 2 JVM's , websphere uses 1.3.1 and my PC uses 1.4..
BUT HOW does websphere knows which one to use..

I even saw that in windows registry, sometimes I have to update my JVM version to most current version.. else my prgram doesn't work..

I am just confused i think on how multiple JVM's works .. what shud we put in PATH and what in CLASSPATH..

can u explain pls.. sorry..
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 15

Expert Comment

by:jimmack
ID: 9734074
PATH is the list of directories that are checked sequentially to try to identify the executable you have entered at the command prompt.

If you type:

java -version

at the command prompt, your system will check the following directories to see if it can find the "java" executable:
/opt/TimesTen4.1/32/bin
/usr/local/mysql/bin
/opt/TimesTen4.0/32/bin
/opt/CN/CNbase/BIN
/opt/CN/CNicsx/BIN
/u00/app/oracle/product/8.1.7/bin
/usr/bin

As I understand it, you have a symbollic link in /usr/bin, and that is the one that gets executed.

Don't put anything in the CLASSPATH environment variable if you can help it.

If your symbollic link in /usr/bin points to (for example) /usr/java/j2sdk1.3.1/bin/java, the the result of typing "java -version" will be the version number for 1.3.1, because that is what is being executed.  The same would happen if you typed "/usr/java/j2sdk1.3.1/bin/java -version".

To execute the 1.4.1 version, just type in the complete path to the "java" executable, eg. "/usr/java/j2sdk1.4.1/bin/java".

I'm not familiar with the WebSphere installation, but I would guess that there is a config file somewhere that it uses to identify the location of the java executable.

I would think that WebSphere will run equally well (if not better) on 1.4.
0
 

Author Comment

by:shivani
ID: 9734108
Jim,
I installed patches,

Installing patches located in /usr/local/J2SE_Solaris_8_Recommended

Using patch_order file for patch installation sequence
Installing 108652-74...
Installing 108921-17...
Installing 108940-57...
Installing 112003-03...
Installing 108773-18...
Installing 111310-01...
Installing 112472-01...
Installing 109147-26...
Installing 111308-04...
Installing 112438-02...
Installing 108434-13...
Installing 108435-13...
Installing 111111-03...
Installing 112396-02...
Installing 110386-03...
Installing 111023-02...
Installing 108987-13...
Installing 108528-25...
Installing 108989-02...
  Installation of 108989-02 failed. Return code 8.
Installing 108993-26...

The following patches were not able to be installed:
        108989-02

For more installation messages refer to the installation logfile:
  /var/sadm/install_data/J2SE_Solaris_8_Recommended_log

Use '/usr/bin/showrev -p' to verify installed patch-ids.
Refer to individual patch README files for more patch detail.
Rebooting the system is usually necessary after installation.

I just have to restart server.. but do u know what shud i do with the patch which failed to install??
108989-02??

shud i worry about it? or just restart solaris?
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9734212
Have a look in the patch README file for the patch that failed.  I doubt that it will be a critical problem, but you never know.

I don't know where the README file will be.  Perhaps the /var/sadm/install_data/J2SE_Solaris_8_Recommended_log file may have some clues.
0
 

Author Comment

by:shivani
ID: 9734267
FROM LOG:

Installing 108989-02...

Checking installed patches...
Re-installing patch 108989-02...
One or more patch packages included in
108989-02 are not installed on this system


in README
108989-02  SunOS 5.8: /usr/kernel/sys/acctctl and /usr/kernel/sys/exacctsys patch

any ideas?
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9734283
No, sorry :-/
0
 

Author Comment

by:shivani
ID: 9734373
well, i will just reboot and install JDK 1.4 and see what happens in that case..

how to see if JDK 1.4 is working fine or not??

compile a program, run it and see..?? or any other way to see it?

JVM doesn't run all the time (like in windows/services -- for example oracle runs all the time if not manually stopped right..)..

JVM runs only when we invoke java process right??

0
 
LVL 15

Expert Comment

by:jimmack
ID: 9734486
That's right.

First try:

java -version

This should give you the previous version that you have installed.

Then try:

<jdk1.4 installation directory>/bin/java -version

and you should see the 1.4 version details.

>> JVM runs only when we invoke java process right??
Right.
0
 

Author Comment

by:shivani
ID: 9734571
well,
server came back up fine..
looks okay..

i am downloading JDK 1.4.2 now to install it.. (i installed patches for the same..)

now i know it is stupid to ask..
but since i don't know..
which one do i need:

Solaris SPARC 32-bit self-extracting file  (info)      
 
Solaris SPARC 64-bit self-extracting file *  (info)      
 
Solaris x86 self-extracting file  (info)      
 
Solaris x86 packages - tar.Z  (info)

how do i know?
0
 

Author Comment

by:shivani
ID: 9734881
JIM,

WELL, I INSTALLED JDK1.4 BUT I INSTALLED AT WRONG LOCATION. I INSTALLED
IN
/usr/java1.4.2_02/j2sdk1.4.2_02

while i wanted to install in

/usr/j2sdk1.4.2_02

i know how to do it now..

but how to uninstall it at first..

is it okay to just remove j2sdk1.4.2_02 from
/usr/java1.4.2_02

or do i need to do more than this?

0
 

Author Comment

by:shivani
ID: 9734907
i know this question is getting bigger..

probably i am at end now almost..

would appreciate some help pls..

i am able to get java -version
to be 1.2.2.

and /usr/jdk1.4 ..... /bin/java -version
as
1.4.2 as wanted..

just need to uninstall and install it at right place..

almost done here
0
 

Author Comment

by:shivani
ID: 9735267
Hello??
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9735793
Sorry for the delay.  I've been a bit busy cleaning up the TA ;-)

You don't need to uninstall it, just move it.
0
 

Author Comment

by:shivani
ID: 9735902
TA means what??

not a problem..

you mean just move folder

j2sdk1.4.2_02

from

/usr/java1.4.2_02/

to

/usr/

will do the job??


installation doesn't change or put any setting or environment variables etc. right??

not sure what is equivalent in solaris-- but i mean for example in windows we have registry-- does not installtion put anything in registry of windows..
and thus equivalent in solaris for registry -- whatever it is called..

0
 
LVL 15

Accepted Solution

by:
jimmack earned 500 total points
ID: 9735939
Yes.  Just move the folder :-)

No.  Installation doesn't set up any environment variables.  There is no equivalent to the registry in *nix :-)

TA = Topic Area (An EE "Group" like "Java Programming") ;-)
0
 

Author Comment

by:shivani
ID: 9739889
Well Jim Thanks for support..

it seems to be working very well.. so points goes to you..

I am putting one more question soon.. it is not a single question actually.. I need to understand how can i make JAVA SPEECH FREE TTS PACKAGE work for my application .. Since you are knowledgeable, I hope you and other experts can help me understanding this even though you might not have uses JAVA SPEECH before.. goal will be in my question..

Lastly, I have only and I will close this question..

We have application on SUN box.. on a website..

which  We use them from win 2000..

I upgraded by jre version in windows to 1.4.2..
I see sometimes a java cup icon besides my clock.. which if i double click, says
"About Java"
"Java 2 Platform Standard Edition" etc.

what does this icon means? does it mean JVM is running on my windows ..?? I don't see it on Task Manager though..

Sometimes I have seen as many as 4 icons on my taskbar.. what does this mean actually?

Most of our applications are not applet based.. they are like applications while front-end is HTML/JSP..

Only applets should start JRE on local client machine (i.e. windows in my case right?) because as I understand applets are executed on client machine.. thus using JRE from client machine .. or they can probably use JRE from IE browser or Netscape browser.. or
they can use JRE from Microsoft VM (which if I am correct is lower version though..  does windows still comes with JRE installed? I heard Microsoft will stop doing that.. if yes, what version of JRE?)

Applications (i.e. servlets in this case) shud be using JRE at server.. right??
Is it may be that some of my applications uses some applets kind of stuff?
well, right now we have over 1800 apps on one website -- so not sure..


and if you know frokm top of your head already, how shud I modify the symbolic link to point to new version of java, to test my applications, i will appreciate..

anyway, whatever u answer, i will close this question with your last comment.. and
points goes to you..

thanks for all the help provided..

in case you don't mind help and teaching ppl., if you can share your email address/instant messanger (yahoo or MSN) id (if you reply to brief questions sometimes out of hobby), i will really appreaciate it..

Thanks and Regards
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9740095
Sorry shivani, I don't really know how the TTS works.

I believe that the icon you're seeing is probably just an information icon.  However, you could try right-clicking it to see if it provides any other options.  Does this appear when you run a Java application (or applet) or does it simply appear when you log in?  If it is an indication that a JVM is executing, it is reasonable to have a few VMs simultaneously if you have several applets/applications running.  Each one needs it's own :-)

>> applets should start JRE on local client machine
Yes, applets will start a JRE on the client machine.  IE and Netscape use "plug-ins" in order to run the JRE.

>> does windows still comes with JRE installed?
No.  MS stopped shipping the JVM prior to XP.  However, even before that (because of the legal arguments with Sun), they only shipped with JRE 1.1.4 (as far as I remember ;-))

At the moment, XP users need to download a JRE from Sun in order to execute applications/applets that require more modern functionality.

>> Applications (i.e. servlets in this case) shud be using JRE at server.. right??
Yes.  The JRE being executed is for the servlet container (or application server).  All that is sent to the client is the HTML.

>>Is it may be that some of my applications uses some applets kind of stuff?
>>well, right now we have over 1800 apps on one website -- so not sure..
I don't really understand what you mean by this :-(

Symbollic links are created using the ln command (That's "LN" in lower case ;-)).  You probably want to use the -s option to make it a "soft" link, eg.:

  ln -s /usr/j2sdk1.4.2_02/bin/java java

will create a symbollic link to the java command in your current directory.

0
 

Author Comment

by:shivani
ID: 9740202
>> I  believe that the icon you're seeing is probably just an information icon.  However, you could try right-clicking it to see if it provides any other options.  Does this appear when you run a Java application (or applet) or does it simply appear when you log in?  If it is an indication that a JVM is executing, it is reasonable to have a few VMs simultaneously if you have several applets/applications running.  Each one needs it's own :-)


On right click -- options are
"Open Control Panel"
"Open Console"
"Hide Icon"
etc.

I think if I am correct, it appears when I bring up my website page..
So if i bring website 4 times from IE icon-- this icon appears 4 times..
if i do a CNTRL-N from BROWSER to open another window, no new icon appears for this new page..
(same with FILE-NEW-WINDOW)

If i start killing windows-- all icons goes but one stays for some reason.. may be if i reboot my system-- this will also go away..
any ideas?


I have another question on implementation of linked list if you can pls help with that too.. i am seeking some help there..

regards
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9740248
It's the Java Control panel.  Nothing to worry about.  You can probably stop it showing by finding setting the options by opening it ;-)

>> implementation of linked list
Hmm.  Why not use java.util.LinkedList ?
0
 

Author Comment

by:shivani
ID: 9740282
i an using using jdk1.2.2

java.util.LinkedList -- is it a part of 1.2.2?


0
 
LVL 15

Expert Comment

by:jimmack
ID: 9740301
In my javadocs it says "Since 1.2", so yes, it should be there.
0
 

Author Comment

by:shivani
ID: 9740494
Ccan you read my other Q and help me if Linked List can be used or any other idea to implement that problem..
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9740566
I'll take a look ;-)
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now