0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

is invalid because it does not start with a '-'となった時の対応方法

Posted at
  • 環境
    • Windows 10 Pro 64bit バージョン1909
    • GitBash(mintty 3.1.0)
    • Payara Server 5.194

事象 : PayaraのJVMオプションにパスを設定しようとして怒られた

$ asadmin create-jvm-options -Djava.io.tmpdir=/c/tmp
remote failure: JVM option /tmp is invalid because it does not start with a '-'

Command create-jvm-options failed.

原因 : パスの書き方が間違っているから

この原因にはだれでもすぐ気が付くが、「で、今の環境ではどう書けば?」がわからず試した。

# Windows風でエスケープ文字付の囲み文字なし > だめ
$ asadmin create-jvm-options -Djava.io.tmpdir=C\:\\tmp\\
remote failure: Escape at EOL
Escape at EOL
Usage: create-jvm-options
        [--target <target(default:server)>]
        [--profiler[=<profiler(default:false)>]]
        [--min-jvm=<version>]
        [--max-jvm=<version>]
        [-?|--help[=<help(default:false)>]]
        (jvm_option_name[=jvm_option_value])[:jvm_option_name[=jvm_option_name]]*
Command create-jvm-options failed.

対応 : シングルクォーテーションで囲ってWindows風でエスケープ文字付に書く

# Windows風でエスケープ文字付の囲み文字あり > いけた
$ asadmin create-jvm-options -Djava.io.tmpdir='C\:\\tmp\\'
Created 1 option(s)
Command create-jvm-options executed successfully.

# 確認してみる
$ asadmin list-jvm-options | grep tmpdir
-Djava.io.tmpdir=C:\tmp\

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?