Here you can find the source of createUri(String name, Kind kind)
private static URI createUri(String name, Kind kind) throws IOException
//package com.java2s; import java.io.IOException; import java.net.URI; import java.net.URISyntaxException; import javax.tools.JavaFileObject.Kind; public class Main { private static URI createUri(String name, Kind kind) throws IOException { try {// w w w .j av a 2s .c om return new URI("mxcache:///" + name.replace('.', '/') + kind.extension); } catch (URISyntaxException e) { throw new IOException(e); } } }