The only way that I know of to do this is intitialize the JavaScript Array with your Java array when the page is created.
i.e. You have a Java array, myJavaArray[][], and a JavaScript Array, myJSArray[][].
<SCRIPT TYPE="text/javascript">
<% for (int i=0;i<myJavaArray.length;i++) {
for (int j=0;j<myJavaAray.length;j++) { %>
myJSArray[<%=i%>][<%=j%>] = '<%=myJavaArray[j]%>';
<%}
} %>
</SCRIPT>
Warning, this can take some time for large arrays. Hope this helps.