Wednesday, June 27, 2012

Switch Linux Java Version (Ubuntu 12.04)

I installed a new version of Java on Linux.  How do I quickly make it the default?

$ java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-4ubuntu3)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

$ update-java-alternatives -l
java-1.6.0-openjdk-amd64 1061 /usr/lib/jvm/java-1.6.0-openjdk-amd64
java-1.7.0-openjdk-amd64 1051 /usr/lib/jvm/java-1.7.0-openjdk-amd64

$ sudo update-java-alternatives -s java-1.7.0-openjdk-amd64

$ java -version
java version "1.7.0_03"
OpenJDK Runtime Environment (IcedTea7 2.1.1pre) (7~u3-2.1.1~pre1-1ubuntu3)
OpenJDK 64-Bit Server VM (build 22.0-b10, mixed mode)


Sunday, June 17, 2012

Google Chart API Shows Only One Chart

When using Google Charts, a single chart is shown despite adding multiple charts.

The <div> element is a non-void(non-empty) element and should not be self closed.

Single graph shows:
  <div id="month_type" class="chg_chart"/>
  <div id="month_cat" class="chg_chart"/>
  <div id="month_region" class="chg_chart"/>

Three graphs show:
  <div id="month_type" class="chg_chart"></div>
  <div id="month_cat" class="chg_chart"></div>
  <div id="month_region" class="chg_chart"></div>

  1. stackoverflow: is it possible to have multiple google charts in one page?