× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Hi James,

One common misunderstanding, I've had it too, is that if you
give a generic path to a directory containing libraries (JAR's)
that each one will be loaded in the classpath. You have to
explicitly indicate which JAR's you want in your classpath.

This has changed in Java 6, although there can still be bugaboos. The extension mechanism has also been, um, extended. See "Understanding class path wildcards" at:

http://java.sun.com/javase/6/docs/technotes/tools/windows/classpath.html


Joe Sam

Joe Sam Shirah - http://www.conceptgo.com
conceptGO - Consulting/Development/Outsourcing
Java Filter Forum: http://www.ibm.com/developerworks/java/
Just the JDBC FAQs: http://www.jguru.com/faq/JDBC
Going International? http://www.jguru.com/faq/I18N
Que Java400? http://www.jguru.com/faq/Java400

----- Original Message ----- From: "James Perkins" <jrperkinsjr@xxxxxxxxx>
To: "Java Programming on and around the iSeries / AS400" <java400-l@xxxxxxxxxxxx>
Sent: Tuesday, February 02, 2010 10:27 AM
Subject: Re: Starting off with POI/HSSF


If you have the 32-bit version of Java 5 installed you can add this
environment variable to enable it for your job.

ADDENVVAR ENVVAR(JAVA_HOME)
VALUE('/QOpenSys/QIBM/ProdData/JavaVM/jdk50/32bit')

Make sure your classpath variable is CLASSPATH (all caps). You
probably don't need the scratchpad JAR or the contribute JAR either.
Also you should be using the absolute path to the JAR files. So it
should be ".:/home/FOXWELL/java/jars/POI-3.0.1-FINAL-20070705.JAR".
Currently you have each JAR with a / (path separator) at the start of
each file name which tells the ClassLoader to look in the root (/)
directory for the JAR.

Just a general note a the classpath too. It's best to always add a .
(dot) to your classpath, I usually put it in the beginning of the
string. That allows you to run Java classes from your current
directory.

One common misunderstanding, I've had it too, is that if you give a
generic path to a directory containing libraries (JAR's) that each one
will be loaded in the classpath. You have to explicitly indicate which
JAR's you want in your classpath. Now I know there are ways around
this using custom ClassLoaders and various other ways, but explicitly
defining them in your classpath is much simpler.

--
James R. Perkins


On Tue, Feb 2, 2010 at 00:58, David FOXWELL <David.FOXWELL@xxxxxxxxx> wrote:

Ok thanks all.

Installed the older poi 3.0.1 as I don't see how to get the
JVM version. By the way, apparently it's possible to indicate
which version of JVM to use with a parameter if several
versions are installed. Anyone know that syntax?

Now my problem seems to be CLASSPATH as I'm getting a class
not found error.

Here's my classpath value :
Value . . . . . . . . . :
'/home/FOXWELL/java/jars:/POI-3.0.1-FINAL-20070705.
JAR:/POI-CONTRIB-3.0.1-FINAL-20070705.JAR:/POI-SCRATCHPAD-3.0.
1-FINAL-20070705.J
AR:.'



I'm not sure about this. My current directory when I sign on
is /home/FOXWELL. Can someone indicate if I have the right CLASSPATH?




> > -----Message d'origine-----
> > [mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de
> Scott Klement
> > Envoyé : mardi 26 janvier 2010 18:52 À : Midrange Systems Technical
> > Discussion Objet : Re: Starting off with POI/HSSF
> >
> > Hi David,
> >
> > It appears that you are using a version of Java that's too
> old for the
> > version of POI that you downloaded. (That's what
> > UnsupportedClassVersionError means)
> >
> > Either use a newer JVM or an older POI jar.
> >
> > -SK
> >
> >
> > On 1/26/2010 6:56 AM, David FOXWELL wrote:
> > >
> > > Hi, I've installed poi-3.6-20091214.jar and hssfr4.rpgle
> > dated 10/7/2007 and getting a compatibility error :
> > >
> > >
> > > Cause . . . . . : La procédure RPG XLCRTDEMO du programme
> > FOXWELL/XLCRTDEMO a
> > > reçu une erreur Java "java.lang.UnsupportedClassVersionError:
> > > org/apache/poi/hssf/usermodel/HSSFWorkbook" en appelant
> > la méthode "<ini"
> > > avec la signature "" dans la classe
> > > "org.apache.poi.hssf.usermodel.HSSFWorkbook".
> > >
> > > Is it the version of JAVA on the i or the wrong version of
> > hssfr4.rpgle? How do I check?
> > >
> > > Thanks.
> >


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.