簡體   English   中英

適用於Eclipse的Google插件:如何在Run配置中添加JVM參數

[英]Google plugin for Eclipse: how to add JVM arguments in the Run configuration

https://developers.google.com/appengine/docs/java/cloud-sql/developers-guide中所述,我需要在文本框“程序自變量”中的“自變量”選項卡上的“自變量”中向我的App Engine運行配置添加自變量。

 --jvm_flag=-Drdbms.server=local
 --jvm_flag=-Drdbms.driver=com.mysql.jdbc.Driver
 --jvm_flag=-Drdbms.url=jdbc:mysql://localhost:3306/yourdatabase?user=username&password=password 

但是我總是會得到,快速錯誤:

Usage: <dev-appserver> [options] <app directory>

Options:
 --help, -h                 Show this help message and exit.
 --server=SERVER            The server to use to determine the latest
  -s SERVER                   SDK version.
 --address=ADDRESS          The address of the interface on the local machine
  -a ADDRESS                  to bind to (or 0.0.0.0 for all interfaces).
 --port=PORT                The port number to bind to on the local machine.
  -p PORT
 --sdk_root=DIR             Overrides where the SDK is located.
 --disable_update_check     Disable the check for newer SDK versions.
 --generated_dir=DIR        Set the directory where generated files are created.
 --jvm_flag=FLAG            Pass FLAG as a JVM argument. May be repeated to
                              supply multiple flags.

我究竟做錯了什么?

Run Configurations - Arguments ,將以下jvm_flag參數添加到VM arguments部分,而不是“ Program arguments部分:

-Drdbms.server=local
-Drdbms.driver=com.mysql.jdbc.Driver
-Drdbms.url=jdbc:mysql://localhost:3306/yourdatabase?user=username&password=password

這應該可以解決您的問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM