Home >Operation and Maintenance >Linux Operation and Maintenance >Example of multiplication table implemented by shell script
#Declaration script
#!/bin/bash
#Print "------cfb------- --"
echo "------cfb---------"
#java environment variable
JAVA_HOME=/ usr/java/jdk1.8.0_11
CLASSPATH=$JAVA_HOME/bin
#Specify the location where the jar package needs to be executed, you can set it yourself
JARPATH=/home/haha/Desktop
#Standard format of environment variables
CLASSPATH=$CLASSPATH:$JARPATH/cfb.jar
#export is used to set or add environment variables, and is limited to this login operation. If you don’t write it, the main class cannot be found
export CLASSPATH=$CLASSPATH
#Print environment variables
echo $CLASSPATH
#Execute the main method in jingdian.CfbDemo class
java -Xms50m -Xmx250m jingdian. CfbDemo
#Exit
exit
Final printing effect
The above is the detailed content of Example of multiplication table implemented by shell script. For more information, please follow other related articles on the PHP Chinese website!