Site Archives java
Remote control debugging
If you are developing in java with eclipse then add this to the start up script of any apps you are developing -Xrunjdwp:transport=dt_socket,suspend=n,server=y,address=8993
You can then connect to them remotely using the Remote Java Application debug configuration in eclipse. You can then use the eclipse debugger to step through any tricky code.
The application will start […]
Cross platform fun
While debugging some test problems with the T2 code I discovered some issues between OSX and Windows regards file paths and line breaks. Seems that instead of just
inputs.put(”fileUrl”, LocalworkerTranslator.class.getResource( “/AAC4_HUMAN.sp”).getFile());
you have to ensure that the absolute path is correct by doing
URI uri = LocalworkerTranslator.class.getResource(”/AAC4_HUMAN.sp”) .toURI();
File newFile = new File(uri);
inputs.put(”fileUrl”, newFile.getAbsolutePath());
Also, you can’t expect checks for […]
Launch your Browser
While developing the Taverna myExperiment plugin we needed some way of launching a browser when clicking on a link. Launching a browser is fairly easy using Runtime.exec(”firefox”, URL); However, how do you know what browsers are installed and what the default one is. Step forward BrowserLauncher2 (http://browserlaunch2.sourceforge.net/).
BrowserLauncher launcher = new BrowserLauncher();
launcher.openURLinBrowser(”http://www.google.com”);
Job done.
Future visions
Writing a User Interface is quite often the hardest part of any development job. Everyone likes different look and feel and they seem to take forever to develop. I tend to hand code using Swing (Java’s default GUI) because I have not found an interactive GUI designer which I am comfortable with. […]
Find It Quickly
Find what you're looking for quickly by using our keyword search. Can't find it? Try our links below.


