Hi Reji,
It seems there is some confusion here. I'm sorry if I led you wrong.
You do not need to build. You need to get Java 6 properly installed,
and it looks like you did.
You should confirm it works before you start playing with POI with
simple examples. I'm sure you can find help with that on the web.
If you are limited to JDK 1.4 then you are limited to POI 3.2
otherwise please use POI 3.5.
Ok, here is what I did
Since I need to use a POI version earlier than 3.5
I unzipped POI 3.2 into C:\work\poi\poi-3.2-FINAL
Now when I run the ant compile jar command I get the following error
C:\work\poi\poi-3.2-FINAL\build.xml:342: Unable to find a javac
compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files\Java\jre6"
I have set the JAVA_HOME environment variable to
JAVA_HOME=C:\rad601\runtimes\base_v6_stub\java\bin\
I am not sure where it is still pointing to C:\Program Files\Java\jre6
You are on WIndows. So may need to restart.
Regards,
Dave
Reji Joseph
GOODYEAR ENGINEERED PRODUCTS
Manufactured and Marketed exclusively by Veyance Technologies, Inc.
972-724-6267 (home/work) / 817-704-0016(work)
817-797-0091(cell)
David Fisher <[email protected]>
11/24/2009 10:43 AM
Please respond to
"POI Users List" <[email protected]>
To
"POI Users List" <[email protected]>
cc
Subject
Re: First time user of the POI
Hi Reji,
The build fails. Here is the log.
Unable to locate tools.jar. Expected to find it in C:\Program
Files\Java\jre6\lib\tools.jar
Are you sure you have the JDK installed?
However, looking back at your original error of
UnsupportedClassVersionError, that's almost always caused by trying
to use a library / class built on a newer JDK with an older JVM (a
newer JVM's always fine though). In the case of POI 3.5, you need
Java 1.5 or newer. The error you received is almost always caused by
people trying to run POI 3.5 on Java 1.3 or 1.4
As Nick points out, and as you confirmed you are running Java 1.4.
You need to install Java 1.5 or 1.6.
You do not need to build POI yourself. Sorry for any confusion. Let us
know how you do with a newer JDK. I'll be considering improvements in
the poi site to help the next person who encounters your issue. This
will at least be on the FAQ page, and possibly on the Build.
Regards,
Dave
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]