Home>

We run ubuntu with WSL and connect to an external server with ssh.
I'm having trouble registering commands.
Currently in .login
setenv PATH"/home/usr-name/custom_command: $PATH"
The custom command is entered in custom_command.
Here, if you write "<java execution full path>-cp. Main" in custom_command/java, you can execute Main with the java command. I do something like this).
However, if you only write<java's full path>and -cp. Main is not written in custom_command/java, the usage will only be displayed when java -cp. not.
I do not know what is wrong. Please help.

  • Answer # 1

    In custom_command/java,

    <full path of java execution>"[email protected]"


    Please write. The argument is passed to<java's full path of execution> ;.

    Or, in.login, stop changingPATHand

    alias java<java execution full path>


    If you writejavaon the command line, you will type<java's full path of execution>.
    This is the normal way.

  • Answer # 2

    You can add<java's full path>to your PATH.
    The shell searches the PATH variable to find where the first java is, not to find where the argument file is.

  • Answer # 3

    How about doing the following?
    custom_command/my_java contents

    <full path to java execution>$*

    Console input

    $my_java -cp. Main

    The -cp. specified on the console may need some adjustment.
    my_java

    pushd ~
    <full path of java execution>$*
    popd


    It may be possible to do as follows.