ok capito:
codice:
    public String jarPath() throws UnsupportedEncodingException {
        String pathJar = this.getClass().getProtectionDomain().getCodeSource().getLocation().getPath();
        int p = pathJar.lastIndexOf(":");
        int s = pathJar.lastIndexOf("/");
        String path = pathJar.substring(p + 1, s + 1);
        return path;
    }
così sembra funzionare anche sotto windows.
grazie!