I had netbeans 6.9, and i was trying to edit javascript on it. However, I keep getting code errors in my .js files. I can't even create a new javascript template. I tried upgrading to netbeans 7.01, but this doesn't change. I also enabled the JAVA plugin, but it doesn't help.
Anyone know what's going on?
I had netbeans 6.9, and i was trying to edit javascript on it. However, I keep getting code errors in my .js files. I can't even create a new javascript template. I tried upgrading to netbeans 7.01, but this doesn't change. I also enabled the JAVA plugin, but it doesn't help.
Anyone know what's going on?
Share Improve this question asked Sep 20, 2011 at 17:10 HandonamHandonam 6181 gold badge8 silver badges17 bronze badges 5- Works for me... What kind of errors are you getting? – fvu Commented Sep 20, 2011 at 17:32
- What version of netbeans are you using? Refer to this table: netbeans/downloads PHP means (PHP + HTML + CSS + Javascript) – c69 Commented Sep 20, 2011 at 17:48
- I'm currently using the PHP version of netbeans – Handonam Commented Sep 20, 2011 at 17:56
- Hmmm... How are you getting code errors if you don't get JavaScript support? – Álvaro González Commented Sep 20, 2011 at 17:59
- I get a bunch of errors where it says "unclosed character literal" or "character, interface, or enum expected" – Handonam Commented Sep 20, 2011 at 18:01
2 Answers
Reset to default 4I get a bunch of errors where it says "unclosed character literal" or "character, interface, or enum expected"
I suspect you've somehow configured NetBeans to handle *.js files as Java, which is an entirely different language.
Go to Tools-> Options-> Miscellaneous-> Files and find js in the "File Extension" bo. The "Associated File Type (MIME)" input box should say text/javascript
.
the java-plugin is for java, so this won't help you.
what you'll need is to activate javascript-support. javascript is included in the PHP-pack (and also available as plugin).
to install the plugin, simply click tools -> plugins
and install PHP
to enable javascript-(and html-)support.