Integrating Javadoc for Java EE 6 API into Eclipse - eclipse

I'm using the new JBoss 7.1 which implements the full Java EE 6 standard and Eclipse Indigo.
Is it possible to get all the Javadoc for the EE Api working in Eclipse?

While the above solution does work, I am personally looking for a smoother solution.
So far I've gathered that for each jboss jar under the build path, I can reference the following url (or as Tiberiu stated, the location where you downloaded the docs):
http://docs.oracle.com/javaee/6/api/
This works fine. But there are approximately 10-15 libraries referenced in a given java ee project. Adding the above url to each library, for every new java ee project seems ridiculous to me.
I should think there is a way to specify where "the javadoc for the entire jboss 7 runtime" is located, not just for the individual libraries. Currently I'm still searching, but if anyone knows how to do this please enlighten me.
It just occured to me, the location i specify for one projects javadoc, might be retained for a new EE project. I'll check and get back with my findings.
UPDATE: Sure enough, it would seem the javadoc specified for one project persists for new ee projects too. So we're good :)

You could add Javadoc for any of the libraries that you are using in your Eclipse Projects.
Right click on your project -> Build Path -> Configure Build Path.
Now, on your Libraries tab, expand the jar that you are using(look for the Java EE jar). Expand it and you should see 4 sections (Source, Javadoc, Native Library, Access Rules). Click on Javadoc then you can edit (or just double-click Javadoc) and a dialog is brought up.
Not navigate to the locations of the javadoc. It should contain a index.html in the root. Also you can validate it before clicking ok.
Now that you linked the javadoc directory, click ok.
That should work

Related

AEM error on real time

Is there a way to configure AEM into an IDE like IntelliJ,Eclipse...
So that the IDE shows the errors on my project before I compile it even if I put it outside the source folder like for example the components created.
If possible both the .java and .jsp
I'm not entirely sure what you mean by outside the source folder, but have you taken a look at adobe's documentation?
They have instructions for IntelliJ + AEM with Maven. It also instruct on jsp support as well. It's for 5.6.1 but it should be valid for 6.x as well.
https://docs.adobe.com/docs/en/cq/5-6-1/developing/developmenttools/howto-develop-aem-projects-with-intellij.html
Here's one for Eclipse
https://helpx.adobe.com/experience-manager/using/creating-aem-project-using-eclipse.html
They also have a more generic set of instruction
https://docs.adobe.com/docs/en/cq/5-6-1/developing/developmenttools/how-to-build-aem-projects-using-apache-maven.html#How-To%20Work%20with%20JSPs
Yes, you can maintain CRX data(AEM folders like /etc, /apps, /content, etc) in an IDE like eclipse. This will help you iron out all the compilation errors using features of IDE. Make use of this eclipse plugin called vaultclipse. You can install it from eclipse marketplace.
There is also another plugin called AEM plugin, details on how to use it here.

Unable to add JSP files into Project

Here is a picture of my environment and I am unable to create JSP files, I am not sure what I am missing let me know what I can answer to get a resolution. Thanks.
If anyone is having this issue with Sring Starter Project in Spring Tool Suite 4:
Help -> Install New Software -> WorkWith Spring Tool Suite 4
Scroll to bottom and select :
Web, XML, Java EE and OSGi Enterprise Development
You are probably using the standard version of eclipse. (As you are using the default "Java" perspective, not "Java EE".)
The solution would be to download the version of eclipse that has Java EE support. This version will enable you to create Servlets, JSPs and many more through wizards (that's what you seem to be looking for).
Get the current version (Juno SR2) of Eclipse IDE for Java EE Developers here: http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/junosr2 (choose the version according to your system in a box called Download Links at the right-side of the page).
The wizard will be available then. Also, don't forget to change the perspective to Java EE (in a button at the top of the right-hand side of you eclipse), as it will show your web projects in a better organized way.

Eclipse Juno no JSP in Dynamic Web Project (but everything else is fine)

The short question, is when creating dynamic web project (1.6 jdk) I can see all file types to create but there is no option for jsp. To add to that when I check file associations there is no JSP editor to select from.
A slightly longer version is I simply want to edit JSP files, I have Juno EE version installed and it says web tools platform is installed and everything works just fine.
However while everything works, there was no *.jsp in file associations and on adding it there was no JSP editor in the list. This is an out of the box Juno EE.
So I checked installed plugins and it tells me that web tools is installed, there is an icon and a load of plugins. They are all listed under Java EE in the plugin/installation list. I even tried installing just 'java web develop tools' which lists as 'tools for working with jsp' but when I do that I get ""Eclipse Java Web Developer Tools" will be ignored because it is already installed." however I cannot uninstall it because it's part of Java EE eclipse platform. I have no other plugins installed that might have broken this, however it has taken some time to get all the settings good so I'd rather not install it all again.
So I tried to install the full WTP by hand and it said some things were already installed, but it installed others. However, still no JSP editor. Hence why I tried a dynamic web project to see if I could create JSP and it wasn't listed.
So, eclipse base install has absolutely everything (xml, html editor, java editor, all the tools) but just not JSP.
My JDK is fine as dynamic web project is not created unless you have a valid 1.6 or above.
Anyone help?
It seems your missing Eclipse web developer tools and Eclipse java web developer tools.
Help>Install new software>http://download.eclipse.org/releases/juno, select appropriate items under Web,XML,Java EE
Hope this helps
In Eclipse Juno, select File/New/Other, then type in jsp in the wizard field. Select jsp file or jsp tag and there you go. Hope that helps.
Try to install Eclipse with Java EE developer.It should work.
You can go to Eclipse Market place and search for "Java EE Developer tool". On clicking it you should be able to see if your Web developer tool is selected or not. Please select that option and your issue will be resolved.
Check your path. Make sure it is pointing to at least a 1.6 version of Java. Restart Eclipse. That fixed it for me.
If you have installed every thing proper and still it is not showing JSP option while creating new .jsp file then click to the web icon on top right corner of eclipse. If it doesn't work then you need to install updated version of eclipse.
I also faced the same problem; I looked through the "Web,XML,Java EE..." installables available at under Kepler downloads:
and that brought me the New->'JSP File' context menu item.

Eclipse Juno project facets does not recognize that I have Java 1.6

I have an Eclipse/Maven web project. I'm trying to update the facets to support JSF2. However I can't update the dynamic web module to 3.0 (or even 2.5) because Eclipse refuses to recognize that I'm using Java 1.6. It shows Java 1.6 in the facet properties, but every time I try to change the dynamic web module to 2.5 or 3.0, it tells me I must use Java 1.6 even though that is selected. How can I solve this?
I'm not sure if and how Maven plays a role here, but ignoring that, you can alternatively also change the project facets by editing the .settings/org.eclipse.wst.common.project.facet.core.xml file. You can find the file when you browse in Navigator view (instead of Project Explorer). To set the dynamic web project facet version to 3.0, edit the following entry (with an unknown version, represented by ...)
<installed facet="jst.web" version="..."/>
to
<installed facet="jst.web" version="3.0"/>
If that doesn't solve the concrete problem, then most probably some Maven plugin has forced the facet versions based on a pom.xml or so.
Had the same problem, looked at the .project file of my maven/eclipse project.
Turned out, that you have to first make the Project a Java project in your Project facet project preferences page!
Unfortunately, as of right now, Eclipse Java EE tooling does not support changing spec versions on module facets (ear, ejb, web, etc.). You can edit the metadata file directly as BalusC has described and patch up any other source compatibility issues. Alternatively, you can create a new project with the appropriate spec version and copy you source into it.
If like me you find that only your Dynamic Web projects have this problem, try checking whether the server you are deploying to is configured for the JRE version you want. (Global Preferences -> Server -> Runtime Environments; then edit the server runtime environment in question.)
You may also need to manually edit your Eclipse settings, as suggested by BalusC and Konstantin. If you do, after restarting Eclipse re-open the Facets preference pane and click OK or Apply. This lets Eclipse sanity check your new setting.

tomcat eclipse and WTP with maven

I have a maven multi-moudule project. I tried to use WTP with Eclipse 3.6 and i can't figure out how to configure my project so everything will work right with tomcat. Sometimes not all the classes are being published or/and the provided scope jar are deployed to lib dir (even though they are not supposed to). I know there are alot of sites which explain how to do it. But still i find it hard to deploy my multi module project on tomcat 6 server bundled in eclipse. Anyone has easy way? Thanks,
EDIT: I downloaded Eclipse 64bit and Maven Integration for Eclipse\WTP and then this seems ok. But still i can't understand why it doesn't work on 32bit.
look in the plugin marketplace for a free plugin called m2e-wtp. That will take care of the provided scope issues. As for classes not being deployed, the usual places I look at are the deployment assembly and/or Java Build Path. Make sure that the entries (and the dependent modules) are all there and located in the right place.