Galder, can you also try `name.replace(/\./g, '/')`? It may work with both JDKs.
I'm not sure why name.replace(".", "/") works in JDK7, it's not supposed to: http://www.javascripter.net/faq/regularexpressionstringreplace.htm