Palimpsest has moved. Please visit our blog in its new location for the most recent posts from Scriptorium.
Palimpsest
DITA OT installation: check your JDK version if you're having problems
Tuesday, September 30, 2008 — posted by Alan Pringle
I have been indulging in a bit of avoidance behavior by not installing the DITA Open Toolkit on my newer laptop. Well, I broke down today and installed the latest build of the OT, but the experience was not pain free, for sure. (And it was equally not fun when I installed it on my previous computer.)To make a long story short, I had an older version of the JDK that was causing my first test run to barf while creating XHTML output, and searching on the error messages led to a helpful blog entry:
OK, so I download and install JDK 1.4.2.18, set my JAVA_HOME environment variable, and add the location of the Java executable to my CLASSPATH environment. I restart my system for good measure, run startcmd.bat, and try to run some of the samples. The build fails, with a "java.lang.UnsupportedClassVersionError: org/dita/dost/invoker/AntInvoker (Unsupported major.minor version 49.0)" message. Arggh.
I surf over the dita-users group on Yahoo! and try to search the archives, but the search mechanism is temporarily broken. When I eventually search my e-mail locally, I find a thread that lets me know that JDK 1.5.x is required. Once this JDK is installed, the samples run as they should. I know enough Ant to quickly add a few targets to the build_demo.xml and generate the CHM and PDF files that I wanted.I installed the latest JDK and set the JAVA_HOME environment variable, and all was well after that.
I looked back at the installation documentation that's included in OT download, and it does indeed mention an old (and incorrect) version of the JDK:
The online version of the OT documentation has the correct JDK requirements:
- Java runtime or development environment
- Provides the basic environment for most tools used in this toolkit.
You can download and install the Java Development Kit (JDK) 1.4.2 (available on http://java.sun.com/j2se/index.jsp) into a directory of your choice.
So, if your new installation of the DITA OT is failing, there is a good chance you need to update your JDK.
DITA Open Toolkit is written in Java and requires at least a minimal set of Java applications be installed. Java SDK 1.5 or 1.6 must be used to execute the applications and the Toolkit Java code.
Labels: dita
2:02 PM Permalink |
<< Home

