Java Help

Dear Team,

I'm trying to setup DHIS2 online. I did the test before and it worked fine. Now on production server I've a problem with Java. I've installed "openjdk java" (NOT Sun Java I used before) and it's working fine. The problem is the setenv.sh file.(See below) I don't know what path to put for java. Anything I put brings an error in catalina.out e.g

"/usr/local/apache-tomcat-7.0.30/bin/catalina.sh: 1: eval: /usr/lib/jvm/java-6-sun/bin/java: not found"

What path should I put on the first line. Openjdk dava is a default installation.

Here is the /usr/local/apache-tomcat-7.0.30/bin/setenv.sh

export JAVA_HOME=/usr/lib/jvm/java-6-sun
export JAVA_OPTS=”-Xmx600m -XX:MaxPermSize=1000m”
export DHIS2_HOME=/home/your-user-name/dhis2/DHIS2_HOME

Kabango Malewezi

SSDI Services

2nd Floor, Pamodzi House, City Center, P.O Box 1091, Lilongwe, Malawi
Tel: +265 (01) 776 412/3/4 | fax: +265 (01) 776 410 | Mobile: +265 (0) 88 4 245 431

kmalewezi@jhpiego.net <mailto:kmalewezi@jhpiego.net > | www.jhpiego.org<http://www.jhpiego.org/&gt;

Skype: kabango.malewezi | Twitter: kabangoM

Depends on your setup. If there is nothing here /usr/lib/jvm/java-6-sun/bin/java then you must find where Java actually is on the machine. Leaving the line out will use your default Java.

Obviously, you will need to change this as well

export DHIS2_HOME=/home/your-user-name/dhis2/DHIS2_HOME

to point to the actual directory.

Regards,

Jason

···

On Wed, Oct 10, 2012 at 12:19 PM, Kabango Malewezi kmalewezi@jhpiego.net wrote:

Dear Team,

I’m trying to setup DHIS2 online. I did the test before and it worked fine. Now on production server I’ve a problem with Java. I’ve installed “openjdk java” (NOT Sun Java I used before) and it’s working fine. The problem is the setenv.sh file.(See below) I don’t know what path to put for java. Anything I put brings an error in catalina.out e.g

“/usr/local/apache-tomcat-7.0.30/bin/catalina.sh: 1: eval: /usr/lib/jvm/java-6-sun/bin/java: not found”

What path should I put on the first line. Openjdk dava is a default installation.

Here is the /usr/local/apache-tomcat-7.0.30/bin/setenv.sh

export JAVA_HOME=/usr/lib/jvm/java-6-sun
export JAVA_OPTS=”-Xmx600m -XX:MaxPermSize=1000m”
export DHIS2_HOME=/home/your-user-name/dhis2/DHIS2_HOME

Kabango Malewezi

SSDI Services

2nd Floor, Pamodzi House, City Center, P.O Box 1091, Lilongwe, Malawi
Tel: +265 (01) 776 412/3/4 | fax: +265 (01) 776 410 | Mobile: +265 (0) 88 4 245 431

kmalewezi@jhpiego.net <mailto:kmalewezi@jhpiego.net > | www.jhpiego.org<http://www.jhpiego.org/>

Skype: kabango.malewezi | Twitter: kabangoM


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp

Hi Kabango

I think the best approach is not to specify JAVA_HOME at all. ie as
Jason says, just leave the line out.

You can always run:
sudo update-alternatives --config java

to check which java version is configured as default on your system.

I think the only time you would explicitly want to set this would be
if you have a couple of java versions and you have a particular reason
to use one of them (not the default one) to run your tomcat. Better
in most cases to keep it simple ..

Bob

···

On 10 October 2012 11:32, Jason Pickering <jason.p.pickering@gmail.com> wrote:

Depends on your setup. If there is nothing here
/usr/lib/jvm/java-6-sun/bin/java then you must find where Java actually is
on the machine. Leaving the line out will use your default Java.

Obviously, you will need to change this as well

export DHIS2_HOME=/home/your-user-name/dhis2/DHIS2_HOME

to point to the actual directory.

Regards,
Jason

On Wed, Oct 10, 2012 at 12:19 PM, Kabango Malewezi <kmalewezi@jhpiego.net> > wrote:

Dear Team,

I'm trying to setup DHIS2 online. I did the test before and it worked
fine. Now on production server I've a problem with Java. I've installed
"openjdk java" (NOT Sun Java I used before) and it's working fine. The
problem is the setenv.sh file.(See below) I don't know what path to put for
java. Anything I put brings an error in catalina.out e.g

"/usr/local/apache-tomcat-7.0.30/bin/catalina.sh: 1: eval:
/usr/lib/jvm/java-6-sun/bin/java: not found"

What path should I put on the first line. Openjdk dava is a default
installation.

Here is the /usr/local/apache-tomcat-7.0.30/bin/setenv.sh

export JAVA_HOME=/usr/lib/jvm/java-6-sun
export JAVA_OPTS=”-Xmx600m -XX:MaxPermSize=1000m”
export DHIS2_HOME=/home/your-user-name/dhis2/DHIS2_HOME

Kabango Malewezi

SSDI Services

2nd Floor, Pamodzi House, City Center, P.O Box 1091, Lilongwe, Malawi
Tel: +265 (01) 776 412/3/4 | fax: +265 (01) 776 410 | Mobile: +265 (0) 88
4 245 431

kmalewezi@jhpiego.net <mailto:kmalewezi@jhpiego.net > |
www.jhpiego.org<http://www.jhpiego.org/&gt;

Skype: kabango.malewezi | Twitter: kabangoM

_______________________________________________
Mailing list: DHIS 2 Users in Launchpad
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : DHIS 2 Users in Launchpad
More help : ListHelp - Launchpad Help

_______________________________________________
Mailing list: DHIS 2 Users in Launchpad
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : DHIS 2 Users in Launchpad
More help : ListHelp - Launchpad Help

Thanks, that helps alot. Will try.

Kabango Malewezi

SSDI Services

2nd Floor, Pamodzi House, City Center, P.O Box 1091, Lilongwe, Malawi
Tel: +265 (01) 776 412/3/4 | fax: +265 (01) 776 410 | Mobile: +265 (0) 88 4 245 431

kmalewezi@jhpiego.net | www.jhpiego.org

Skype: kabango.malewezi | Twitter: kabangoM

···

________________________________________
From: Bob Jolliffe [bobjolliffe@gmail.com]
Sent: Wednesday, October 10, 2012 12:45 PM
To: Jason Pickering
Cc: Kabango Malewezi; dhis2-users@lists.launchpad.net
Subject: Re: [Dhis2-users] Java Help

Hi Kabango

I think the best approach is not to specify JAVA_HOME at all. ie as
Jason says, just leave the line out.

You can always run:
sudo update-alternatives --config java

to check which java version is configured as default on your system.

I think the only time you would explicitly want to set this would be
if you have a couple of java versions and you have a particular reason
to use one of them (not the default one) to run your tomcat. Better
in most cases to keep it simple ..

Bob

On 10 October 2012 11:32, Jason Pickering <jason.p.pickering@gmail.com> wrote:

Depends on your setup. If there is nothing here
/usr/lib/jvm/java-6-sun/bin/java then you must find where Java actually is
on the machine. Leaving the line out will use your default Java.

Obviously, you will need to change this as well

export DHIS2_HOME=/home/your-user-name/dhis2/DHIS2_HOME

to point to the actual directory.

Regards,
Jason

On Wed, Oct 10, 2012 at 12:19 PM, Kabango Malewezi <kmalewezi@jhpiego.net> > wrote:

Dear Team,

I'm trying to setup DHIS2 online. I did the test before and it worked
fine. Now on production server I've a problem with Java. I've installed
"openjdk java" (NOT Sun Java I used before) and it's working fine. The
problem is the setenv.sh file.(See below) I don't know what path to put for
java. Anything I put brings an error in catalina.out e.g

"/usr/local/apache-tomcat-7.0.30/bin/catalina.sh: 1: eval:
/usr/lib/jvm/java-6-sun/bin/java: not found"

What path should I put on the first line. Openjdk dava is a default
installation.

Here is the /usr/local/apache-tomcat-7.0.30/bin/setenv.sh

export JAVA_HOME=/usr/lib/jvm/java-6-sun
export JAVA_OPTS=”-Xmx600m -XX:MaxPermSize=1000m”
export DHIS2_HOME=/home/your-user-name/dhis2/DHIS2_HOME

Kabango Malewezi

SSDI Services

2nd Floor, Pamodzi House, City Center, P.O Box 1091, Lilongwe, Malawi
Tel: +265 (01) 776 412/3/4 | fax: +265 (01) 776 410 | Mobile: +265 (0) 88
4 245 431

kmalewezi@jhpiego.net <mailto:kmalewezi@jhpiego.net > |
www.jhpiego.org<http://www.jhpiego.org/&gt;

Skype: kabango.malewezi | Twitter: kabangoM

_______________________________________________
Mailing list: DHIS 2 Users in Launchpad
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : DHIS 2 Users in Launchpad
More help : ListHelp - Launchpad Help

_______________________________________________
Mailing list: DHIS 2 Users in Launchpad
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : DHIS 2 Users in Launchpad
More help : ListHelp - Launchpad Help

Thanks everybody, everything worked out well.

Kabango Malewezi

SSDI Services

2nd Floor, Pamodzi House, City Center, P.O Box 1091, Lilongwe, Malawi
Tel: +265 (01) 776 412/3/4 | fax: +265 (01) 776 410 | Mobile: +265 (0) 88 4 245 431

kmalewezi@jhpiego.net | www.jhpiego.org

Skype: kabango.malewezi | Twitter: kabangoM

···

________________________________________
From: dhis2-users-bounces+kmalewezi=jhpiego.net@lists.launchpad.net [dhis2-users-bounces+kmalewezi=jhpiego.net@lists.launchpad.net] on behalf of Kabango Malewezi [kmalewezi@jhpiego.net]
Sent: Wednesday, October 10, 2012 1:00 PM
To: Bob Jolliffe; Jason Pickering
Cc: dhis2-users@lists.launchpad.net
Subject: Re: [Dhis2-users] Java Help

Thanks, that helps alot. Will try.

Kabango Malewezi

SSDI Services

2nd Floor, Pamodzi House, City Center, P.O Box 1091, Lilongwe, Malawi
Tel: +265 (01) 776 412/3/4 | fax: +265 (01) 776 410 | Mobile: +265 (0) 88 4 245 431

kmalewezi@jhpiego.net | www.jhpiego.org

Skype: kabango.malewezi | Twitter: kabangoM

________________________________________
From: Bob Jolliffe [bobjolliffe@gmail.com]
Sent: Wednesday, October 10, 2012 12:45 PM
To: Jason Pickering
Cc: Kabango Malewezi; dhis2-users@lists.launchpad.net
Subject: Re: [Dhis2-users] Java Help

Hi Kabango

I think the best approach is not to specify JAVA_HOME at all. ie as
Jason says, just leave the line out.

You can always run:
sudo update-alternatives --config java

to check which java version is configured as default on your system.

I think the only time you would explicitly want to set this would be
if you have a couple of java versions and you have a particular reason
to use one of them (not the default one) to run your tomcat. Better
in most cases to keep it simple ..

Bob

On 10 October 2012 11:32, Jason Pickering <jason.p.pickering@gmail.com> wrote:

Depends on your setup. If there is nothing here
/usr/lib/jvm/java-6-sun/bin/java then you must find where Java actually is
on the machine. Leaving the line out will use your default Java.

Obviously, you will need to change this as well

export DHIS2_HOME=/home/your-user-name/dhis2/DHIS2_HOME

to point to the actual directory.

Regards,
Jason

On Wed, Oct 10, 2012 at 12:19 PM, Kabango Malewezi <kmalewezi@jhpiego.net> > wrote:

Dear Team,

I'm trying to setup DHIS2 online. I did the test before and it worked
fine. Now on production server I've a problem with Java. I've installed
"openjdk java" (NOT Sun Java I used before) and it's working fine. The
problem is the setenv.sh file.(See below) I don't know what path to put for
java. Anything I put brings an error in catalina.out e.g

"/usr/local/apache-tomcat-7.0.30/bin/catalina.sh: 1: eval:
/usr/lib/jvm/java-6-sun/bin/java: not found"

What path should I put on the first line. Openjdk dava is a default
installation.

Here is the /usr/local/apache-tomcat-7.0.30/bin/setenv.sh

export JAVA_HOME=/usr/lib/jvm/java-6-sun
export JAVA_OPTS=”-Xmx600m -XX:MaxPermSize=1000m”
export DHIS2_HOME=/home/your-user-name/dhis2/DHIS2_HOME

Kabango Malewezi

SSDI Services

2nd Floor, Pamodzi House, City Center, P.O Box 1091, Lilongwe, Malawi
Tel: +265 (01) 776 412/3/4 | fax: +265 (01) 776 410 | Mobile: +265 (0) 88
4 245 431

kmalewezi@jhpiego.net <mailto:kmalewezi@jhpiego.net > |
www.jhpiego.org<http://www.jhpiego.org/&gt;

Skype: kabango.malewezi | Twitter: kabangoM

_______________________________________________
Mailing list: DHIS 2 Users in Launchpad
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : DHIS 2 Users in Launchpad
More help : ListHelp - Launchpad Help

_______________________________________________
Mailing list: DHIS 2 Users in Launchpad
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : DHIS 2 Users in Launchpad
More help : ListHelp - Launchpad Help

_______________________________________________
Mailing list: DHIS 2 Users in Launchpad
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : DHIS 2 Users in Launchpad
More help : ListHelp - Launchpad Help