[cs615asa] [cs615 linux-lab] question
Renjie Weng
rweng at stevens.edu
Sat Feb 9 19:32:24 EST 2013
Dear Prof. Jan,
Thanks for your reply. My problem is gone. But I don't know why.
As you said,
>It looks like the tool can't find the variable in your environment. How
>did you set it? Copy the exact commands you used.
Then the following is what I did.
------------------------------------------------------------------------------------------------------------
rweng at smurf:~/.ec2$ ec2-version
/home/rweng/.ec2/bin/ec2-cmd: line 18: JAVA_HOME: JAVA_HOME is not set
rweng at smurf:~/.ec2$ echo $JAVA_HOME
/usr/lib/jvm/java-1.6.0-openjdk
rweng at smurf:~/.ec2$ export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk
rweng at smurf:~/.ec2$ ec2-version
1.4.4.1 2011-07-15
When I run ec2-version, it alarmed that "line 18: JAVA_HOME: JAVA_HOME
is not set";
but I had set the environment variables by run "source ./.bash_profile";
and the "echo $JAVA_HOME" shows that I had already set the variables.
It was strange that after I had set the variables by using "export
JAVA_HOME=..." explicitly in command,
then the ec2-tools run successfully.
The same situation was once existed in the $EC2_HOME variable.
-----------------------------------------------------------------------------------------------------------
I added these commands at the end of .bash_profile:
# for EC2
EC2_HOME=~/.ec2
PATH="${PATH}":"${EC2_HOME}"/bin
EC2_PRIVATE_KEY=pk-GNP6YKOCNLFJAOF7HTXHX3KQL6DPWPSE.pem
EC2_CERT=cert-GNP6YKOCNLFJAOF7HTXHX3KQL6DPWPSE.pem
JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk
PATH="${PATH}":"${JAVA_HOME}"/bin
-- Renjie Weng
_________________________________________
> cs615asa mailing list
> cs615asa at lists.stevens.edu
> https://lists.stevens.edu/cgi-bin/mailman/listinfo/cs615asa
>
More information about the cs615asa
mailing list