From b787cf7f2898a09e5d78b8a610b657de57cc4ab9 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 8 Mar 2006 16:48:32 +0000 Subject: [PATCH] Pack resources in Zip file --- src/jalview/appletgui/AlignFrame.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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; -- 1.7.10.2