yura_mdj

updated

16 years ago

Y

yura_mdj

5 Posts

0

4670

August 11th, 2010 01:00

using JCASScript in shell bash

hello

How can i run command not inside shell JCASScript?

I try run script:

--------------------------bash-script----------------------------

#!/bin/bash
LD_LIBRARY_PATH=/PATH_so_libs_for_Linux_64bit
cd $PATH_JCASSCRIPT

echo "IP address EMC Centera 1"
read IP_1
echo "IP address EMC Centera 2"
read IP_2
echo "profile pea file"
read PEA_FILE

java -cp JCASSCRIPT.jar NAME-CLASS poolOpen $IP_1,$IP_2?/PATH_pea_file/$PEA_FILE

--------------------------bash-script----------------------------

# ./JCASScript.del
JCASScript utility provides a command-line interface to the EMC Centera Access API
Exception in thread "main" java.lang.NoClassDefFoundError: Casscript
Caused by: java.lang.ClassNotFoundException: Casscript
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: ..NAME...CLASS.......  Program will exit.

What specify class???

  • gstuartemc

    2 Intern

    •

    417 Posts

    863

    0

    Posted August 11th, 2010 01:00

    You cannot run individual commands from the CLI.

    Within your script file, you will need to redirect the input to allow jcasscript to read the commands from a file. This is covered in other posts on these forums.

    Regards, Graham L. Stuart

    Centera SDK Architect

  • yura_mdj

    5 Posts

    863

    0

    Posted August 11th, 2010 04:00

    thanks, I figured out

    -----------------------------------------------------------------------------------------------------

    echo "poolOpen $IP_1,$IP_2?/opt/centera/pea/$PEA_FILE" > JCASScript.start
    java -jar JCASScript.jar < JCASScript.start

    -----------------------------------------------------------------------------------------------------

    it works!