dev@glassfish.java.net

Re: Unable to create jvm option on Windows

From: Karthik Sudarshan <Karthik.Sudarshan_at_Sun.COM>
Date: Mon, 09 Oct 2006 15:56:06 +0530

Hi Harsha,
    Thanks for the quick reply. The below change works in case of normal
values for the jvm option.
 However, I have further problems. For instance, if I need to give the
value of a directory in Windows, it fails:

    asadmin.bat create-jvm-options -- -Dcom.sun.test=c:\temp

I get an error message :
"Invalid jvm option temp. option must begin with -"

I tried replacing the \ with / and also with \\, but I got the same
error. I also tried to put the value in quotes like "c:\temp" but I
guess that's not the way to go :)

Do you have any suggestions for this?


Thanks
Karthik

Harsha R A wrote:
> Hi Karthik,
> You have to give the option like this
>
> asadmin create-jvm-options --user admin -- -Dtest=test
>
> Note the usage of double hyphen indicating end of asadmin options and
> the beginning of the operand.
>
> Regards,
> Harsha
>
> Karthik Sudarshan wrote, On 10/09/06 14:02:
>> Hi,
>> I've installed Glassfish on Windows. I'm trying to create a new
>> jvm option from the command line using asadmin.bat. The command
>> always fails. A test line was :
>>
>> asadmin.bat create-jvm-options -Dtest=test
>>
>> The message that I got for this was :
>>
>>
>> Usage: create-jvm-options [--terse=false] [--echo=false]
>> [--interactive=true] [-
>> -host localhost] [--port 4848|4849] [--secure | -s] [--user
>> admin_user] [--passw
>> ordfile file_name] [--profiler=false] [--target target(Default
>> server)] (jvm_opt
>> ion_name[=jvm_option_value])[:jvm_option_name[=jvm_option_value]]*
>> CLI011 Invalid option, -Dtest=test
>>
>> If I remove the -D part then I get an error message saying that the
>> option should start with "-".
>>
>> Is there something wrong with the way I'm trying to set the jvm
>> option? I guess not, because, when I used the admin console and
>> created the jvm option it went through fine. So I think this might be
>> a bug in the CLI for windows.
>>
>> If anyone can provide any ideas, it would be great.
>>
>> Thanks,
>> KarthikUnable to create jvm option on Windows
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>