You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/06/10 02:27:01 UTC

[GitHub] [pulsar] lgxbslgx commented on a diff in pull request #15998: [doc] Add a step about JDK17 configuration to the Pulsar SQL document

lgxbslgx commented on code in PR #15998:
URL: https://github.com/apache/pulsar/pull/15998#discussion_r894102904


##########
site2/docs/sql-getting-started.md:
##########
@@ -21,23 +21,34 @@ To query data in Pulsar with Pulsar SQL, complete the following steps.
 
 ```
 
-2. Start a Pulsar SQL worker.
+2. Adjust configuration. (JDK17)
+
+If you use JDK17, you need to add the following options to the configuration file `conf/presto/jvm.config`. Please note that these two lines can not be put into one line.
+
+```bash
+
+--add-opens

Review Comment:
   The config parser of the `lib/presto/bin/launcher.py` will add the quotation to each line, if we put them in one line, the option will be changed to `"--add-opens java.base/java.lang=ALL-UNNAMED"` which can not be identified by `java` command.
   
   You can write a simple class `Test.java`, compile it and run it by using option `"--add-opens java.base/java.lang=ALL-UNNAMED"`.
   
   ```shell
   $ javac Test.java
   $ java "--add-opens java.base/java.lang=ALL-UNNAMED" Test
   ```
   
   The `java` command will reply:
   ```
   Unrecognized option: --add-opens java.base/java.lang=ALL-UNNAMED
   Error: Could not create the Java Virtual Machine.
   Error: A fatal exception has occurred. Program will exit.
   ```
   
   The right usages are shown below (note the quatation):
   ```
   java --add-opens java.base/java.lang=ALL-UNNAMED FinalMethod
   java "--add-opens" "java.base/java.lang=ALL-UNNAMED" FinalMethod
   ```
   
   Or you can use the one line config and run the command of [current document](https://pulsar.apache.org/docs/sql-getting-started), the same error message `Unrecognized option: --add-opens java.base/java.lang=ALL-UNNAMED` also occurs.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org