When a developer's system suits the supported OSs (Linux, MacOS and Win32) and architectures (x86_64) the embedded Node.js from Wild Web Developer will be used by WildWebDeveloper to run language Servers as well as for Node Debugger unless the "org.eclipse.wildwebdeveloper.nodeJSLocation" system property is set.
Developers may use the Node.js Embedder by adding the org.eclipse.wildwebdeveloper.embedder.node.feature into the dependencies, and calling the getNodeJsLocation() method of the NodeJSManager class in order to automatically install (if it's not yet installed) and obtain the embedded version of Node.js in their products.
{
import java.io.File;
import org.eclipse.wildwebdeveloper.embedder.node.NodeJSManager;
...
// Getting Node.js executable.
File nodeJsRuntime = NodeJSManager.getNodeJsLocation();
}After the first call to getNodeJsLocation(), subsequent calls to the which(String program) method will start searching for the specified program first in the embedded Node.js installation directory. This allows the node, npm, or npx utilities (if a utility name according to OS is provided as an argument) to be taken from the same embedded Node.js installation.
{
import java.io.File;
import org.eclipse.wildwebdeveloper.embedder.node.NodeJSManager;
...
// Another way to get the Node.js executable on Linux (after embedded Node.js is installed).
File nodeJsRuntime = NodeJSManager.which("node");
// Obtaining `npm` executable on Linux
File npmExecutable = NodeJSManager.which("npm");
// Obtaining `npx` executable on Linux
File npxExecutable = NodeJSManager.which("npx");
// Obtaining some other executable on Linux
// System path will be used to find the specified application executable
File firefoxExecutable = NodeJSManager.which("firefox");
}Community support is currently available via GitHub issues.
Contributions of code and documentation are welcome as GitHub pull requests.
Continuous integration is available on https://jenkins.eclipse.org/wildwebdeveloper/
Quality analysis is available on SonarCloud.