Java

How to uninstall Amazon Linux AMI’s Pre-Installed Java JDK and Yum Install a Custom JDK

Amazon Linux (Amazon Linux AMI 2013.03.1) comes pre-installed with Java OpenJDK version 6. If you need Java version 7, you will need to install it yourself.

1. Uninstall the default OpenJDK 6 JRE

sudo yum remove java-1.6.0-openjdk

2. Install OpenJDK 7 JRE as per http://openjdk.java.net/install/

sudo yum install java-1.7.0-openjdk

3. Optionally, also install OpenJDK 7 JDK (which is necessary for Tomcat compiling your JSPs into Servlets)

sudo yum install java-1.7.0-openjdk-devel

4. When you are done, you could verify the version of Java through:

java -version
Share

Logback is unable to recognize variable substitution For scanPeriod property

Sometime in November 2011, on discovering a bug with Logback and subsequently filing a JIRA with Ceki.

http://jira.qos.ch/browse/LOGBACK-396

In June 2012, Ceki advised that this will be fixed in 1.0.7. (Current production version as of today is 1.0.6)

http://github.com/qos-ch/logback/commit/ab197e7ac8a7

Original JIRA ticket:

It seems like Logback is unable to recognize variable substitution for certain properties.

For example the scanPeriod property:

Logback configuration:

<configuration scan="${scan:-true}" scanPeriod="${scan-interval:-10 minutes}">

Specified to take default value of 10 minutes of logback property is not defined.

Logback properties:

scan=true
scan-interval=30 seconds

This property should override the default configuration of 10 minutes.

Logback error:
java.lang.IllegalArgumentException: String value [${scan-interval:-10 minutes}] is not in the expected format.

According to the Duration API, the duration format is correct.

EDIT: Update – 3 October 2012

As i only had time to check today, it appears that Logback 1.0.7 is already out. Cheers. :) Thanks, Ceki.


Share
  • Newsflash

    March 2012: We have change our site theme to F2.
  • Who's Online

    6 visitors online now
    6 guests, 0 members
    Powered by Visitor Maps