From: amwaterhouse Date: Wed, 8 Mar 2006 16:48:32 +0000 (+0000) Subject: Pack resources in Zip file X-Git-Tag: Root_VamJalview_2_07b+~85 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=b787cf7f2898a09e5d78b8a610b657de57cc4ab9;p=jalview.git Pack resources in Zip file --- diff --git a/src/jalview/appletgui/AlignFrame.java b/src/jalview/appletgui/AlignFrame.java index 7b8def3..03c0db9 100755 --- a/src/jalview/appletgui/AlignFrame.java +++ b/src/jalview/appletgui/AlignFrame.java @@ -143,9 +143,18 @@ public class AlignFrame extends Frame implements ActionListener, String line = null; try { - URL url = new URL(file); + BufferedReader in = null; + java.io.InputStream is = getClass().getResourceAsStream("/" + file); + if (is != null) + { + in = new BufferedReader(new java.io.InputStreamReader(is)); + } + else + { + URL url = new URL(file); + in = new BufferedReader(new InputStreamReader(url.openStream())); + } - BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream())); SequenceI seq = null; String type, desc, token;