Skip to content

Commit 311a074

Browse files
committed
Fix spring boot adapter for java8+
- Fixes 119
1 parent 0d8ce22 commit 311a074

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

lsp-java-boot.el

100644100755
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,17 @@ Store CALLBACK to use it `sts/highlight'."
118118

119119
(defun lsp-java-boot--ls-command (port)
120120
"Create LS command for PORT."
121-
(list lsp-java-java-path
122-
(format "-Dloader.path=%s" (lsp-java-boot--find-tools-jar))
123-
(format "-Dspring.lsp.client-port=%s" port)
124-
(format "-Dserver.port=%s" port)
125-
"-Dsts.lsp.client=vscode"
126-
(concat "-Dsts.log.file=" (make-temp-file "sts-log-file" nil ".log"))
127-
(concat "-Dlogging.file=" (make-temp-file "logging-file" nil ".log"))
128-
"-jar"
129-
(lsp-java-boot--server-jar)))
121+
(-filter 'identity
122+
(list lsp-java-java-path
123+
(unless (lsp-java--java-9-plus-p)
124+
(format "-Dloader.path=%s" (lsp-java-boot--find-tools-jar)))
125+
(format "-Dspring.lsp.client-port=%s" port)
126+
(format "-Dserver.port=%s" port)
127+
"-Dsts.lsp.client=vscode"
128+
(concat "-Dsts.log.file=" (make-temp-file "sts-log-file" nil ".log"))
129+
(concat "-Dlogging.file=" (make-temp-file "logging-file" nil ".log"))
130+
"-jar"
131+
(lsp-java-boot--server-jar))))
130132

131133
(lsp-register-client
132134
(make-lsp-client :new-connection

0 commit comments

Comments
 (0)