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

Document how to run lombok when its path contains spaces #135

Closed
dawidcxx opened this issue Jan 1, 2017 · 6 comments
Closed

Document how to run lombok when its path contains spaces #135

dawidcxx opened this issue Jan 1, 2017 · 6 comments
Assignees

Comments

@dawidcxx
Copy link

dawidcxx commented Jan 1, 2017

As the title says, I am having this issue on a gradle project that was created in InteliJ (and worked just fine there with the lombok plugin). I do get normal intelisense but after adding the vmargs option the language server won't boot up.

Environment
  • Operating System: W10
  • JDK version: 8
  • Visual Studio Code version: 1.8.1
  • Java extension version: 0.0.8

Following https://github.com/redhat-developer/vscode-java/wiki/Lombok-support this is my settings.json

// Place your settings in this file to overwrite the default settings
{
    "editor.insertSpaces": true,
    "editor.tabSize": 2,
    // C:\Program Files\Java
    "java.jdt.ls.vmargs": "-javaagent:C:\\Program Files\\Java\\lombok.jar -Xbootclasspath/a:C:\\Program Files\\Java\\lombok.jar"
}

I imagine this could a problem with

a:) the fact that gradle support is recent and its not a supported feature
b:) my path format is bad (in this case I recommend adding some example for windows to the wiki page for clarity)

It's probably option b. As a java newcommer I have no idea how the formats should look like and querying google is hard since I don't really know what to really ask for however basing myself off http://stackoverflow.com/questions/22310414/how-to-configure-lombok-in-eclipse-luna I think I kinda got right or did I?

@dawidcxx
Copy link
Author

dawidcxx commented Jan 1, 2017

Oh god, got around it by moving my lombok file to a different place (I assume the issue to be with "Program Files"). Now I have

   "java.jdt.ls.vmargs": "-javaagent:C:\\lombok.jar -Xbootclasspath/a:C:\\lombok.jar"

@dawidcxx dawidcxx closed this as completed Jan 1, 2017
@fbricon
Copy link
Collaborator

fbricon commented Jan 1, 2017

looks like you'd need to escape the paths containing whitespaces. Probably like:

"java.jdt.ls.vmargs": "-javaagent:\"C:\\Program Files\\Java\\lombok.jar\" -Xbootclasspath/a:\"C:\\Program Files\\Java\\lombok.jar\""

I haven't checked, but let me know if it works so we can update the wiki page.

@dawidcxx
Copy link
Author

dawidcxx commented Jan 1, 2017

Nope, same error.

@fbricon fbricon changed the title can't get lombok to run Document how to run lombok when its path contains spaces Jan 1, 2017
@fbricon
Copy link
Collaborator

fbricon commented Jan 1, 2017

Ok, I'll look into it next week.

@fbricon fbricon reopened this Jan 1, 2017
@fbricon fbricon self-assigned this Jan 2, 2017
@fbricon fbricon added the bug label Jan 2, 2017
@fbricon
Copy link
Collaborator

fbricon commented Jan 2, 2017

I found a problem in the VM Args parsing. I should be able to provide a fix soon.

@fbricon fbricon added this to the Mid January 2017 milestone Jan 2, 2017
fbricon added a commit that referenced this issue Jan 11, 2017
Signed-off-by: Fred Bricon <fbricon@gmail.com>
@fbricon
Copy link
Collaborator

fbricon commented Jan 11, 2017

Fixed with 80f4443.

Instructions updated in https://github.com/redhat-developer/vscode-java/wiki/Lombok-support

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