Re: A constructive debate: Eclipse or NetBeans?



Michele 'xjp' wrote:
I've been using Eclipse for a while.
However, I've tried NetBeans recently.
Here is my point:

Eclipse:
+ more speed and stability than NetBeans
+ more plugins available
+ better refactoring support than NetBeans

NetBeans:
+ more clean than Eclipse in managing plugins and installs
+ better support for creating GUIs than Eclipse

What do you think?

Thanks

My background is Debian Linux with command line tools, "Emacs" as an
editor, "make" as a build system and primarily programming in OCaml. I had
never used an IDE until recently learning F# and Visual Studio. So I think
my view point is unusual here! :-)

I've tried both Eclipse and NetBeans. My first impressions are that Eclipse
is the only one with a signficant user base but it is extremely slow,
invasive and cumbersome to use. NetBeans is slightly easier to use but has
a tiny user base.

I actually found this extremely shocking because so many people complain
that Linux and command-line driven languages like OCaml are so much more
difficult to use and they miss a good IDE. So I think I should give some
specific examples.

Writing a hello world program is much harder with either Eclipse or
NetBeans. With the tools I am used to, you do (including installation of
all necessary software):

$ sudo apt-get install ocaml
$ cat >hello.ml
print_endline "Hello world!"
$ ocamlbuild hello.byte
$ ./hello.byte
Hello world!
$

With Eclipse you do:

.. sudo apt-get install sun-java6-jdk eclipse
.. Run Eclipse and wait *30* seconds for it to start.
.. Eclipse runs extremely unreliably and keeps crashing with null pointer
exceptions.
.. Discover that Eclipse is using the GNU Java implementation rather than
Sun's Java implementation.
.. Learn how to alter the chosen Java implementation used by Eclipse by
running:

$ sudo update-alternatives --config java

.. Learn about WorkBenches, Views, Projects and so on.
.. Click "Window -> Open Perspective -> Java".
.. Click "File -> New -> Project".
.. Select "Java -> Project".
.. Click Next.
.. Type Project name: HelloWorld.
.. Click Finish.
.. Right click the new project and then "New -> Class".
.. Type Name: HelloWorld.
.. Select "public static void main(String[] args)"
.. Sift through generated boilerplate code and fill in:

System.out.println("Hello World!");

.. Right click the HelloWorld project, "Run As -> Java Application".

After several hours I had a working Hello world program in Java but I still
do not understand how to build software using this IDE. The same thing
using OCaml takes two minutes.

The next trivial example is a GUI hello world program. In OCaml:

$ sudo apt-get install liblablgtk2-ocaml-dev
$ cat >hello2.ml
ignore(GtkMain.Main.init());
(GWindow.window ())#show();
GMain.Main.main ()
$ ocamlbuild -verbose 1 -cflags -I,+lablgtk2 -lflags -I,+lablgtk2 -libs
lablgtk hello2.byte
$ ./hello2.byte
Hello world!
$

In Java using Eclipse:

.. Start a browser.
.. Go to eclipse.org, "By Project -> Eclipse Platform Home -> SWT ->
Download".
.. Click "File -> Import".
.. Select "Existing Projects into Workspace".
.. Browse for the downloaded file "Desktop/swt-3.3-gtk-linux-x86.zip".
.. Manually import the downloaded SWT file.
.. Create another HelloWorld Java project.
.. Right click on the project and select Properties.
.. Go to "Java Build Path -> Projects".
.. Add org.eclipse.swt.
.. Create another HelloWorld class in the new HelloWorld project.
.. Add the code:

Display display = new Display();
Shell shell = new Shell(display);
shell.setText("Hello world");
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
display.dispose();
}

.. Right click in the editor and select "Source -> Organize Imports".
.. Right click the project and select "Run As -> SWT Application".

This doesn't actually work though. I get:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-gtk-3346
or swt-gtk in swt.library.path, java.library.path or the jar file
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
at java.lang.Class.initializeClass(libgcj.so.71)
at java.lang.Class.initializeClass(libgcj.so.71)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
at java.lang.Class.initializeClass(libgcj.so.71)
at HelloWorld.main(HelloWorld.java:11)

However, I actually want to develop OpenGL-based libraries and applications.
Given the enormous base of Java programmers compared to OCaml programmers,
I was surprised to discover that this is also much easier in OCaml.

For example, the following gets you a running OpenGL program in OCaml
including installation and setup of all software and libraries and complete
source code:

$ sudo apt-get install liblablgl-ocaml-dev
$ cat >demo.ml
let argv' = Glut.init Sys.argv;;
ignore (Glut.createWindow ~title:"OpenGL Demo");;
GlClear.color (0.1, 0.3, 0.1);;
Glut.displayFunc ~cb:(fun () -> GlClear.clear [ `color ]; Gl.flush ());;
Glut.mainLoop ()
$ ocamlc -I +lablGL lablgl.cma lablglut.cma demo.ml -o demo
$ ./demo

This takes a few minutes and works on Linux and Mac OS X.

In contrast, it took me two days and several requests for help to get even a
minimal OpenGL demo working from Java and that only works from the command
line. I started by trying to find OpenGL bindings for Java but, amazingly,
none are as mature (reliable) as OCaml's LablGL and, consequently, there is
nothing of use in the Debian package repository. Apparently Sun are aware
of this deficit and they are working with SGI to resolve it.

I discovered that NetBeans has an add-on to provide OpenGL from Java. I
tried it, could not get it to work and went to ask for help on their forum
only to discover that nobody has ever posted to the forum:

https://netbeans-opengl-pack.dev.java.net/servlets/SummarizeList?listName=users

Needless to say, this is not what I was expecting from a mainstream
language. Installing JOGL required various .properties files to be copied
to certain locations and edited, various environment variables to be set and
so forth. Even after all that, only a couple of the demos actually work.
Trying to run other people's OpenGL-based Java demos from the web I find
that all are unstable on both my Linux box and my Windows box. Asking
around, this seems to be a ubiquitous problem specific to Java.

So my impressions so far are that command-line tools are much easier to use
and obviously far more powerful than these "industrial-strength" IDEs. I
believe people only use them because they feel more comfortable with a GUI
but, when the GUI is this complicated and unintuitive, I think you have to
question whether or not a command line is better.

Perhaps you should consider ditching IDEs altogether?

--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u
.



Relevant Pages

  • Which IDE ?
    ... IDE fits me best, NetBeans or Eclipse... ... Eclipse is very scalable has MANY plugins and very very fast. ... technologies (like i do now with Java Server Faces) it's a lot easier ...
    (comp.lang.java.programmer)
  • Re: Looking for that special Java IDE...
    ... My understanding is that NetBeans is also written in Java, and lots of people swear by it. ... I recommend that rather than refusing to use an IDE just because it's written in Java, check out what Eclipse and NetBeans have to offer. ...
    (comp.lang.java.programmer)
  • Re: What are options for Java development envrionments?
    ... netbeans and Eclipse have a learning curve of their own, ... After you learn Java - then by all means, ...
    (comp.lang.java.help)
  • Re: What is the best java development and vm ?
    ... Yeah, I was pretty leary of going with anything other than Sun, so I upgraded to the new jdk 5.0 and then installed netbeans. ... It says that it needs 384 MB of memory and I only have 256 MB so I am guessing that is the reason for the slow running. ... Is eclipse any better at running with less memory? ... Since I have no java experience I really do want visual style IDE so that I only have to worry about learning java and not have to deal with the visual interface at the same time. ...
    (Debian-User)
  • Re: After I try latest of Netbean and Eclipse I wonder if have Another beter IDE?
    ... Eclipse and I disappointment. ... JAVA worth for beter IDE. ... NetBeans is the best that I have tried. ... The Java world is different than MS. ...
    (comp.lang.java.programmer)