Eclipse Juno JSP 语法突出显示不起作用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12324201/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Eclipse Juno JSP syntax highlighting doesn't work
提问by bmoran
I installed the Java EE version of Juno and opened an existing project I'm working on. First thing I noticed was that there was no syntax highlighting on my JSP's. I checked my install and I do have WTP installed.
我安装了 Java EE 版本的 Juno 并打开了我正在处理的现有项目。我注意到的第一件事是我的 JSP 上没有语法高亮。我检查了我的安装,我确实安装了 WTP。
Any ideas why this isn't working? It has worked out-of-the-box on every other version of Eclipse that I've used.
任何想法为什么这不起作用?它在我使用过的所有其他版本的 Eclipse 上都是开箱即用的。
回答by Adarsh
Same problem happen to occur for me. I had tried this solution and it worked for me.
同样的问题发生在我身上。我试过这个解决方案,它对我有用。
Check your
JDK
must be1.6
or later. If not installJDK 1.7
If problem still persists, In EclipseGo to
Help -> Install New Software -> WorkWith (Select Juno - http://download.eclipse.org/releases/juno)
-> ExpandWeb, XML, Java EE and OSGi Enterprise Development -> Web Page Editor
(Check it) and install it.Restart eclipse after installing. Now open a existing jsp file with
Web Page Editor
. To do this right click on jsp fileopen with -> Web Page Editor
. IfWeb Page Editor
is not present go toOther -> Internal Editors -> Web Page Editor
OrGo to new file create with .jsp extension and open with web page editorNow in EclipseGoto
Window -> Preferences -> General -> Editors -> File Associations
Select *.jsp and make web page editor as default editorCreate a shotcut for *Eclipse *on desktop and right click on shortcut go to
properties->shortcut tab -> target
In the target add these line in braces (
-vm "path
for your bin folder of jdk 7") For Example target should look like"C:\eclipse\eclipse.exe" -vm "C:\Program Files\java\jdk1.7.0_06\bin"
检查您的
JDK
必须1.6
或稍后。如果没有安装JDK 1.7
如果问题仍然存在,请在Eclipse 中转到
Help -> Install New Software -> WorkWith (Select Juno - http://download.eclipse.org/releases/juno)
-> 展开Web, XML, Java EE and OSGi Enterprise Development -> Web Page Editor
(检查)并安装它。安装后重启eclipse。现在用 .jsp 打开一个现有的 jsp 文件
Web Page Editor
。为此,请右键单击 jsp 文件open with -> Web Page Editor
。如果Web Page Editor
不存在,请转至Other -> Internal Editors -> Web Page Editor
或转至使用 .jsp 扩展名创建新文件并使用网页编辑器打开现在在EclipseGoto
Window -> Preferences -> General -> Editors -> File Associations
Select *.jsp 并将网页编辑器设为默认编辑器在桌面上为 *Eclipse * 创建一个快捷方式,然后右键单击快捷方式转到
properties->shortcut tab -> target
在目标中,在大括号中添加这些行(
-vm "path
对于 jdk 7" 的 bin 文件夹)例如目标应该看起来像"C:\eclipse\eclipse.exe" -vm "C:\Program Files\java\jdk1.7.0_06\bin"