Skip to main content

JXSE 2.7 dependencies

5 replies [Last post]
fransk
Offline
Joined: 2011-01-06
Points: 0

Hello!

I have bought and read "Practical JXTA II" by J. Verstrynge and I feel I am ready to build my own P2P system now. I have downloaded JXSE 2.7 and lib-dependencies-2.7.zip. But trying to build a simple project (in Eclipse) failed with a java.lang.NoClassDefFoundError: org/jboss/netty/channel/socket/httptunnel/HttpTunnelClientChannelFactory. The error is correct - the class does not exist in netty-3.1.5.GA.jar.

I also found a Maven POM file for JXSE 2.7: jxse-2.7.pom. I hope it can help me to get the dependencies straight, but so far I have been struggling to get Maven to download all the right dependencies. Probably because I am not familiar with Maven (yet).

So my question is: What is the best way to get the dependencies straight for JXSE 2.7? Try to fix the errors in lib-dependencies-2.7.zip? Or go the Maven route?

Thanks in advance,

Frans

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
larrynorth
Offline
Joined: 2011-08-30
Points: 0

Hi,

I do not use any of IDE's, however, it seems that you have CLASSPATH problem.

Remember to set the CLASSPATH=/dependency1.jar:/x/depencency2.jar:/path/to/tutorials/src/

so that java can find where your tutorial package is located. Recall that all turorial are in package tutorial.*!

when you have added them to classpath, remember to export it, then from jxta_src/tutorials/src directory execute

java tutorial.helloworld.HelloWorld

and it should work fine! Also to remember that tutorials are 2.6 and you have 2.7 some of the methods can be deprecated and do not behave accordingaly. The sames goes for dependency libraries.

Have fun!

wangzhanyu
Offline
Joined: 2011-08-10
Points: 0

hey friend, i am reading Practicial JXTA II too. and i have a problem now.

When i followed the example of Page 167, namely the Jack and Anna example, Anna can manage to connect to Jack, but Anna didn`t appear in Jack's list. This result is different from the book.According the book, Anna's is should be printed on Jack's list.

Could you or anyone help me? Any clue?

thanks.

wangzhanyu
Offline
Joined: 2011-08-10
Points: 0

hey friend, i am reading Practicial JXTA II too. and i have a problem now.

When i followed the example of Page 167, namely the Jack and Anna example, Anna can manage to connect to Jack, but Anna didn`t appear in Jack's list. This result is different from the book.According the book, Anna's is should be printed on Jack's list.

Could you or anyone help me? Any clue?

thanks.

ugarz
Offline
Joined: 2011-08-06
Points: 0

wangzhanyu: what version of jxse do you use? I have the same with 2.7 but it works fine. Using jxse 2.6 jack's behaviour is identical to descibed in the book.

wangzhanyu
Offline
Joined: 2011-08-10
Points: 0

hey Ugarz, it is nice to recieve your reply. i use version2.6, and it does have a fault in the official example. I have tackled the problem. i have never try the version2.7.

I have a question, how to design an instance which establishes a connection through NAT? Can the LAN peer with ip 192.168.3.2 connect to a public IP peer with 202.118.110.110 through a router properly configured?

Thanks!