How to add Javascript file into Eclipse?

7.5k Views Asked by At

I am using Eclipse Oxygen.

I have web features already installed, I think some packages are missing for javascript files.

When I try to create a new javascript file, I see that there is no javascript file. How to add this feature into eclipse?

screenshot:

screenshot

2

There are 2 best solutions below

0
AudioBubble On BEST ANSWER

You just look in the wrong "folder" ("Web") to create a new JavaScript-file, the proper path is "JavaScript > JavaScript Source File".

You can also take advantage of the search in the Wizards when you type the desired search term at type filter text.

New JavaScript Source File in Eclipse

0
krivo On

You must be using a perspective, which is not suitable for web development. Try opening a perspective which suits your development domain. Web and Java EE perspectives for example supports JavaScript development. If such is not available in you Eclipse installation, you have to install additional tools. Which Eclipse package are you using?

In the right perspective you will have the JavaScript Source File option in the New pop-up dialog right clicking your project or an appropriate project folder (eg. WebContent).