multiple WB - config files

14 views
Skip to first unread message

Darshak

unread,
Jan 17, 2023, 2:58:32 AM1/17/23
to SQL Workbench/J - DBMS independent SQL tool
Hi,

Env - java 11 & WB 129.2

I need to have 2 different WB for different purpose. 
Hence don't want to use same set of config files - -  specially profile need to be different .

I tried to specify -configDir=    OR   -profileStorage in sqlworkbench.cmd . 

:gui
start "SQL Workbench/J" "%JAVA_BINPATH%javaw.exe"^
      --add-opens java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED ^
      --add-opens java.desktop/com.sun.java.swing.plaf.motif=ALL-UNNAMED ^
      -Xmx%max_mem%m ^
      -Dvisualvm.display.name=SQLWorkbench/J ^
      -Dsun.java2d.noddraw=true ^
      -configDir=.\ ^
      -cp "%cp%" workbench.WbStarter %*

Ref : Character # 5 in manual PDF .
It fails with Error - Could not create JVM

what could be issue ?

Thanks,
 Darshak

Thomas Kellerer

unread,
Jan 18, 2023, 12:55:14 PM1/18/23
to sql-wo...@googlegroups.com
The parameter needs to be passed to SQL Workbench not the JVM:

start "SQL Workbench/J" "%JAVA_BINPATH%javaw.exe"^
--add-opens java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED ^
--add-opens java.desktop/com.sun.java.swing.plaf.motif=ALL-UNNAMED ^
-Xmx%max_mem%m ^
-Dvisualvm.display.name=SQLWorkbench/J ^
-Dsun.java2d.noddraw=true ^
-cp "%cp%" workbench.WbStarter -configDir=. -profileStorage=my-profiles.properties %*

Is there a reason you can't use the .exe launcher? There you can pass those parameters directly on the commandline:

SQLWorkbench64.exe -configDir=. -profileStorage=my-profiles.properties


Regards
Thomas

Darshak

unread,
Jan 18, 2023, 11:57:49 PM1/18/23
to SQL Workbench/J - DBMS independent SQL tool

Hi,

>> Is there a reason you can't use the .exe launcher? There you can pass those parameters directly on the commandline:
I can not use (unknown) exe due to restrictions/security applied on computer.
due to good manual/doc & alternate provided by you, I can invoke (& use) WB smoothly (so far). 
Thank You so much for this nice tool.

Meanwhile, for 2nd WB, I have prepared .bat file to invoke sqlworkbench.jar file alongwith required parameters (configDir) as per doc. & it works as expected.
I will also update .cmd file as suggested .

Regards,

Thomas Kellerer

unread,
Jan 19, 2023, 1:28:59 AM1/19/23
to sql-wo...@googlegroups.com
Ah, I see.

Strange rule though, because in the end sqlworkbench.jar is (potentially) just as dangerous as the .exe

Darshak schrieb am 19.01.2023 um 05:57:
>
> Hi,
>
> />> Is there a reason you can't use the .exe launcher? There you can pass those parameters directly on the commandline:/
> I can not use (unknown) exe due to restrictions/security applied on computer.
> due to good manual/doc & alternate provided by you, I can invoke (& use) WB smoothly (so far). 
> Thank You so much for this nice tool.
>
> Meanwhile, for 2nd WB, I have prepared .bat file to invoke sqlworkbench.jar file alongwith required parameters (configDir) as per doc. & it works as expected.
> I will also update .cmd file as suggested .
>
> Regards,
>
>
> On Wednesday, 18 January, 2023 at 11:25:14 pm UTC+5:30 Thomas Kellerer wrote:
> The parameter needs to be passed to SQL Workbench not the JVM:
>
> start "SQL Workbench/J" "%JAVA_BINPATH%javaw.exe"^
> --add-opens java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED ^
> --add-opens java.desktop/com.sun.java.swing.plaf.motif=ALL-UNNAMED ^
> -Xmx%max_mem%m ^
> -Dvisualvm.display.name <http://Dvisualvm.display.name>=SQLWorkbench/J ^
> -Dsun.java2d.noddraw=true ^
> -cp "%cp%" workbench.WbStarter -configDir=. -profileStorage=my-profiles.properties %*
>
> Is there a reason you can't use the .exe launcher? There you can pass those parameters directly on the commandline:
>
> SQLWorkbench64.exe -configDir=. -profileStorage=my-profiles.properties
>
>
> Regards
> Thomas
>
>
> Darshak schrieb am 17.01.2023 um 08:58:
>> Hi,
>>
>> Env - java 11 & WB 129.2
>>
>> I need to have 2 different WB for different purpose.
>> Hence don't want to use same set of config files - -  specially profile need to be different .
>>
>> I tried to specify -configDir=    OR   -profileStorage in sqlworkbench.cmd .
>>
>> :gui
>> start "SQL Workbench/J" "%JAVA_BINPATH%javaw.exe"^
>>       --add-opens java.desktop/com.sun.java.swing.plaf.windows=ALL-UNNAMED ^
>>       --add-opens java.desktop/com.sun.java.swing.plaf.motif=ALL-UNNAMED ^
>>       -Xmx%max_mem%m ^
>>       -Dvisualvm.display.name <http://Dvisualvm.display.name>=SQLWorkbench/J ^
>>       -Dsun.java2d.noddraw=true ^
>>       -configDir=.\ ^
>>       -cp "%cp%" workbench.WbStarter %*
>>
>> Ref : Character # 5 in manual PDF .
>> It fails with Error - Could not create JVM
>>
>> what could be issue ?
>>
>> Thanks,
>>  Darshak
>
> --
> You received this message because you are subscribed to the Google Groups "SQL Workbench/J - DBMS independent SQL tool" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sql-workbenc...@googlegroups.com <mailto:sql-workbenc...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sql-workbench/b4329bae-120e-48ec-9246-d35f9a708f4fn%40googlegroups.com <https://groups.google.com/d/msgid/sql-workbench/b4329bae-120e-48ec-9246-d35f9a708f4fn%40googlegroups.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages