понеделник, август 03, 2009

Setting different JDK in ms win console

Problem: a couple of Java Development Kits installed on Windows machine, but in console environment, the default is not the needed one.

To check which is default start console and type:
java -version

If it's not the desired one, right-click mouse button on My Computer->Properties->Advanced->Environment variables

Add system variable JAVA_HOME with the path of the desired JDK, e.g. JAVA_HOME = C:\Program Files\Java\jdk1.5.0_14

Add the path of the desired java\bin folder to the System Variable PATH, before any other java (jdk, jre) path declarations:

If android.bat throws exception with text: Unsupported major.minor version 49.0, most probably the default JDK set in console environment is not satisfying the android SDK requirements.

Няма коментари: