Setting up enviornment variable for DHIS2 on Ubuntu 12.04

Dear Expert Friends

As mentioned in the ‘DHIS2 Implementation guide’ I try to configure few of my new servers I find that the ‘setenv.sh’ might not working. As per the ‘Implementation Guide’ i create the ‘setenv.sh’ in the /bin folder. The active java folder is ‘/usr/lib/jvm/java-8-oracle’ and also java vesrsion showing the proper installation.

java version “1.8.0-ea”
Java™ SE Runtime Environ
Java HotSpot™ 64-Bit Ser

Please note that previous vesrion of Java is there also.

JAVA_HOME mentioned as

export JAVA_HOME=‘/usr/lib/jvm/java-8-oracle’

But Tomcat Showing diffent JVM with default memory seetings.

I usullay configure differently. Please can someone tell me whts wrong with this setenv.sh.

Regards

Hannan Khan

Dear Hannan,

Java 8 is still Early Access. The public release has not been made.
The Oracle roadmap says its Q1 2014 and the beta is planned for Sept 2013.

So its not something that is guaranteed in all cases

Also it seems likely that tomcat is using the other installed Java.
Can you do: sudo update-alternatives --config java
and select the jdk7 that is installed

···

Regards,
Saptarshi PURKAYASTHA

My Tech Blog: http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE

On 22 May 2013 10:56, Hannan Khan hannank@gmail.com wrote:

Dear Expert Friends

As mentioned in the ‘DHIS2 Implementation guide’ I try to configure few of my new servers I find that the ‘setenv.sh’ might not working. As per the ‘Implementation Guide’ i create the ‘setenv.sh’ in the /bin folder. The active java folder is ‘/usr/lib/jvm/java-8-oracle’ and also java vesrsion showing the proper installation.

java version “1.8.0-ea”
Java™ SE Runtime Environ
Java HotSpot™ 64-Bit Ser

Please note that previous vesrion of Java is there also.

JAVA_HOME mentioned as

export JAVA_HOME=‘/usr/lib/jvm/java-8-oracle’

But Tomcat Showing diffent JVM with default memory seetings.

I usullay configure differently. Please can someone tell me whts wrong with this setenv.sh.

Regards

Hannan Khan


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

Dear Hannan,

Funny thing, I was also trying to find the right “bin” folder for setenv.sh for the first time just a couple of hours ago. It isn’t /bin at the root of the drive, but bin under the Tomcat folder. Mine was at /usr/local/apache-tomcat-6.0.36/bin. And putting setenv.sh there worked for me. Yours may be somewhere else.

Cheers,

Jim

···

On May 22, 2013, at 12:41 PM, Saptarshi Purkayastha sunbiz@gmail.com wrote:

Dear Hannan,

Java 8 is still Early Access. The public release has not been made.
The Oracle roadmap says its Q1 2014 and the beta is planned for Sept 2013.

So its not something that is guaranteed in all cases

Also it seems likely that tomcat is using the other installed Java.
Can you do: sudo update-alternatives --config java
and select the jdk7 that is installed


Regards,
Saptarshi PURKAYASTHA

My Tech Blog: http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE

On 22 May 2013 10:56, Hannan Khan hannank@gmail.com wrote:

Dear Expert Friends

As mentioned in the ‘DHIS2 Implementation guide’ I try to configure few of my new servers I find that the ‘setenv.sh’ might not working. As per the ‘Implementation Guide’ i create the ‘setenv.sh’ in the /bin folder. The active java folder is ‘/usr/lib/jvm/java-8-oracle’ and also java vesrsion showing the proper installation.

java version “1.8.0-ea”
Java™ SE Runtime Environ
Java HotSpot™ 64-Bit Ser

Please note that previous vesrion of Java is there also.

JAVA_HOME mentioned as

export JAVA_HOME=‘/usr/lib/jvm/java-8-oracle’

But Tomcat Showing diffent JVM with default memory seetings.

I usullay configure differently. Please can someone tell me whts wrong with this setenv.sh.

Regards

Hannan Khan


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


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

Ok.

I already tested with Oracle JDK 7. Not working.

The problem with the JAVA_HOME variable.

echo $JAVA_HOME returns blank. So setenv.sh is not working. Why it is not working?

I usullay use different method; but as manual sugest to use ‘setenv.sh’ so I try to use that.

Regards

Hannan

···

On Wed, May 22, 2013 at 3:41 PM, Saptarshi Purkayastha sunbiz@gmail.com wrote:

Dear Hannan,

Java 8 is still Early Access. The public release has not been made.
The Oracle roadmap says its Q1 2014 and the beta is planned for Sept 2013.

So its not something that is guaranteed in all cases

Also it seems likely that tomcat is using the other installed Java.
Can you do: sudo update-alternatives --config java
and select the jdk7 that is installed


Regards,
Saptarshi PURKAYASTHA

My Tech Blog: http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE

On 22 May 2013 10:56, Hannan Khan hannank@gmail.com wrote:

Dear Expert Friends

As mentioned in the ‘DHIS2 Implementation guide’ I try to configure few of my new servers I find that the ‘setenv.sh’ might not working. As per the ‘Implementation Guide’ i create the ‘setenv.sh’ in the /bin folder. The active java folder is ‘/usr/lib/jvm/java-8-oracle’ and also java vesrsion showing the proper installation.

java version “1.8.0-ea”
Java™ SE Runtime Environ
Java HotSpot™ 64-Bit Ser

Please note that previous vesrion of Java is there also.

JAVA_HOME mentioned as

export JAVA_HOME=‘/usr/lib/jvm/java-8-oracle’

But Tomcat Showing diffent JVM with default memory seetings.

I usullay configure differently. Please can someone tell me whts wrong with this setenv.sh.

Regards

Hannan Khan


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 Hannan,
Did you follow Jim’s tip about the placement of setenv.sh?

Knut

···

On Wed, May 22, 2013 at 1:49 PM, Hannan Khan hannank@gmail.com wrote:

Ok.

I already tested with Oracle JDK 7. Not working.

The problem with the JAVA_HOME variable.

echo $JAVA_HOME returns blank. So setenv.sh is not working. Why it is not working?

I usullay use different method; but as manual sugest to use ‘setenv.sh’ so I try to use that.

Regards

Hannan


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


Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

On Wed, May 22, 2013 at 3:41 PM, Saptarshi Purkayastha sunbiz@gmail.com wrote:

Dear Hannan,

Java 8 is still Early Access. The public release has not been made.
The Oracle roadmap says its Q1 2014 and the beta is planned for Sept 2013.

So its not something that is guaranteed in all cases

Also it seems likely that tomcat is using the other installed Java.
Can you do: sudo update-alternatives --config java
and select the jdk7 that is installed


Regards,
Saptarshi PURKAYASTHA

My Tech Blog: http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE

On 22 May 2013 10:56, Hannan Khan hannank@gmail.com wrote:

Dear Expert Friends

As mentioned in the ‘DHIS2 Implementation guide’ I try to configure few of my new servers I find that the ‘setenv.sh’ might not working. As per the ‘Implementation Guide’ i create the ‘setenv.sh’ in the /bin folder. The active java folder is ‘/usr/lib/jvm/java-8-oracle’ and also java vesrsion showing the proper installation.

java version “1.8.0-ea”
Java™ SE Runtime Environ
Java HotSpot™ 64-Bit Ser

Please note that previous vesrion of Java is there also.

JAVA_HOME mentioned as

export JAVA_HOME=‘/usr/lib/jvm/java-8-oracle’

But Tomcat Showing diffent JVM with default memory seetings.

I usullay configure differently. Please can someone tell me whts wrong with this setenv.sh.

Regards

Hannan Khan


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

Thanks Jim. I will try. As it works for me it will work for me as well. I will get back to you and the community if it is not.

Regards

Hannan

···

On Wed, May 22, 2013 at 5:09 PM, Jim Grace jimgrace@gmail.com wrote:

Dear Hannan,

Funny thing, I was also trying to find the right “bin” folder for setenv.sh for the first time just a couple of hours ago. It isn’t /bin at the root of the drive, but bin under the Tomcat folder. Mine was at /usr/local/apache-tomcat-6.0.36/bin. And putting setenv.sh there worked for me. Yours may be somewhere else.

Cheers,

Jim

On May 22, 2013, at 12:41 PM, Saptarshi Purkayastha sunbiz@gmail.com wrote:

Dear Hannan,

Java 8 is still Early Access. The public release has not been made.
The Oracle roadmap says its Q1 2014 and the beta is planned for Sept 2013.

So its not something that is guaranteed in all cases

Also it seems likely that tomcat is using the other installed Java.
Can you do: sudo update-alternatives --config java
and select the jdk7 that is installed


Regards,
Saptarshi PURKAYASTHA

My Tech Blog: http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE

On 22 May 2013 10:56, Hannan Khan hannank@gmail.com wrote:

Dear Expert Friends

As mentioned in the ‘DHIS2 Implementation guide’ I try to configure few of my new servers I find that the ‘setenv.sh’ might not working. As per the ‘Implementation Guide’ i create the ‘setenv.sh’ in the /bin folder. The active java folder is ‘/usr/lib/jvm/java-8-oracle’ and also java vesrsion showing the proper installation.

java version “1.8.0-ea”
Java™ SE Runtime Environ
Java HotSpot™ 64-Bit Ser

Please note that previous vesrion of Java is there also.

JAVA_HOME mentioned as

export JAVA_HOME=‘/usr/lib/jvm/java-8-oracle’

But Tomcat Showing diffent JVM with default memory seetings.

I usullay configure differently. Please can someone tell me whts wrong with this setenv.sh.

Regards

Hannan Khan


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


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

You must put the setenv.sh file in the correct bin directory,. If you have installed with the package manager, this will usually be in /usr/share/tomcat7/bin/ directory. This is really not a good idea, unless you only have a single instance of Tomcat on this machine.

If you are using a local installation (obtained through a tar archive) then it should go in the respective /bin/ directory where you extracted the archive into.

We need to revise the documentation really, to utilize the tomcat-user package, which provides a much better mechanism, as you can still use the package manager, but create multiple instances of tomcat on the same machine.

Regards,

Jason

···

On Wed, May 22, 2013 at 1:09 PM, Jim Grace jimgrace@gmail.com wrote:

Dear Hannan,

Funny thing, I was also trying to find the right “bin” folder for setenv.sh for the first time just a couple of hours ago. It isn’t /bin at the root of the drive, but bin under the Tomcat folder. Mine was at /usr/local/apache-tomcat-6.0.36/bin. And putting setenv.sh there worked for me. Yours may be somewhere else.

Cheers,

Jim

On May 22, 2013, at 12:41 PM, Saptarshi Purkayastha sunbiz@gmail.com wrote:

Dear Hannan,

Java 8 is still Early Access. The public release has not been made.
The Oracle roadmap says its Q1 2014 and the beta is planned for Sept 2013.

So its not something that is guaranteed in all cases

Also it seems likely that tomcat is using the other installed Java.
Can you do: sudo update-alternatives --config java
and select the jdk7 that is installed


Regards,
Saptarshi PURKAYASTHA

My Tech Blog: http://sunnytalkstech.blogspot.com
You Live by CHOICE, Not by CHANCE

On 22 May 2013 10:56, Hannan Khan hannank@gmail.com wrote:

Dear Expert Friends

As mentioned in the ‘DHIS2 Implementation guide’ I try to configure few of my new servers I find that the ‘setenv.sh’ might not working. As per the ‘Implementation Guide’ i create the ‘setenv.sh’ in the /bin folder. The active java folder is ‘/usr/lib/jvm/java-8-oracle’ and also java vesrsion showing the proper installation.

java version “1.8.0-ea”
Java™ SE Runtime Environ
Java HotSpot™ 64-Bit Ser

Please note that previous vesrion of Java is there also.

JAVA_HOME mentioned as

export JAVA_HOME=‘/usr/lib/jvm/java-8-oracle’

But Tomcat Showing diffent JVM with default memory seetings.

I usullay configure differently. Please can someone tell me whts wrong with this setenv.sh.

Regards

Hannan Khan


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


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


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