diff --git a/TODO b/TODO index 67f07304..56560aab 100644 --- a/TODO +++ b/TODO @@ -1,7 +1,6 @@ Before 3.0: * multiple requestedPort support, more docs -* add GCJ/GIJ warning on startup * GIJ + java.util.prefs don't work * save default selection of pinger (Combined for non-root users) * command-line scanning start diff --git a/resources/Labels.txt b/resources/Labels.txt index e4f545f2..64d7f2f4 100755 --- a/resources/Labels.txt +++ b/resources/Labels.txt @@ -199,6 +199,7 @@ fetcher.comment=Comments fetcher.comment.info=Allows writing of comments for each host.\nThe comments are persisted and always shown then the host is scanned. fetcher.webDetect=Web detect fetcher.webDetect.info=Detects the web server software name and version, if possible.\n\nWorks by sending a HEAD request and reading the Server HTTP header from the response. +fetcher.httpSender=HTTP Sender fetcher.netbios=NetBIOS Info fetcher.netbios.info=Retrieves the NetBIOS information about Windows machines.\n\nThe response has the following format:\nDOMAIN\\USER@COMPUTER [MAC]\n\nWhere:\nDOMAIN - Windows domain or workgroup\nUSER - currently logged in user\nCOMPUTER - Windows computer name (may be different from DNS name)\nSome parts may be absent, depending on the response.\n\nNote that this won't work with machines that have firewall enabled (which are most modern installations).\nThis fetcher is provided mostly for feature-compatibility with version 2.x. fetcher.unit.ms=\u00A0ms @@ -301,3 +302,10 @@ Special values (also configurable):\n\ text.crippledWindowsInfo=Thank you for trying Angry IP Scanner!\n\n\ However, keep in mind that consumer versions of Windows (e.g. Windows XP SP2, Windows Vista) have limited ability to be hosts for scanning, due to removed RawSocket support and TCP connection rate limiting.\n\n\ Because of that, some preferences were changed for you, making scanning a lot slower than on full-featured operating systems. See the FAQ on Angry IP Scanner homepage. + +text.gnuJavaInfo=Thank you for trying Angry IP Scanner!\n\n\ +The program is currently running under GNU Java (GIJ/GCJ) implementation.\n\n\ +Unfortunately, this version of Java contains some bugs and limitations, which affect Angry IP Scanner.\n\n\ +Known issues:\n- Slow startup\n- Preferences are not saved\n- TCP Pinger and port scanning can give false results\n\ +\nPlease consider using Sun Java from http://java.com or OpenJDK/IcedTea\n\n\ +or... help making Angry IP Scanner and GNU Java compatible by contributing to both projects :-) diff --git a/src/net/azib/ipscan/config/Platform.java b/src/net/azib/ipscan/config/Platform.java index 9c42ef55..dc839dcf 100755 --- a/src/net/azib/ipscan/config/Platform.java +++ b/src/net/azib/ipscan/config/Platform.java @@ -19,11 +19,14 @@ public class Platform { public static final boolean MAC_OS = System.getProperty("mrj.version") != null; /** Linux */ - public static final boolean LINUX = OS_NAME.indexOf("Linux") >= 0; + public static final boolean LINUX = OS_NAME.contains("Linux"); /** Any Windows version */ public static final boolean WINDOWS = OS_NAME.startsWith("Windows"); /** Crippled-down version of Windows (no RawSockets, TCP rate limiting, etc */ public static final boolean CRIPPLED_WINDOWS = WINDOWS && OS_NAME.indexOf("Server") < 0 && Double.parseDouble(System.getProperty("os.version").substring(0, 3)) >= 5.1; + + /** GNU Java, based on GIJ/GCC and GNU Classpath projects */ + public static final boolean GNU_JAVA = System.getProperty("java.vm.vendor").contains("Free Software Foundation"); } diff --git a/src/net/azib/ipscan/gui/MainWindow.java b/src/net/azib/ipscan/gui/MainWindow.java index 7c4e0ec7..c4fad277 100755 --- a/src/net/azib/ipscan/gui/MainWindow.java +++ b/src/net/azib/ipscan/gui/MainWindow.java @@ -96,10 +96,11 @@ public class MainWindow { public void run() { if (Platform.CRIPPLED_WINDOWS) { // inform crippled windows owners of their default configuration - MessageBox box = new MessageBox(MainWindow.this.shell, SWT.ICON_WARNING | SWT.OK); - box.setText(Version.NAME); - box.setMessage(Labels.getLabel("text.crippledWindowsInfo")); - box.open(); + showMessage(Labels.getLabel("text.crippledWindowsInfo")); + } + if (Platform.GNU_JAVA) { + // show a warning if running under GNU Java + showMessage(Labels.getLabel("text.gnuJavaInfo")); } MainWindow.this.shell.forceActive(); new GettingStartedDialog().open(); @@ -110,6 +111,13 @@ public class MainWindow { stateMachine.addTransitionListener(new EnablerDisabler()); } + + private void showMessage(String text) { + MessageBox box = new MessageBox(MainWindow.this.shell, SWT.ICON_WARNING | SWT.OK); + box.setText(Version.NAME); + box.setMessage(text); + box.open(); + } /** * This method initializes shell