Sublime Forum

Java web development

#1

Hello dear everyone. I want to learning java web development, but i would like to using vim or sublime text instead of intellij idea. It is possible to work without intellij idea.

0 Likes

#2

Yes. I would recommend to install LSP Plugin and configure it to use the java language server provided by eclipse (https://langserver.org).

1 Like

#3

Tnx so much :slight_smile:

0 Likes

#5

EDIT: I GOT IT WORKING

I had to wipe my projects /workspace/ directory, probably due to a bad initial install, and I also had to remove extra CLI arguments that the eclipse.jdt.ls repo had listed to run the jar / server

  1. clone the repo, install/configure shell to use JDK 8 (corresponds to JVM 1.8)

  2. follow repo instructions (ignore install of Eclipse and the port/name stuff – took 12:30 minutes to install the core dependencies)

  3. install Sublime Package “LSP” --> CMD+Shift+P --> LSP Settings (see below)

  4. close .java files, do CMD+Shift+P “Enable Language Server Globally” → “jdtls”

  5. quit and re-open Sublime :slight_smile:

  6. re-open .java files and hover over anything or start typing “java.io.” etc

    {
    “clients”: {
    “jdtls”: {
    “command”: [
    “java”,
    “-jar”,
    “/Users/jameswilson/code/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository/plugins/org.eclipse.equinox.launcher_1.5.200.v20180922-1751.jar”,

                 "-configuration",
                 "/Users/jameswilson/code/eclipse.jdt.ls/org.eclipse.jdt.ls.product/target/repository/config_mac"
             ],
             "languageId": "java",
             "scopes": [
                 "source.java"
             ],
             "syntaxes": [
                 "Packages/Java/Java.sublime-syntax"
             ]
         }
     },
     "log_debug": "true"
    

    }

0 Likes