• Post Reply Bookmark Topic Watch Topic
  • New Topic

Lost in JavaSpace

 
Ranji Nambiar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friend,
I have got a book on JavaSpaces-JavaSpaces Principles,Patterns and Practise.....I have started with the first program and am not able to compile it ,i think, due to the non availability of the classes specified in the import statements.
Some of the the import statements include
import com.sun.jini.mahout.binder.RefHolder;
import com.sun.jini.mahout.binder.Locator;
import com.sun.jini.outrigger.Finder;
import net.jini.core.lease.Lease;
import net.jini.space.JavaSpace;
I have already downloaded jini1_0.zip and jstk1_0_1.zip;
jini/lib consists of 16 jarfiles and 1 zip file whereas jstk consists of 5 jar files and 1 zip file. I tried adding some of these files at random in the environment variable of the classpath, but no luck.Should i put all the jar files and zip files in the classpath??
Can I know what would be the jar files to put in the environment classpath variable in order to run the example.
regards,
Ranj
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranj -
I believe you need Jini 1.1 to compile your JavaSpace code references correctly.
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
 
Ranji Nambiar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Michael,
I have downloaded jini 1.1, and the applications are running after I read a web page that goes something like "Nuts and bolts of how to run javaspace programs". But I am not able to run applets either in the browser or using appletviewer. Using appletviewer I am getting an exception like
java.lang.NoClassDefFoundError:net/jini/core/entry/Entry
In the browser I am getting an additional RemoteException.
Please note that the files are compiling correctly and hence this could not be due to a problem in the classpath.
Kindly guide me so that the applets in the book can be run.
regards,
Ranj
 
David Joiner
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looking at the date, this is way after the fact, but in case someone out there is trying to figure this out....
I found myself with the same problem, and used The Nuts and Bolts of Compiling and Running JavaSpaces programs to figure out how to get the server(s) running.
OK, really cheesy solution ahead ....
To get the code to compile, in my $JINI_HOME directory I created a directory Classes, and went ahead and extracted all of the jar files from $JINI_HOME/lib. I also created a directory jsbook, in which I put the example code from Principles, Patterns, and Practices. I compiled all of the source code from P, P, and P.
Strictly to reduce typing I created symbolic links /java and /jini to point to $JAVA_HOME and $JINI_HOME respectively. (sloppy, yes, but hey, it's my machine, you don't have to administer it)

To compile, I then used
javac -classpath /jini/Classes:/java/Classes:.
*.java
 
David Joiner
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looking at the date, this is way after the fact, but in case someone out there is trying to figure this out....
I found myself with the same problem, and used The Nuts and Bolts of Compiling and Running JavaSpaces programs to figure out how to get the server(s) running.
OK, really cheesy solution ahead ....
To get the code to compile, in my $JINI_HOME directory I created a directory Classes, and went ahead and extracted all of the jar files from $JINI_HOME/lib. I also created a directory jsbook, in which I put the example code from Principles, Patterns, and Practices. I compiled all of the source code from P, P, and P.
Strictly to reduce typing I created symbolic links /java and /jini to point to $JAVA_HOME and $JINI_HOME respectively. (sloppy, yes, but hey, it's my machine, you don't have to administer it)

To compile, I then used
javac -classpath /jini/Classes:/java/Classes:.
*.java
 
David Joiner
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looking at this, that doesn't really answer the question as posed.
The jar file that need to be included was space-examples.jar, otherwise com.sun.outrigger.Finder.class is not included.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!