1

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

Bhargav Rao
  • 50,140
  • 28
  • 121
  • 140
sakirow
  • 189
  • 1
  • 5
  • 18
  • try to add new script as new file then name it as "scipt.js". you will get your script file – sumit chauhan Feb 09 '18 at 07:42
  • https://stackoverflow.com/questions/12269560/javascript-editor-plugin-for-eclipse – 4givN Feb 09 '18 at 07:46
  • 1
    You may need to install a plugin. Check this link: [Installing JavaScript Plugin to Eclipse](https://stackoverflow.com/questions/12269560/javascript-editor-plugin-for-eclipse) – Can Bayar Feb 09 '18 at 07:49
  • @CanBayar i have already installed juno, it is still missing. i can add this file manual, i want to use js template. – sakirow Feb 09 '18 at 07:52
  • 1
    It looks like he already has the JavaScript Plugin (see the code-highlighting for JavaScript). He just looks in the wrong "folder" ("Web"), to create a new JavaScript-File choose: "JavaScript > JavaScript Source File" –  Feb 09 '18 at 08:36
  • in the Wizards `type filter text` type -> **javascript** – Shantaram Tupe Feb 09 '18 at 09:11

2 Answers2

1

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).

krivo
  • 46
  • 5
1

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