Victor Kimura
asked on
where is my j2sdk/bin/jar files Centos 5.9
Hi,
I have to run some shell program provided by Paypal for encrypting their buttons.
In the build-app2.sh program they give:
I have to change the paths.
I'm wondering about JAVA path section:
when I login as my user and su and type:
which java
/usr/bin/java
I get this output in the bin folder:
ls -al | grep 'java'
lrwxrwxrwx 1 root root 22 Jan 13 18:21 java -> /etc/alternatives/java*
lrwxrwxrwx 1 root root 23 Jan 13 18:22 javac -> /etc/alternatives/javac*
lrwxrwxrwx 1 root root 25 Jan 13 18:22 javadoc -> /etc/alternatives/javadoc*
lrwxrwxrwx 1 root root 23 Jan 13 18:22 javah -> /etc/alternatives/javah*
lrwxrwxrwx 1 root root 23 Jan 13 18:22 javap -> /etc/alternatives/javap*
So I have to change the JAVA paths to:
JAVA=/usr/bin/java
JAVAC=/usr/bin/javac
JAR=?
But where do I find the jar files for the java sdk? I'm not quite sure even I installed the java sdk though. Still new to Java.
I'm on a VPS on Godaddy using WHM/cPanel. It's Centos 5.9.
Thank you,
Victor
I have to run some shell program provided by Paypal for encrypting their buttons.
In the build-app2.sh program they give:
#!/bin/bash
export CRYPTO_HOME="/x/home/dhan/java_client/crypto-124"
if [ ! -d ${CRYPTO_HOME} ]; then
echo cannot find crypto distribution ...
return 1;
fi
CLASSPATH="."
CLASSPATH="$CLASSPATH:$CRYPTO_HOME/jars/bcprov-jdk14-124.jar"
CLASSPATH="$CLASSPATH:$CRYPTO_HOME/jars/bcpg-jdk14-124.jar"
CLASSPATH="$CLASSPATH:$CRYPTO_HOME/jars/bctest-jdk14-124.jar"
CLASSPATH="$CLASSPATH:$CRYPTO_HOME/jars/bcmail-jdk14-124.jar"
export CLASSPATH
JAVA=/x/contrib/j2sdk1.4.0/bin/java
JAVAC=/x/contrib/j2sdk1.4.0/bin/javac
JAR=/x/contrib/j2sdk1.4.0/bin/jar
echo
echo "Be sure Java version is at least 1.4"
$JAVA -version
echo ; echo ; #sleep 3
echo "CLASSPATH="
echo $CLASSPATH
echo
echo compiling java files ...
$JAVAC -g -classpath "$CLASSPATH" \
ButtonEncryption.java \
com/paypal/crypto/sample/*.java
echo "Done!!!!!"
I have to change the paths.
I'm wondering about JAVA path section:
JAVA=/x/contrib/j2sdk1.4.0/bin/java
JAVAC=/x/contrib/j2sdk1.4.0/bin/javac
JAR=/x/contrib/j2sdk1.4.0/bin/jar
when I login as my user and su and type:
which java
/usr/bin/java
I get this output in the bin folder:
ls -al | grep 'java'
lrwxrwxrwx 1 root root 22 Jan 13 18:21 java -> /etc/alternatives/java*
lrwxrwxrwx 1 root root 23 Jan 13 18:22 javac -> /etc/alternatives/javac*
lrwxrwxrwx 1 root root 25 Jan 13 18:22 javadoc -> /etc/alternatives/javadoc*
lrwxrwxrwx 1 root root 23 Jan 13 18:22 javah -> /etc/alternatives/javah*
lrwxrwxrwx 1 root root 23 Jan 13 18:22 javap -> /etc/alternatives/javap*
So I have to change the JAVA paths to:
JAVA=/usr/bin/java
JAVAC=/usr/bin/javac
JAR=?
But where do I find the jar files for the java sdk? I'm not quite sure even I installed the java sdk though. Still new to Java.
I'm on a VPS on Godaddy using WHM/cPanel. It's Centos 5.9.
Thank you,
Victor
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
[/usr/lib/jvm]# ls -al
total 36
drwxr-xr-x 3 root root 4096 Jan 13 18:22 ./
drwxr-xr-x 73 root root 28672 Jan 13 18:21 ../
lrwxrwxrwx 1 root root 26 Jan 13 18:22 java -> /etc/alternatives/java_sdk
lrwxrwxrwx 1 root root 32 Jan 13 18:22 java-1.7.0 -> /etc/alternatives/java_sdk
lrwxrwxrwx 1 root root 27 Jan 13 18:22 java-1.7.0-openjdk -> java-1.7.0-openjdk-1.7.0.2
drwxr-xr-x 7 root root 4096 Jan 13 18:22 java-1.7.0-openjdk-1.7.0.2
lrwxrwxrwx 1 root root 34 Jan 13 18:22 java-openjdk -> /etc/alternatives/java_sdk
lrwxrwxrwx 1 root root 21 Jan 13 18:21 jre -> /etc/alternatives/jre/
lrwxrwxrwx 1 root root 27 Jan 13 18:21 jre-1.7.0 -> /etc/alternatives/jre_1.7.
lrwxrwxrwx 1 root root 31 Jan 13 18:21 jre-1.7.0-openjdk -> java-1.7.0-openjdk-1.7.0.2
lrwxrwxrwx 1 root root 29 Jan 13 18:21 jre-openjdk -> /etc/alternatives/jre_open
There is a:
java_sdk or
java_sdk_1.7.0 or
java-1.7.0-openjdk-1.7.0.2