private static URL getURL(String file) {
        URL url = null;
        try {
            url = new URL("file:" + file);
        } catch (MalformedURLException e) {
            logger.log(Level.WARNING, "Invalid file name '" + file + "'", e);
        }
        return url;
    }
Utility method for converting a String denoting a file into a URL.

@return a URL pointing to the file or null
jme3-awt-dialogs/src/main/java/com/jme3/awt/AWTSettingsDialog.java