Importing Netbeans project to Eclipse - eclipse

I have created a GUI Applicaiton using Netbeans because of several obvious reasons like GUI Builders and all.
Now I want to implement Hibernate as ORM in this app in eclipse , because of the Hibernate plugin that makes it very simple and time saving .
How can i import that Netbeans project to my Eclipse IDE . I know there is no direct solution for this .
I have tried to find (.war) file under dist, but its not there even after clean and build in netbeans. So please tell me a way to make it done .

I also faced the similar problem. What I did was I copied .project and .classpath files (from my other eclipse project or you can create it, I was too lazy) into the netbeans project directory and then simply imported the project into eclipse. now I can make UI changes in netbeans and edit the other part in eclipse.
For the problem of AbsoluteLayout you need to make a classpath entry in ".classpath" file for AbsoluteLayout.jar
Hope that solves your problem.

I also faced a similar problem with my project the best way to solve this issue to do the configuration manually on eclipse. Its tiresome but there is no shorcut way to it..
Goto eclipse and create dynamic webproject
Create the simlar packages
Create same folder in the WEB-INF directory
Paste all the content(Source code, jsp file, js, css etc.)

Related

Generalized Steps for configuring imported jsf project's libraries in eclipse

i have checked similar posts and have googled but could not find an eligible answer to this. When ever i import a jsf project from some other system (where its working fine) OR delete the tomcat server in eclipse and add new server back again...there are lots of tag libs and imports that go "unresolved". Such applications are often not created by me and i dont exactly know which libraries are to be added to configure and fix project in eclipse.
I want to ask, is there any general way to find out all the required libraries for any imported jsf project and then add them.
Thanks in advance.
Download the javax.faces.jar file and drop it in project's /WEB-INF/lib folder.
That's all.

Creating new PlayN project in eclipse does not have java content-assist

I created a new PLAYN project based on the "Generating a skeleton project with Eclipse" instructions on the wiki
( found here: http://code.google.com/p/playn/wiki/GettingStarted#Generating_a_skeleton_project_with_Eclipse )
Everything was set up correctly but Eclipse doesn't recognize it as a java project so I lose the syntax checking, content assist, etc (I get run-time error dialog box when content assist tries to help) for java.
I get "compilation unit is not on the build path of a java project" followed by "The 'org.eclipse.mylyn.java.ui.javaAllCompletionProposalComputer' proposal computer from the 'org.eclipse.mylyn.java.ui' plug-in did not complete normally...".
Did I miss a step? Is there a way to add it to the project?
I tried editing the .project to add a java nature but that really messed up the project structure constructed by maven. (based on How do Java and Maven builders work together in eclipse?)
I tried adding a java builder to the project properties and looked adding a plug-in dependency in Maven but couldn't figure that out (I'm still learning Maven).
thanks.
Make sure you are writing code in the [project-name]-core Eclipse project rather than the [project-name] Eclipse project.
Searching around internet I found several reasons for this error. In my case the problem was that the project's nature was not Java.
To fix that:
close the project
edit file .project on project's root
Add the following line to section:
org.eclipse.jdt.core.javanature
Done. Open your project and code assist works correctly now.

How do you import a Java Class Library into a Java Web project (using NetBeans)?

I've already tried the options "Add folder...", "Add Library...", and "Add JAR/Folder...", but it's not working this time -- I've done this several times before without any problems.
I've also tried to add the folder / JAR file (.war-file) manually to the projects properties in every thinkable way, but still no success.
And so far, Google hasn't helped either..
Any help would really be appreciated.
(This is for a Java Web project with JavaServer Faces, using NetBeans 7.1)
Solved: I never found out what caused the problem. I ended up re-installing entire NetBeans, and re-created (a thousand times) the project I was trying to import. And in the end, I got it working.
Put the JAR file in the WEB-INF/lib directory of your web project. All JARs in the WEB-INF/lib and all packages in WEB-INF/classes are automatically in the CLASSPATH.
Can you make "Hello, servlet" work? If not, why bother with JSF? Do a simple web app successfully and build up from there.
I had this problem with netbeans, but it seems like all the answers I found are for Eclipse (I guess am wrong) as I dont see any WEB-INF/lib directoryin NetBeans, though I have a WEB-INF directory.
so here what I did.
I remove the tomcat server on NetBeans, go to C:\apache-tomcat-7.0.30\lib , put the jstl-1.2.jar file their, restart NetBeans and add a new (Tomcat) server, create a new web app, and their, I could find the jstl-1.2.jar file in the Libraries > Apache tomcat.
and for unknown reason, it worked.!

QueryDsl Intellisense / Netbeans problems

I have all the QueryDSL jars referenced from the all directory in my libraries. My problem NetBeans is not seeing the "Q"objects. They are generated to the same directory as all the other JPA entity objects with "_". Secondly if I use a "Q" object it does compile, but the editor itself does not see it and thinks it is an error.
Anyone have any ideas? I tried editing the Ant file but I failed at that as well. It does not seem that I need to edit it specifically for generation. The main problem appears to be linking to the NetBeans editor.
BTW I did look at this link and I already did this! How to setup classpath in Netbeans?
Also I have this problem on both Mac OSX and Ubuntu Netbeans.
Help is appreciated!!
Best fix that is consistent is to go to project properties and add the build/generated-sources as a Source package Folder in Sources.
I had the same problem. I did a clean & Build, on the project and that did it for me. I could clearly see the java files being generated, and the class files are not getting in the path. Clean did the trick for me.

How to get peer project source in eclipse and maven

creating a parent project with only a pom.xml, and lots of sub projects such as:
my-web
my-core
my-backoffice
etc. is easy, and the sonotype eclipse plugin does most of the work.
However, getting one project to know about the source in the other project seems to be hard. E.g. when you are debugging the my-web project, and step into my-core, eclipse doesnt know where to get the source.
Looking in the Java Build Path in eclipse, the maven plugin has added my-core as a folder under "Web App Libraries". I.e. its not using the my-core-0.0.1.SNAPSHOT.jar or similar, its using the raw java files. Great!
But how to tell maven to tell eclipse to look for the source in the same place?
Im not really sure where to start. Im guessing its possible to get maven to put the source in a special jar using the maven-soure-plugin, but this will usually be out of sync with the actual java files which the web project seems to be using directly.
A quick and dirty solution is to manually Edit the Java Build Path for each project, and add my-core and other dependant projects in the "Projects" tab. Is this best practice? Any other suggestions?
A quick and dirty solution is to
manually Edit the Java Build Path for
each project, and add my-core and
other dependant projects in the
"Projects" tab.
If this doesn't happen automatically you have a configuration problem.
My Guess would be that you have a version mismatch between the pom dependencies and the actual project versions. Or your projects have an unusual name template (m2eclipse resolves projects by their artifactId AFAIK)
Either way, what always helps is in your Debug configuration (Run > Debug Configurations ...) select the Source tab and just Add... the selected projects.