>> if (!javaversion14orabovedetected)
>
>IMHO better idea than checking the version number is checking features
>(e.g. if loading of NIO classes creates ClassNotFoundExceptions...).
yes this is very true and it has been coded just like you suggested (from cvs@):
- tcpConnection.setInputBandwidth(ibw);
- tcpConnection.setOutputBandwidth(obw);
+ try{
+ tcpConnection.setInputBandwidth(ibw);
+ tcpConnection.setOutputBandwidth(obw);
+ }catch(NoClassDefFoundError e){
+
if(e.getMessage().indexOf("java/nio/channels/spi/AbstractInterruptibleChannel") != -1){
+ String error = "Your Java installation is too old
(insufficient NIO support). Please update it to 1.4.1 or later; you can do that at
http://java.sun.com/ .";
+ System.err.println(error);
+ Core.logger.log(Node.class, error, Core.logger.ERROR);
+ System.exit(1);
+ }else
+ throw e;
+ }
_______________________________________________
devl mailing list
[EMAIL PROTECTED]
http://hawk.freenetproject.org:8080/cgi-bin/mailman/listinfo/devl