Alachisoft NCache 4.1 - Online Documentation

Installing Java Client of NCache on Unix

 
Through Java remote client you can connect your java application to NCache Server running on Windows. NCache Java Remote Client for Unix is available as a .tar.gz file. You can download the latest setup from http://www.alachisoft.com/download.html. Before installing NCache Remote Java Client setup, please configure your environment as discussed below.
 
Pre-Requisites:
 
  • JRE 1.5 or later is required.
  • You need to have working Java environment where the environment variable JAVA_HOME should be pointing to the installation path of Java. If you don't want to configure the JAVA_HOME for the current user then you can provide the Java installation path in install_env.sh shell script. You'll find this script when you unzip the setup file.
 
    [root@..]# java -version
 
Above java version command should return proper description of current working environment. Similarly CLASSPATH  environment variable should also be configured.
 
  • You must have 'root' privileges to install this package.
  • You need to have Install Key that you might have received when downloaded NCache Java Remote Client. Install  key is identical for Cache Server Installation (on Windows OS) as well as for client (.NET and Java) installation. It is a 17 digit alpha-numeric key.
 
 
Java Environment Configurations:
 
In order to use 'install.sh', you must have JRE 1.5 or later installed. Additionally, you need to have your JAVA_HOME point to the root folder of your JRE. Put this in your .bashrc or other similar startup script files or if you have configured the install_env.sh then you can skip these steps.
 
Below is an example for .bashrc for Linux:
 
export JAVA_HOME=/usr/lib/java
 
(path where you have installed JDK)
 
/usr/lib/java should normally have the following folders inside it:
 
- bin
- include
- jre
- lib
 
And, you need to have your PATH point to $JAVA_HOME/bin like this:
 
export PATH=$JAVA_HOME/bin:$PATH
 
On Redhat Linux if you install JDk 1.6.0 through "yum install" , it normally installs JDK in /etc/alternatives/java_sdk_1.6.0 and does not automatically update /usr/lib/java to point to it. If that is the case with you, then you may need to manually create soft-links to the "bin", "include", "jre" , and "lib" folders.
 
In order to make sure that you have correct java version, you can type the following:
 
[root@...]# $JAVA_HOME/bin/java -version
 
Environment Configurations for NCache Java Client:
 
Following steps must be taken before actually running NCache Java Client.
 
  • If you don't want to configure the environment variables for running NCache samples or tools then you should modify the shell script ncache_env.sh with JAVA_HOME, NCACHE_ROOT and CLASSPATH variables otherwise follow under mentioned steps. These variables are restricted to the script only and should be pointed to the correct path of Java and NCache installation paths respectively. You can copy the CLASSPATH from the step 3.
  • You need to setup environment variable named
 
    NCACHE_ROOT=NCacheInstallFolder
 
(default value is '/usr/local/ncache')
you need to have it in your .bash_profile like
 
    export NCACHE_ROOT=/usr/local/ncache
 
  • You need to have following jar files available under your CLASSPATH to run NCache java client.
 
CLASSPATH=$NCACHE_ROOT/lib/NCClient.jar:$NCACHE_ROOT/lib/NCActivate.jar:$NCACHE_ROOT/lib/swing-layout-1.0.jar:$CLASSPATH
 
export CLASSPATH
 
 
See Also
 
Copyright © 2005-2012 Alachisoft. All rights reserved.