Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to compile with a different JDK than the one used to run jdt.ls #1035

Closed
fbricon opened this issue May 14, 2019 · 1 comment
Closed
Assignees

Comments

@fbricon
Copy link
Contributor

fbricon commented May 14, 2019

We need to make it possible to use a JDK for project compilation/debugging, that is different from the JDK version used to actually run jdt.ls. So you could compile a Java 12 project but running jdt.ls with JDK 8, or debugging a project with JDK 8, when jdt.ls has been started with JDK 12. You'd receive the proper sources matching the execution environment of the project.

One possible approach would be to define JDT execution environments in the server preferences as:

java.environments{
  "JavaSE-1.8": {
      path: "/path/to/jdk.1.8",
      sources: "/optional/path/to/sources",
      javadoc: "uri/or/optional/path/to/javadoc"
  },
   "JavaSE-12": { 
      path: "/path/to/jdk.12"
  }
}
@fbricon fbricon changed the title Adda ability to compile with a different JDK than the one used to run jdt.ls Add ability to compile with a different JDK than the one used to run jdt.ls May 14, 2019
@fbricon fbricon added this to the End May 2019 milestone May 14, 2019
@fbricon fbricon modified the milestones: End May 2019, Mid June 2019 Jun 3, 2019
@fbricon fbricon removed this from the End August 2019 milestone Aug 29, 2019
@snjeza
Copy link
Contributor

snjeza commented Dec 25, 2019

A duplicate of #1307

@snjeza snjeza closed this as completed Dec 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants