You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Will Coleda <wi...@coleda.com> on 2010/06/03 16:18:47 UTC

Dependency on Java 6

The web site (http://poi.apache.org/howtobuild.html) and the ant help
task indicate that POI only needs java 1.5, but we have at least one
1.6 dependency:

    [javac] D:/Documents and Settings/501600804/workspace-mye/POI
Build/src/java/org/apache/poi/poifs/crypt/Decryptor.java:52: cannot
find symbol
    [javac] symbol  : method getBytes(java.nio.charset.Charset)
    [javac] location: class java.lang.String
    [javac] byte[] hash =
sha1.digest(password.getBytes(Charset.forName("UTF-16LE")));


Looks like this getBytes variant was added in 1.6.

Is there a reason to stay at 5 (in which case we can patch this to use
the older getBytes(String), or should we update the site & docs to
refer to 6 for working with svn (and 3.7, if this will be included in
that cut)?

-- 
Will "Coke" Coleda

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: Dependency on Java 6

Posted by Nick Burch <ni...@alfresco.com>.
On Thu, 3 Jun 2010, Will Coleda wrote:
> The web site (http://poi.apache.org/howtobuild.html) and the ant help
> task indicate that POI only needs java 1.5, but we have at least one
> 1.6 dependency:

Alas these can creep in from time to time.

>    [javac] D:/Documents and Settings/501600804/workspace-mye/POI
> Build/src/java/org/apache/poi/poifs/crypt/Decryptor.java:52: cannot
> find symbol
>    [javac] symbol  : method getBytes(java.nio.charset.Charset)
>    [javac] location: class java.lang.String
>    [javac] byte[] hash =
> sha1.digest(password.getBytes(Charset.forName("UTF-16LE")));

Should now be fixed

> Is there a reason to stay at 5 (in which case we can patch this to use
> the older getBytes(String), or should we update the site & docs to
> refer to 6 for working with svn (and 3.7, if this will be included in
> that cut)?

I think for now we want to stay with Java 5 for now. POI gets used in lots 
of places, and a surprisingly large number of business deployments are 
sticking with the Java 5 JVM for now. We even still get people asking for 
Java 1.4 every so often!

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Re: Dependency on Java 6

Posted by Paul Spencer <pa...@apache.org>.
I am using POI in many application that do not have Java 1.6.  Adding a 1.6 dependency would not allow the use of POI 3.7 in my environment.

Please the older getBytes(String) !

Paul Spencer


On Jun 3, 2010, at 10:18 AM, Will Coleda wrote:

> The web site (http://poi.apache.org/howtobuild.html) and the ant help
> task indicate that POI only needs java 1.5, but we have at least one
> 1.6 dependency:
> 
>    [javac] D:/Documents and Settings/501600804/workspace-mye/POI
> Build/src/java/org/apache/poi/poifs/crypt/Decryptor.java:52: cannot
> find symbol
>    [javac] symbol  : method getBytes(java.nio.charset.Charset)
>    [javac] location: class java.lang.String
>    [javac] byte[] hash =
> sha1.digest(password.getBytes(Charset.forName("UTF-16LE")));
> 
> 
> Looks like this getBytes variant was added in 1.6.
> 
> Is there a reason to stay at 5 (in which case we can patch this to use
> the older getBytes(String), or should we update the site & docs to
> refer to 6 for working with svn (and 3.7, if this will be included in
> that cut)?
> 
> -- 
> Will "Coke" Coleda
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
> For additional commands, e-mail: dev-help@poi.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org