JXTA is up and running

After several hours of messing with libraries, ant, eclipse and my Java environment I managed to get a build with basic JXTA support running. I tried so many different things that I think its worth noting some of the more obscure tricks I found online to get things working. Its also worth noting that doing this sort of �debugging� is very annoying and I�m not sure that its really programming, more configuration management.

  • To get ant to compile your source in eclipse you need to let it know where the tools.jar file is. Got to Window->Preferences->ant->Runtime. Add tools.jar to the Runtime Classpath.
  • You need several libraries to make Jxta work that are not on the project download page. Download one of the binary install packages instead, this contains the libraries you need, as pointed out in the Project JXTA 2.0: Java Programmer�s Guide on page 24.
  • Set your JAVA_HOME, mine wasn�t set and this caused problems with running ant at the command line.
  • When JXTA starts up (actually when you create the Net Peer Group) it shows the big nasty configurations dialog. This is good for me because I don�t have to write my own. Its also good for beta testers because the configuration is saved and you wont be prompted for it when you upgrade.

Ant 1.6 is out, with improved FTP support, something I am interested in for automated drops to this website. Ant 1.6 wont work with Eclipse 2.1.2, it gives an error:

BUILD FAILED: java.lang.NoSuchMethodError:

If anyone knows a fix for this let me know.

Next its on to doing things with groups. Listing groups, joining groups, creating groups and listing members of group.



Comments are closed.