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

6
  • try to add new script as new file then name it as "scipt.js". you will get your script file Commented Feb 9, 2018 at 7:42
  • stackoverflow.com/questions/12269560/… Commented Feb 9, 2018 at 7:46
  • 1
    You may need to install a plugin. Check this link: Installing JavaScript Plugin to Eclipse Commented Feb 9, 2018 at 7:49
  • @CanBayar i have already installed juno, it is still missing. i can add this file manual, i want to use js template. Commented Feb 9, 2018 at 7: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" Commented Feb 9, 2018 at 8:36

2 Answers 2

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

Sign up to request clarification or add additional context in comments.

Comments

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.