[英]Using Bash as eclipse external tools with node.js in Ubuntu 14.04
OS = Ubuntu 14.04 I've been trying to add node.js as eclipse external tools after reading this article which is based on Windows. 操作系统= Ubuntu 14.04阅读本文 (基于Windows)后,我一直试图将node.js添加为Eclipse外部工具。 So i am trying to apply it to Ubuntu 14.04 using bash shell, and it keeps giving me an error.
因此,我尝试使用bash shell将其应用于Ubuntu 14.04,它一直给我一个错误。
Here is the image of my setting. 这是我设置的图像。
And when i run JavaScript code with that, i get this error message on my eclipse console 当我用它运行JavaScript代码时,我在Eclipse控制台上收到此错误消息
/bin/bash: eval: No such file or directory
But when i tried with emulating terminal(both with eval and without eval), it execute JS code well. 但是当我尝试仿真终端(带有eval和不带有eval)时,它很好地执行了JS代码。
demo1.js just have one line of code console.log("TEST");
demo1.js只有一行代码
console.log("TEST");
and i get these results. 我得到这些结果。
owner@pcowner:~/workspace/javascriptDemo$ nodejs demo1.js
TEST
owner@pcowner:~/workspace/javascriptDemo$ eval nodejs demo1.js
TEST
What should i do? 我该怎么办?
In a terminal run which nodejs
and note the path (ie /usr/bin/nodejs). 在终端中运行
which nodejs
并记下路径(即/ usr / bin / nodejs)。 Back in your External Tools Configuration in Eclipse, enter that path for Location . 返回Eclipse中的“外部工具配置”,为Location输入该路径。
Working Directory remains ${project_loc}
工作目录仍为
${project_loc}
Arguments can be ${resource_name}
or demo1.js
参数可以是
${resource_name}
或demo1.js
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.