Search code examples
eclipsenodeclipse

Nodeclipse console


When I run my newly created Node.JS Express app visiting localhost:3000 results in page not found. The Nodeclipse console shows the following line repeated for every time I've run the app. For example, after the fourth time:

C:\Program Files\nodejs\node.exe D:\eclipse_workspace_late2013\Example\app.js 
C:\Program Files\nodejs\node.exe D:\eclipse_workspace_late2013\Example\app.js 

Also when I check the option for 'just node' instead of the whole path to Node:

node D:\eclipse_workspace_late2013\Example\app.js 
node D:\eclipse_workspace_late2013\Example\app.js 

However, when I copy paste these lines to my (windows) console I get "Express server listening on port 3000" and everything is working just find.

To be clear, I have not changed anything (yet) of the default app.js, so this is the connection code:

app.set('port', process.env.PORT || 3000);

How come Node.JS does not seem to be running from the eclipse terminal? Any help is much appreciated.

Setup: Windows 7 x64 | Core i5 | 4GB


Solution

  • I thank Paul for the helpful response, I had plainly forgotten about the influence Java could have on my problem. Updating Java to 1.7.0_45-b18 immediately fixed my issue. I'm good to go!