How to start tomcat with 2 jdk?


 
Thread Tools Search this Thread
Operating Systems Solaris How to start tomcat with 2 jdk?
# 1  
Old 02-08-2010
How to start tomcat with 2 jdk?


Current platform: Sun OS 5.9 Solaris
Code:
isainfo -v
64-bit sparcv9 applications
32-bit sparc applications

Problem: Fail to start tomcat server
Code:
ps -ef | grep tomcat

nothing displays...

Steps:
Installed jakarta-tomcat-5.0.30

Installed jdk 1.6 and set path in profile
Code:
JAVA_HOME=/usr/jdk/instances/jdk1.6.0
CLASSPATH=$JAVA_HOME/bin:$JAVA_HOME/jre/lib
export JAVA_HOME CLASSPATH

This java version is used in another application.
Code:
java -version
java version "1.2.2"
Solaris VM (build Solaris_JDK_1.2.2_09, native threads, sunwjit)

How to start the tomcat with 2 java version correctly?

Last edited by pludi; 02-08-2010 at 03:09 AM.. Reason: code tags, please...
# 2  
Old 02-08-2010
How do you start tomcat? Maybe you have to set JAVA_HOME and CLASSPATH at another place too?

I usually start tomcat via SMF. In this case I have to set the shell variables in the SMF method script, because .profile is not evaluated.
# 3  
Old 02-08-2010
I use the following method to start tomcat...it says it uses jdk 1.6 already.

Code:
bash-2.05# /usr/local/tomcat5/bin/startup.sh
Using CATALINA_BASE:   /usr/local/tomcat5
Using CATALINA_HOME:   /usr/local/tomcat5
Using CATALINA_TMPDIR: /usr/local/tomcat5/temp
Using JAVA_HOME:       /usr/jdk/instances/jdk1.6.0

Any other settings are required?
what's SMF script? similar to contrab?

Last edited by pludi; 02-08-2010 at 03:32 AM.. Reason: code tags, please...
# 4  
Old 02-08-2010
SMF is the service management facility. It is the new way to start and control services under Solaris 10.

If you start tomcat as user root (which I would not recommend) as shown above, your grep command is not correct because tomcat is not part of the commandline. On one of my machines I have:

Code:
tomcat 14421     1   0   Feb 07 ?           5:54 /usr/jdk/instances/jdk1.5.0/bin/sparcv9/java -Djava.util.logging.manager=org.ap

The word tomcat only appears as username.
# 5  
Old 02-08-2010
ic, I've make a new user to restart tomcat, but fail. Any idea?

Code:
$ /usr/local/tomcat5/bin/startup.sh
Using CATALINA_BASE:   /usr/local/tomcat5
Using CATALINA_HOME:   /usr/local/tomcat5
Using CATALINA_TMPDIR: /usr/local/tomcat5/temp
Using JAVA_HOME:       /usr/jdk/instances/jdk1.6.0

$ ps -ef | grep jdk
Aadmin  6646  6627  0 16:34:49 pts/3    0:00 grep jdk


Last edited by pludi; 02-08-2010 at 04:42 AM.. Reason: code tags, please...
# 6  
Old 02-08-2010
Please, when posting listings or command lines, use code tags to enclose the text. You can add them using the # symbol in the icon bar above the editing box on selected text, or by manually adding [code][/code] tags.
# 7  
Old 02-08-2010
thanks for reminder!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Tomcat..Unable to deploy application remotely in tomcat

Hi, We have upgrade tomcat from 5.0.20 to 7.0.33 and made changes to server.xml file according to newer version.. how ever the upgrade went fine and now i am unable to deploy application remotely.. it is giving 403 access denied error.. we have seperate appbase directory mentioned in server.xml..... (0 Replies)
Discussion started by: phani4u
0 Replies

2. HP-UX

jdk

How can i see if jdk is installed or not on my system. I am on HP UX B.11.31 (3 Replies)
Discussion started by: bang_dba
3 Replies

3. UNIX for Advanced & Expert Users

Is it Possible to Start Tomcat Manager using command prompt!

Hi All, wget http://<username>:<password>@<hostname>:<port>/manager/list -O - -q using this command i can able to stop , start , reload everything i can able to do once i start the tomcat , now i have some doubt legends. 1. Is this is a secure way using wget to start, stop, reload the... (0 Replies)
Discussion started by: anishkumarv
0 Replies

4. Ubuntu

JDK path

Hello, I have installed the default JDK from Software centre, but when i type whereis JDK on the terminal.. i don't see any path :mad: i need JDk to install a tool ... Hurry!!! please HELP:confused::confused: (4 Replies)
Discussion started by: paramad
4 Replies

5. Solaris

Jdk 1.6 Installtion

How to install the jdk 1.6 in the solaris sparc 10 64bit. Any patch is required for jdk 1.6 for solaris (2 Replies)
Discussion started by: saktiviji
2 Replies

6. Web Development

Allow multiple users to start/stop tomcat

Hi, I have the user who runs tomcat: tomcat:tomcats I want to have another user who will be able to start and stop tomcat process. Is this possible? Thanks, Bianca (1 Reply)
Discussion started by: potro
1 Replies

7. Shell Programming and Scripting

How to check for and start the Tomcat using a script

Hello Everyone,. I am a novice with shell scripting and have written some minor shell scripts to copy files and such that. Now I have a requirement to write a shell script to go check if Tomcat running in the same server is up or not, if not then run the Tomcat startup script. Then put this... (4 Replies)
Discussion started by: bhaire
4 Replies

8. UNIX for Dummies Questions & Answers

JDK Installation

I'm trying to install JDK (Java Development tools) and i get this: WARNING: The <SUNWj6dev> package "JDK 6.0 Dev. Tools (1.6.0)" is a prerequisite package and should be installed. WARNING: The <SUNWj6rtx> package "JDK 6.0 64-bit Runtime Env. (1.6.0)" is a prerequisite package and should be... (0 Replies)
Discussion started by: idan_cn
0 Replies

9. Shell Programming and Scripting

Problem with Unix script to start remote Tomcat

I have Tomcat installed on a Unix box and I need to start it remotely from another Unix box. Tomcat is started using a script. When this script is run locally everything is fine. When I run the same script from remote box, tomcat starts but the command running the script does not terminate.:( ... (2 Replies)
Discussion started by: shrgh
2 Replies

10. UNIX for Dummies Questions & Answers

find jdk 1.3.1

Hello, I try to find the file jdk-1.3.1_03-fcs.rpm (pre-requisite for Oracle Applications 11.5.8) for Linux x86 but it doesn't available anywhere... Maybe here, somebody have it ? :o Rgds (1 Reply)
Discussion started by: madmat
1 Replies
Login or Register to Ask a Question