Pack resources in Zip file
authoramwaterhouse <Andrew Waterhouse>
Wed, 8 Mar 2006 16:48:32 +0000 (16:48 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 8 Mar 2006 16:48:32 +0000 (16:48 +0000)
src/jalview/appletgui/AlignFrame.java

index 7b8def3..03c0db9 100755 (executable)
@@ -143,9 +143,18 @@ public class AlignFrame extends Frame implements ActionListener,
     String line = null;\r
     try\r
     {\r
-      URL url = new URL(file);\r
+      BufferedReader in = null;\r
+      java.io.InputStream is = getClass().getResourceAsStream("/" + file);\r
+      if (is != null)\r
+      {\r
+        in = new BufferedReader(new java.io.InputStreamReader(is));\r
+      }\r
+      else\r
+      {\r
+        URL url = new URL(file);\r
+        in = new BufferedReader(new InputStreamReader(url.openStream()));\r
+      }\r
 \r
-      BufferedReader in =  new BufferedReader(new InputStreamReader(url.openStream()));\r
       SequenceI seq = null;\r
       String type, desc, token;\r
 \r