diff --git a/engine/src/desktop/com/jme3/asset/plugins/UrlLocator.java b/engine/src/desktop/com/jme3/asset/plugins/UrlLocator.java index 691fa2b32..bb54d598c 100644 --- a/engine/src/desktop/com/jme3/asset/plugins/UrlLocator.java +++ b/engine/src/desktop/com/jme3/asset/plugins/UrlLocator.java @@ -33,12 +33,9 @@ package com.jme3.asset.plugins; import com.jme3.asset.*; -import java.io.FileNotFoundException; import java.io.IOException; -import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; -import java.net.URLConnection; import java.util.logging.Level; import java.util.logging.Logger; @@ -64,7 +61,12 @@ public class UrlLocator implements AssetLocator { public AssetInfo locate(AssetManager manager, AssetKey key) { String name = key.getName(); try{ - URL url = new URL(root, name); + //TODO: remove workaround for SDK +// URL url = new URL(root, name); + if(name.startsWith("/")){ + name = name.substring(1); + } + URL url = new URL(root.toExternalForm() + name); return UrlAssetInfo.create(manager, key, url); }catch (IOException ex){ logger.log(Level.WARNING, "Error while locating " + name, ex);