Migrating to Eclipse from NetBeans IDE

Hi,

I’ve been messing around with j2EE and got frustrated with NetBeans+GlassFish since it’s too much effort to shutdown the GlassFish server when I make new code and need to restart another GlassFish server (I’ve asked the netbeans people about that here but no response yet http://forums.netbeans.org/viewtopic.php?t=45867)

So I switched to ‘Eclipse Java EE IDE for Web Developers’ since it has a neat little ‘server’ tab that shows Tomcat which I can easily start and shutdown in seconds.

Seems like NetBeans is much more user-friendly than eclipse in terms of not needing any configuration. For example, I can ctrl-click any piece of source code such as String or HttpServlet and be taken straight to the the class’s source code. In eclipse, when I right-click a piece of source and click ‘Open declaration’ I’m prompted to point it to the source: “Class File Editor, Source not found… Attach source file…”

Does that mean that I have to download the full source for j2SE and j2EE? I find it weird that eclipse doesn’t do this by default ???. Just wondering how you guys do it since I know most of you use eclipse.

Thanks,
Keith

JavaEE isn’t exactly the most topical thing, but “Posts: 1432” suggests perhaps cutting you a little slack :slight_smile:

The source for java is in a file called src.zip in your JDK install, and yes it’s pretty stupid that eclipse doesn’t attach it by default. You should be able to add it as an external jar in Eclipse (it takes a zip as a jar). As for Java EE, the source for that would be the source of whichever EE server you’re running, so yeah you’ll have to download that and point eclipse at it.

If you use maven, you can tell it to download sources by default, and eclipse will automatically attach them, but if you’re doing an EE project, chances are you don’t have your framework managed by maven.

Thanks sproingie! I’ll try that out. EDIT: works, that’s great

Yeah apologies for the off-topic j2EE post, I probably should have stuck this post in off-topic.

By the way, i thought it odd that Eclipse didn’t ask me to find the jdk while installing, and found out that it uses its own compiler which is pretty cool: http://stackoverflow.com/questions/1642338/java-eclipse-how-does-eclipse-compile-classes-with-only-a-jre

Haven’t used it in a while but afaik glassfish hotdeploys code changes from netbeans automatically - is this broken? Additionally there is the Runtime tab, where you can easily start and shutdown a tomcat in seconds - you just have to configure your project to deploy to a tomcat…

Thanks, you’re right, there is a tab called ‘services’ which shows the glassfish and tomcat servers and they can be easily stopped. That tab was not displayed by default for some reason… So now I’m back to netbeans. Thanks for the tip cylab