JSP Editor for Eclipse Juno - eclipse

I installed Eclipse Juno recently and I see that JSP files are not properly code highlighted. Everything appears as if it is a normal text file.
The previous versions of eclipse used to be fine. Am I missing something ?

Try to Right-Click the .jsp-file and choose Open With>JSP Editor.
This should do the Trick.

If you've installed Juno EE it should support .jsp editor.
Most probably, your Eclipse is "starting" with java less than v1.6 (for me it was as well, I have 1.3, 1.5, 1.6 javas installed; default was 1.5 and Eclipse was starting with it automatically)
I solved same problem with below way:
1) Right click on Juno shortcut and click Properties
2) In the field "Target"
You already should have something like below:
"D:\PROGRAM INSTALL\eclipse-jee-juno-SR2-win32\eclipse\eclipse.exe"
Add to the end of that line one more command as below (show to Eclipse with which java version it should start)
-vm "C:\Program Files\Java\jdk1.6.0_20\bin\java.exe"
My target looks like below:
"D:\PROGRAM INSTALL\eclipse-jee-juno-SR2-win32\eclipse\eclipse.exe" -vm "C:\Program Files\Java\jdk1.6.0_20\bin\java.exe"
3) Start Eclipse with changed target using your shortcut
4) On .jsp file now you will be able to chose "Open with --> JSP Editor"

It is because of Eclipse do not know what JDK do you like to use.
Rightcklick the Project, select Configure -> Convert the Project to an Faceted Project.
Go to Project Properties->Project Facets and check Java with a version of your choice.

Related

Installed MacVim, and now Eclipse is opening JSP files in it when i don't want it to

I'm using this version of Eclipse
Version: Mars.2 Release (4.5.2)
Build id: 20160218-0600
on Mac Sierra. I just installed MacVim and now whenever I try and open a JSP file within Eclipse (using Shift ⇧+Command ⌘+R for example), the file is getting opened in MacVim instead of the Eclipse editor. I went to
General -> Editors -> File Assocations
and added "*.jsp", but even after restarting Eclipse, the JSP files still open in MacVim instead of the Eclipse editor.
How can I force my .jsp files to open in the Eclipse editor?
Generally, what you've done it's the right way.
You may have to select the right default to make it work:
Then you can check if the associated editors appear on file open submenu:
As you can see, JBoss Tools JSP Editor is highlighted to represent the default.
If these steps aren't working in your environment, there's probably a sort of settings corruption (experienced very often).
What you can try:
run eclipse -clean -refresh
create a brand new Workspace
make a new and clean eclipse installation
Make sure you have Eclipse WTP installed (or just install it):
P.S. use the update-site for your eclipse version (Mars), I'm on Neon.

Change enviornment to JDK in Eclipse Luna

I am using Eclipse Luna (Java EE IDE). I need to add jdk because my project is been converted to maven. Whenever , I install maven console gives an error
No compiler is provided in this environment. Perhaps you are running
on a JRE rather than a JDK?
So i used Preference>installed jre's. However , when i am trying to change JRE to JDK by using Search button in Installed jre's. It shows me only JRE not JDK. Although , i am providing JDK path.
In short , I need to change my environment to JDK.
Thanks. Please help me out
In the preferences screen, remove the JRE listed there.
Add > Standard VM + Next > Directory + navigate to the jre directory inside jdk folder and Finish
If done right then JRE Home should look like "C:\Program Files\Java\jdk1.8.0_05\jre", NOT "C:\Program Files\Java\jre8"
Next, make sure you have the new JRE System Library listed under the Libraries tab in Java build path and in the Java Compiler (right click on project > properties) you define enable project specifics and set Compiler compliance level to the version you want.
Hope it helps.
Just open: Window-> Preferences ->Installed JREs and press SEARCH. Chose a folder and eclips find all avaliable jre and sdk.

GNOME 3 - can't start eclipse no "java" in PATH

I recently downloaded eclipse Kepler and JDK 1.7 to my Debian-machine and setup eclipse to be in
/usr/local/bin/eclipse
and the JDK to
/usr/share/
When I work in terminal, I can start it just fine.
Now, I wanted to add a link to GNOME 3 applications menu. So I cat one of the files, and changed it accordingly. When I click on the icon in the applications-menu I am displayed with
"either a JDK or JRE must be present in eclipse/jre. java was not found in PATH".
Can I go around putting the JRE into the folder? How can I adjust the PATH when I use the applications-menu?
Add your eclipse.ini file:
--launcher.GTK_version
2

Eclipse Juno JSP syntax highlighting doesn't work

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.
Any ideas why this isn't working? It has worked out-of-the-box on every other version of Eclipse that I've used.
Same problem happen to occur for me. I had tried this solution and it worked for me.
Check your JDK must be 1.6 or later. If not install JDK 1.7
If problem still persists, In Eclipse Go to Help -> Install New Software -> WorkWith (Select Juno - http://download.eclipse.org/releases/juno) -> Expand Web, 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 file open with -> Web Page Editor. If Web Page Editor is not present go to Other -> Internal Editors -> Web Page Editor
Or
Go to new file create with .jsp extension and open with web page editor
Now in Eclipse Goto Window -> Preferences -> General -> Editors -> File Associations
Select *.jsp and make web page editor as default editor
Create 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"

Eclipse Juno cannot make new project after update

I'm using Ubuntu 12.04, and to install Eclipse Juno I downloaded it from the official site (I don't use apt-get nor software center)
After updating it from help > check for updates menu, my Eclipse cannot make new project. When I hover File > New, there isn't any menu to select (as the usual Java Project, C++ Project etc.), only an unselectable text like this:
< No Applicable Items >
Anyone know what causes this?
nitind's answer above helped solve my problem. I was using eclipse java ide juno on windows and i could not see any items under File -> New or under Window -> Show View. I noticed eclipse had defaulted to using the Java-EE perspective. Following nitind's suggestion I changed it to the Java perspective and can now see all the menu items. thank you!
I had the same error when i first started the program, but i looked into it, and I saw that the workspace already had .cpp and compiled files in it which i had compiled earlier with a different program. To fix the error, I just changed the workspace to the default, and it worked fine.
I was using eclipse CDT Kepler with java 1.6.0_27. I then tried it with java 1.7.0_25 and eclipse Juno and this method resolved the error in any of these instances.
Try using the default workspace and it should work.
Regards,
Nikita