diff --git a/BytecodeViewer 2.9.7-preview.jar b/BytecodeViewer 2.9.7-preview.jar new file mode 100644 index 00000000..23c90c19 Binary files /dev/null and b/BytecodeViewer 2.9.7-preview.jar differ diff --git a/src/resources/intro.html b/src/resources/intro.html new file mode 100644 index 00000000..26516d41 --- /dev/null +++ b/src/resources/intro.html @@ -0,0 +1,67 @@ +Bytecode Viewer (BCV) was designed to be extremely user and beginner friendly, because of this almost everything is accessible through an interface, settings, tools, etc. This means if you give BCV a try you should get the gist of it can do, however for those who don't want to run BCV until they're convinced they should use it, below is a complete list of features BCV has, and what they do. + +

File:

+ + +

View Panes:

+ + +

Settings:

+ + +

Plugins:

+ + +

Notes:

+ + + \ No newline at end of file diff --git a/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java b/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java index 8286b7be..2eb26705 100644 --- a/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java +++ b/src/the/bytecode/club/bytecodeviewer/BytecodeViewer.java @@ -356,10 +356,10 @@ public class BytecodeViewer { System.setSecurityManager(sm); try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + new BootScreen().DO_FIRST_BOOT(args); } catch (Exception e) { new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e); } - new BootScreen().DO_FIRST_BOOT(args); } public static void BOOT(String[] args) { diff --git a/src/the/bytecode/club/bytecodeviewer/gui/BootScreen.java b/src/the/bytecode/club/bytecodeviewer/gui/BootScreen.java index a1f4a371..1f25499b 100644 --- a/src/the/bytecode/club/bytecodeviewer/gui/BootScreen.java +++ b/src/the/bytecode/club/bytecodeviewer/gui/BootScreen.java @@ -55,7 +55,7 @@ public class BootScreen extends JFrame { private JProgressBar progressBar = new JProgressBar(); - public BootScreen() { + public BootScreen() throws IOException { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setIconImages(Resources.iconList); setSize(new Dimension(600, 800)); @@ -79,7 +79,7 @@ public class BootScreen extends JFrame { JEditorPane editorPane = new JEditorPane(); editorPane.setEditorKit(new HTMLEditorKit()); - editorPane.setText("http://www.icesoft.org/java/home.jsf"); + editorPane.setText(convertStreamToString(BytecodeViewer.class.getClassLoader().getResourceAsStream("resources/intro.html"))); scrollPane.setViewportView(editorPane); @@ -91,6 +91,15 @@ public class BootScreen extends JFrame { this.setLocationRelativeTo(null); } + static String convertStreamToString(java.io.InputStream is) throws IOException { + @SuppressWarnings("resource") + java.util.Scanner s = new java.util.Scanner(is).useDelimiter("\\A"); + String string = s.hasNext() ? s.next() : ""; + is.close(); + s.close(); + return string; + } + public void DO_FIRST_BOOT(String args[]) { this.setVisible(true); if(FIRST_BOOT) @@ -208,26 +217,28 @@ public class BootScreen extends JFrame { for(String s : libsFileList ) { if(s.endsWith(".jar")) { File f = new File(s); - setTitle("Bytecode Viewer Boot Screen - Loading Library " + f.getName()); - System.out.println(f.getName()); - - JarFile jarFile = new JarFile(s); - Enumeration e = jarFile.entries(); - ClassPathHack.addFile(f); - while (e.hasMoreElements()) { - JarEntry je = (JarEntry) e.nextElement(); - if(je.isDirectory() || !je.getName().endsWith(".class")){ - continue; - } - try { - String className = je.getName().substring(0,je.getName().length()-6); - className = className.replace('/', '.'); - ClassLoader.getSystemClassLoader().loadClass(className); - } catch(java.lang.VerifyError | java.lang.ExceptionInInitializerError | java.lang.IncompatibleClassChangeError | java.lang.NoClassDefFoundError | Exception e2) { - //ignore + if(f.exists()) { + setTitle("Bytecode Viewer Boot Screen - Loading Library " + f.getName()); + System.out.println(f.getName()); + + JarFile jarFile = new JarFile(s); + Enumeration e = jarFile.entries(); + ClassPathHack.addFile(f); + while (e.hasMoreElements()) { + JarEntry je = (JarEntry) e.nextElement(); + if(je.isDirectory() || !je.getName().endsWith(".class")){ + continue; + } + try { + String className = je.getName().substring(0,je.getName().length()-6); + className = className.replace('/', '.'); + ClassLoader.getSystemClassLoader().loadClass(className); + } catch(java.lang.VerifyError | java.lang.ExceptionInInitializerError | java.lang.IncompatibleClassChangeError | java.lang.NoClassDefFoundError | Exception e2) { + //ignore + } } + jarFile.close(); } - jarFile.close(); } } setTitle("Bytecode Viewer Boot Screen - Booting!");