question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: How do you verify local path in "java.format.settings.url" is pointing to the right file?

See original GitHub issue

Currently, I have a file, eclipse-formatter.xml, located at ${workspaceRoot}/.vscode directory.

I understand environment variables are not supported in VSCode-Java.

So, if I were to start from:

"java.format.settings.url": "",

How do I know where the current working directory for “java.format.settings.url” defaults to? Or this is actually based on where the “.code-workspace” file is located? Or this is based off of where “settings.json” is located?

Environment
  • Operating System: Windows 10 Pro & Ubuntu
  • JDK version: 12.0.1
  • Visual Studio Code version: 1.40.2
  • Java extension version: 0.54.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
kristiancommented, Mar 18, 2021

Yep, latest VSCode broke referencing local files without a file: protocol… @saumilsdk and @kulynyak tipps fixed the issue for me! Thanks so much!

1reaction
kulynyakcommented, Mar 18, 2021

"java.format.settings.url": "file:.vscode/eclipse-formatter.xml", should work

Read more comments on GitHub >

github_iconTop Results From Across the Web

file path Windows format to java format - Stack Overflow
Save this question. Show activity on this post. I need to convert the file path in windows say C:\Documents and Settings\Manoj\Desktop for java...
Read more >
File and Directory Names: File, Path, Paths (Java Files Tutorial)
getPath() returns the path, which in this case corresponds to the filename since we have not specified a directory. For the same reason, ......
Read more >
Java File Path, Absolute Path and Canonical Path | DigitalOcean
getAbsolutePath() : This file path method returns the absolute path of the file. If File is created with absolute pathname, it simply returns ......
Read more >
How to configure VS Code Java formatting
The solution · 1. Get a formatter config XML file. You can either use a formatter like the Google Java Style Guide (which...
Read more >
How To Work With Files In Java - Marco Behler
of() Path path = Path.of("c:\\dev\\licenses\\windows\\readme.txt"); System.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found