Skip to main content

JXTA and its Application

6 replies [Last post]
nanechane
Offline
Joined: 2007-08-20

I'm using Fedora 7, n I've installed JXTA on that, 1st of all I dont know how to check wether JXTA is running properly or not. Moreover, I am a bit confused, whatelse I shud install, so that I can do programming, I can see Two Applications here http://download.java.net/jxta/, I dont know which one is suitable for that.

Cheers

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dangar27
Offline
Joined: 2008-01-18

Hi nanechane.,
I am sorry to tell you that I think you are not exactly on the right direction... Let me explain:

First thing, you are trying to compile and install jxta-lib-2.4.1.tar.gz in your linux OS. The thing is that, this is not a linux application as you have normally seen, this is a set of precompiled libraries that should be stored at any place in your system path (that can be inside your normal user home, there is no need to create a new user).

Actually, you can compile the jxta sources (so you will need to download the jxta-src-2.4.1.tar.gz file) but AFAIK you will get the same collection of libraries...

> Actually I have made a user (jxtalib) in /home. I
> downloaded that JXTA lib in it i.e (
> jxta-lib-2.4.1.tar.gz ),,, I unzip it in the same
> Haroon user, so its path is
> /home/jxtalib/jxta-lib-2.4.1.tar.gz .
>
> I think this is the main reason, that I cannot
> compile it,,,

No, this is not the reason. You need to untar the jxta-lib-2.4.1.tar.gz somewhere and when point those libraries in the classpath when trying to compile/run your application. (Yes, you need to create your own application, unless you want to try jxta with the shell application that you can find on https://jxse-shell.dev.java.net/ )

> i did another job, that i COPIED all those ( . jar )
> files in /bin ,,, i thot may be that will work there,
> but when i give #java jxta then i get a message,
> which i pasted u before.

This .jar files are not linux binary files, so storing them in /bin is not usefull. Also, I do not think storing them in /lib will be a good idea, maybe at /usr/local/bin will be better (even it is not needed, as I said before, you can store them in your user home directory...)

I wish you luck and a happy programming day ;)

adeladanam
Offline
Joined: 2007-10-21

Dear Mazhar,
I have installed jdk1.5.0 .Inside its lib directory I have copied jxta.jar . Yet , when I try to compile an example like this:javac -classpath .\lib\jxta.jar IDTutorial.java I get 31 errors saying package net.jxta.id , net.jxta.peer ,...does not exist and from here all the other errors. What should I do?Am I forgetting something? Could you please help me?

nanechane
Offline
Joined: 2007-08-20

Dear Asghar,

Thanks for telling me about Programmer's Guide, Actually I have made a user (jxtalib) in /home. I downloaded that JXTA lib in it i.e ( jxta-lib-2.4.1.tar.gz ),,, I unzip it in the same Haroon user, so its path is /home/jxtalib/jxta-lib-2.4.1.tar.gz .

I think this is the main reason, that I cannot compile it,,,

i did another job, that i COPIED all those ( . jar ) files in /bin ,,, i thot may be that will work there, but when i give #java jxta then i get a message, which i pasted u before.

MOREOVER,,

i made a 'haroon' user in /home , and i downloaded ' jdk-6u2-linux-i586-rpm.bin ', and i installed it there,,, and its result is :

jdk-6u2-linux-i586.rpm sun-javadb-core-10.2.2-0.1.i386.rpm
sun-javadb-demo-10.2.2-0.1.i386.rpm
sun-javadb-client-10.2.2-0.1.i386.rpm sun-javadb-docs-10.2.2-0.1.i386.rpm
sun-javadb-common-10.2.2-0.1.i386.rpm sun-javadb-javadoc-10.2.2-0.1.i386.rpm

am i going in a right direction ???

im trying to get help from Programmer's guide, but i cant see any help for Linux, they have mentioned some sort of CLASSPATH
i.e
-----------------
Compiling JXTA Code

The application in this example, HelloWorld, requires the jxta.jar file for compilation. When you run the Java compiler (javac7), you need to include the -classpath option specifying the location of the jxta.jar file. You will need to provide the actual location of the jxta.jar file on your system.
Example compilation command (Windows systems):

C:> javac -classpath .\lib\jxta.jar IDTutorial.java

Running JXTA Applications

When you enter the java8 command to run the application, you need to include the -classpath option specifying the location of the required jar files. You will need to provide the location of the required .jar files.
Example tutorial run command (Windows systems):

C:> java -classpath .\lib\jxta.jar;.\lib\bcprov-jdk14.jar;. IDTutorial

--------------

Mazhar

asghar
Offline
Joined: 2005-07-26

Dear Mazhar,

Unfortunately I’m not familiar with Linux and I didn’t have a touch with Shell, the JXTA application, you have problem with it on Linux.
… So, I’m afraid, not being of some further help for you.

I’m using [b]NetBeans[/b], [b]JXSE [/b], [b]Programmer’s Guide[/b] and [b]myJXTA[/b] application to learn the [b]JXTA[/b].
I think a similar environment can be easily setup on popular open source Unix systems (but I’m not sure). If so, I’ll recommend you that.

Asghar

asghar
Offline
Joined: 2005-07-26

Hello!

First of all: “Do some tests with samples (often referred as tutorials), provided by the Programmer’s Guide 2.5.”

Then try to compile some of these samples against the JXSE 2.5 API (already available to you via installed jxta platform on your workstation).

Before building a project with this sample, you make all necessary libraries accessible to your Java compiler / IDE.
Note that, also the libs of standard JXTA implementation for Java SE ´s dependencies must be accessible too.
These are [b]Jetty[/b] (an open source java based http server, [b]Bouncy Castle[/b] (PKI), [b]Servlet[/b], [b]JDOM[/b] (XML parser) and [b]SwiX[/b] (Swing components, resplendent as XmlDocument).

If you can compile a sample of Programmer’s Guide (2.5) successful, then your JXSE platform is running and working properly.
If so, I recommend you then:

“To read carefully several times the Programmers Guide to understand main structure and operational principles of JXTA by compiling all samples, as ordered there”.

Asghar

nanechane
Offline
Joined: 2007-08-20

In Linux or Fedora, As I am using Fedora, Normall whenever v uncompress files, then v give the following commands.

# tar xvzf package.tar.gz (or tar xvjf package.tar.bz2)
# cd package
# ./configure
# make
# make install

BUT, when i apply tar command to the zip file of JXTA, then i get a different result, and then I dont know how to compile it.

# tar xvzf jxta-lib-2.4.1.tar.gz
bcprov-jdk14.jar
javax.servlet.jar
log4j.jar
org.mortbay.jetty.jar
jdom.jar
swixml.jar
jxta.jar
jxtaext.jar

------------------
This is the area, where I have been stucked from the last four days, Kindly Help

....

Mazhar