Browse Source

add a new section: IDE Setup

master
Nicolas Massé 8 years ago
parent
commit
1f9c901270
  1. 2
      README.md
  2. 38
      vscode-setup/README.md

2
README.md

@ -3,7 +3,9 @@
This repository is a collection of examples built using [Camel](http://camel.apache.org/).
There is a logical order, in which you should read and try those examples:
- [Pre-requisites](prerequisites/README.md)
- [IDE Setup](vscode-setup/README.md)
- [Hello World (Java)](hello-world-java)
- [Hello World (Spring)](hello-world-spring)
- [API Mocking](mocking)

38
vscode-setup/README.md

@ -0,0 +1,38 @@
# Use Visual Studio Code as IDE
First, install [VS Code](https://code.visualstudio.com).
Then, install the required extensions to develop Java:
- Install [Javan Extension Pack](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack)
- Install [Spring Boot support](https://marketplace.visualstudio.com/items?itemName=Pivotal.vscode-spring-boot)
Install required extensions to edit XML files:
- Install [XML Tools](https://marketplace.visualstudio.com/items?itemName=DotJoshJohnson.xml) to enable XPath / XQuery support.
- Install [XML Tools](https://marketplace.visualstudio.com/items?itemName=qub.qub-xml-vscode) to enable tag auto-closing.
Finally, Install [XML Language Support](https://marketplace.visualstudio.com/items?itemName=IBM.XMLLanguageSupport) to enable XSD auto-complete / validation.
This last extension needs a bit of setup to work. Namely, the `JAVA_HOME` environment variable needs to be set properly.
On MacOS this environment variable is not set. You will need to print the Java Home of your current Java installation with:
```
$ /usr/libexec/java_home -v 1.8
/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home
```
Open $HOME/.vscode/settings.json and add the path to you Java Home in front of the key `xmlLang.javaHome`:
````js
{
"xmlLang.javaHome": "/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home"
}
```
Restart Visual Studio Code.
## References
- [Java Support in VS Code](https://code.visualstudio.com/docs/languages/java)
Loading…
Cancel
Save