← Back to team overview

dhis2-users team mailing list archive

Re: 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@xxxxxxxxx> 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@xxxxxxxxxxx>
> 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@xxxxxxxxxxx <mailto:kmalewezi@xxxxxxxxxxx > |
>> www.jhpiego.org<http://www.jhpiego.org/>
>>
>> Skype: kabango.malewezi | Twitter: kabangoM
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>


Follow ups

References