aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/org/jdesktop
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/org/jdesktop')
-rw-r--r--src/classes/org/jdesktop/j3d/examples/texture/TextureImage.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/classes/org/jdesktop/j3d/examples/texture/TextureImage.java b/src/classes/org/jdesktop/j3d/examples/texture/TextureImage.java
index 6800d67..cedf1d5 100644
--- a/src/classes/org/jdesktop/j3d/examples/texture/TextureImage.java
+++ b/src/classes/org/jdesktop/j3d/examples/texture/TextureImage.java
@@ -155,7 +155,15 @@ public class TextureImage extends Applet {
java.net.URL url = null;
if (args.length > 0) {
try {
- url = new java.net.URL("file:" + args[0]);
+ final String name = args[0];
+ if (name.startsWith("http:") ||
+ name.startsWith("https:") ||
+ name.startsWith("ftp:") ||
+ name.startsWith("file:")) {
+ url = new java.net.URL(name);
+ } else {
+ url = new java.net.URL("file:" + name);
+ }
} catch (java.net.MalformedURLException ex) {
System.out.println(ex.getMessage());
System.exit(1);