Slashdot Mirror


Java Application Development on Linux

r3lody ((Raymond Lodato) writes "Java was developed to be a cross-platform language. In other words, it shouldn't matter what processor or operating system you used, just the language itself. Write Once, Run Anywhere is the slogan, and an admirable ideal to attempt to reach. So when I first saw the title of the book Java Application Development on Linux, I expected to find descriptions of some idiosyncrasies in the Linux environment that affected the Run Anywhere part of the equation. What I got was a lot more." Read on for the rest of Lodato's review. Java Application Development on Linux author Carl Albing and Michael Schwarz pages 600 publisher Prentice Hall rating 9 reviewer Ray Lodato (rlodato AT yahoo DOT com) ISBN 013143697X summary An eminently readable book covering all you need to develop commercial-quality Java programs on a Linux platform.

The authors, Carl Albing and Michael Schwarz, chose to create a book that is a complete guide to writing commercial-quality Java programs. With the burgeoning presence of Linux, they focused on how to use the tools of the Linux platform to assist in the creation and maintenance of Java programs. They have broken the book up into five major parts: Getting Started, Developing Business Logic, Developing Graphical User Interfaces, Developing Web Interfaces, and Developing Enterprise Scale Software. Each chapter is self-contained, and the knowledgeable reader can pick and choose what they would like to read without losing track. Carl and Michael have properly started each chapter with a summary of what you'll learn, and conclude with a What You Still Don't Know section. A Resources section is included to give you more references for further study.

Part 1, Getting Started, provides a 10-chapter overview of Linux, Java, the SDK's (Software Development Kits) from Sun and IBM, version control via CVS, and IDEs. The first two chapters cover enough command-line Linux to manage your files and directories, plus the Vi editor to create and edit your programs. Chapter 3 gives you a summarized but complete overview of the Java language (minus the standard classes), and Chapter 4 covers how the program can deal with the context in which it's running. The next two chapters cover Sun's SDK and (mainly for comparison) IBM's development kit. In some instances, the Java program may be so large and/or so complex that running the byte codes in the Virtual Machine may not be quick enough, so Chapter 7 describes how to use the GNU Compiler for Java (gcj) to create native-code programs.

Larger programs definitely need some form of source control (actually, any project larger than a classroom exercise needs it), so source control using CVS is clearly laid out for you. While other products are available, CVS (Concurrent Versioning System) is widely available, robust, mature, and reliable, so the authors chose to describe its use in detail. For building and deploying the numerous files of a larger project, Ant provides value beyond what the make facility can offer, especially with the RMI (Remote Method Invocation) dependency problems that make can't address. Finally, Integrated Development Environments are covered. While Carl and Michael focus on NetBeans, SunONE Studio Community Edition and Eclipse are also covered.

If the book stopped after Part I, you would still have a valuable addition to your bookshelf. However, it continues with a five-chapter discussion on how to properly develop business logic. One chapter is totally devoted to the business aspects of getting requirements, documentation, and buy-in. The next covers how to use a simple software development methodology to analyze the program and discover the objects to be created. The following chapter goes over a frequently overlooked aspect of programming - automated testing - with JUnit. The last two chapters of Part II cover storing data in databases using Oracle, PostgreSQL, and MySQL, and using the Java Database Connector (JDBC) to access them.

While Linux users (at least the older ones like me) are more used to command lines, most users want some form of a graphical user interface (GUI) to access the program and their data. Chapters 16 and 17 describe how to create a GUI using Swing and the Standard Widget Toolkit (SWT).

By far the most popular way to access programs is via a browser. Java Servlets are (maybe not so) little programs that run on the targeted web server, relieving the user of having to install an application on their local computer. This allows the user to always have access no matter which machine they're on (how many times have you complained that the program you want is on the PC where you're not?), and to always be accessing the latest version of the software (assuming the web administrator keeps it updated on the server). Chapters 18 and 19 cover Servlets and JSP (JavaServer Pages), then Chapter 20 describes Java-based web application servers (JBoss and Geronimo) for serving the servlets.

Finally, Part V covers Enterprise JavaBeans (EJBs) in what the authors describe as an almost criminally brief introduction. While it is definitely an overview, they still cover more than enough about EJBs to get you rolling, and provide many references to where you can fill in the blanks. They wrap up the book with a plea for help. The book is an Open Content book, and therefore they are requesting comments, suggestions, and patch files to help improve the text and examples.

I have to admit that Java Application Development on Linux is an extremely readable, very informative, and deep without being lengthy book. (The only complaint I have is that they tried to cover a little too much in a single book. EJBs, for instance, definitely warranted more coverage than they provided.) Carl and Michael use a very conversational tone, just as though they were sitting with you and giving you their personal attention. I found it enjoyable, interesting, and highly informative.

You can purchase Java Application Development on Linux from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

288 of 428 comments (clear)

  1. I'll be the first to quote Bash... by vbdrummer0 · · Score: 5, Funny

    Saying that Java is good because it works on all platforms is like saying that anal sex is good because it works on all genders.

    1. Re:I'll be the first to quote Bash... by Brandon+One · · Score: 2, Funny

      But anal sex is good because it works on all genders! So I guess you are saying that Java is good because it works on all platforms. Kinda redundant. Maybe you should think about considering a vocational job in the Department of Redundantcy Department.

    2. Re:I'll be the first to quote Bash... by Anonymous Coward · · Score: 1, Funny

      Hell yeah! I knew Java ruled, now I know why!

    3. Re:I'll be the first to quote Bash... by Anonymous Coward · · Score: 1, Funny

      Either way, someone's fucking someone in the ass. In software development:

      Manager/Architect: Pitcher
      Coder/Client/User: Catcher.

    4. Re:I'll be the first to quote Bash... by Anonymous+Writer · · Score: 1, Funny

      "Fuck once... fuck anywhere"

    5. Re:I'll be the first to quote Bash... by rishistar · · Score: 1

      And it works on many mammalian species!!!

      --
      Professor Karmadillo Songs of Science
    6. Re:I'll be the first to quote Bash... by MST3K · · Score: 1

      Department of Redundantcy Department

      And you should be employed in the Department of Mispelling.

    7. Re:I'll be the first to quote Bash... by Frymaster · · Score: 4, Insightful
      Saying that Java is good because it works on all platforms is like saying that anal sex is good because it works on all genders.

      if you're old enough to remember back that far, you will recall that when k&r released the c language, on of the big "selling points" was that it was a hardware/os agnostic language. you could write applications in c for a variety of different operating systems running on lots of different hardware and even re-use code, libs and entire applications (so long as you had the compiler, obviously).

      the "write once" mantra has been with us for 30+ years... and, in that regard, java beats the living pants off the other contenders.

    8. Re:I'll be the first to quote Bash... by fimbulvetr · · Score: 1

      Whoa, sweet. Thanks for the vim tips in your sig.

    9. Re:I'll be the first to quote Bash... by Anonymous Coward · · Score: 1, Funny
      java beats the living pants off the other contenders.

      My pants are not living. As such, I have nothing to fear. Watch out Java, here I come!

    10. Re:I'll be the first to quote Bash... by northcat · · Score: 2, Informative

      You didn't get it, did you? I'll explain at the expense of getting modded as redundant. Anal sex works of both genders but you don't like anal sex at all. So it doesn't matter if it works on both genders, it's just not desirable. In the same way, it doesn't matter if Java runs on all platforms. Java is just bad and unuseable (at least according to grand parent).

    11. Re:I'll be the first to quote Bash... by Florian+Weimer · · Score: 1

      the "write once" mantra has been with us for 30+ years... and, in that regard, java beats the living pants off the other contenders.

      Only because you can install multiple virtual machine revisions in parallel. Actually, this is cheating, as it increases the maintainance overhead.

    12. Re:I'll be the first to quote Bash... by PaleBoy · · Score: 1

      Doesn't it seem reasonable that the Department of Mispelling would be spelled wrong? I think you may have missed the joke...

      But I'm not posittive.

      --
      ------ What's sadder than realizing you've filtered out your own comments?
    13. Re:I'll be the first to quote Bash... by Anonymous Coward · · Score: 2, Insightful

      I think a better analogy would be oral sex. It works on all genders, and is generally great until someone tries to add SHIT. Shit means, hard-coded filenames. Use of non-standard classes. Use of SWT... that sort of thing. :-)

    14. Re:I'll be the first to quote Bash... by maddmike · · Score: 1

      I can remember when basic was 'cross platform', does that make me an antique?

    15. Re:I'll be the first to quote Bash... by MST3K · · Score: 1

      It *is* spelled wrong. Check out the nearest dictionary or dictionary.com. I think it is you, not me, who missed the joke.

    16. Re:I'll be the first to quote Bash... by Iffy+Bonzoolie · · Score: 1

      I think, to be fair, you would have to weight the platforms by ubiquity. You are still correct in that C99 can be compiled on more deployed machines than Java, but the margin is orders of magnitude smaller.

      Personally, I love Java for many reasons - it is by far my favorite language to develop in - but I think the binary portability aspect is over-rated and not as successful as promised/hyped. Much of this is due to implementation issues and not theory.

      For example, I've worked on Java in the Enterprise (J2EE) and in embedded environments on mobile devices (J2ME). Though the binary format and virtual machine language is the same, the core API is different enough to be incompatible, and there are even some extra language restrictions on J2ME that could prevent straight porting at the source level.

      That's not exactly the promise of Java, so let's just look at taking code between two J2ME devices. J2ME does not provide for run-time querying of extention API access (Palm actually has a decent facility for this in their OS API), so to use hardware-dependent (generally manufacturer-dependent) APIs, you have to link in external jars from the manufacturer, and provide different binaries for different phones. Also, the space and speed constraints on many popular, deployed phones are such that you may not have the option of having conditional code for all your different platforms. Also, there are potential issues with class-file overhead, so many of our object-oriented designs went out the window when it was time to "ninja" down to the phone constraints. For example, you could concieve of a system where important platform differences were distilled into an interface, and there would be different implementations of that interface for each platform, and the correct implementation would be loaded dynamically at application start. This is just in so many ways impractical for J2ME that it makes me upset.

      Oddly enough, Java was originally designed as an embedded language (At least in the Oak days), and I feel it fails on many levels. Much of the misery of J2ME is weak and incomplete specifications. Even if devices of the time didn't support things like sound playback, framebuffer access, 2D/3D graphics transforms, they should have planned the API ahead. As it is, you have version 1 and version 2 devices with quirky compatibility issues, and device-specific APIs for sound, graphics, and often terrible thread scheduling as well - all because of a lack of specification requirements.

      Also, Sun, last I checked, has an extremely poor VM for PalmOS, such that you would never use it in any production capacity. And that just pisses me off.

      I can't believe I'm writing this in response to a "Bzzzzzzt. 0 Points." post.

      -If

      --
      Run a pencil-and-paper RPG campaign with your far-off friends: Gametable!
    17. Re:I'll be the first to quote Bash... by CanadianCrackPot · · Score: 1

      The difference being though that C compiles to machine code, and Java is interpreted bytecode. Bytecode is slower than machine code but better than pure interpretation.

      --
      Good programmers drink beer to relieve job stress.
      Great programmers drink hard liquor and work best hungover.
    18. Re:I'll be the first to quote Bash... by Mr.+Shiny+And+New · · Score: 1

      Java bytecode is compiled to native code at runtime. This runtime compilation can actually be better than normal machine code because many optimizations at compile time are guesses, or statisically right most of the time, but the runtime optimizer can make the right choices more often since it can see how the code is being executed. It can even re-optimize things.
      So Java is not slower than machine code (that is, not necessarily slower) and in some ways it is faster.

      The same goes for "pure interpretation" as long as the interpreter has any smarts.

    19. Re:I'll be the first to quote Bash... by M.+Baranczak · · Score: 1
      does not provide for run-time querying of extention API access
      boolean XYZClassAvailable = false;
      try {
      XYZClass x = XYZClass();
      XYZClassAvailable = true;
      } catch (Throwable ex) {}
    20. Re:I'll be the first to quote Bash... by SpaghettiPattern · · Score: 1

      "Fuck once... fuck anywhere"
      Foreplay once...

      --

      I hadn't the slightest objection to his spending his time planning massacres for the bourgeoisie... (P.G. Wodehouse)
    21. Re:I'll be the first to quote Bash... by dkf · · Score: 1
      That won't work; it just tests whether you can create an instance of the object, but you still need the class around for when you do the load of the calling class (or perhaps that can be postponed until the creation of the object, but still at a point when it is annoyingly inconvenient). To do that check, you need something more elaborate, perhaps like this.
      boolean haveXYZ = false;
      try {
      // You might want to keep the object around...
      Class.forName("XYZClass").newInstance();
      haveXYZ = true;
      } catch (Throwable ex) {}
      But even once you've done this check, you still have to come up with a way of using the class without requiring the caller to actually know about the class. OK, there's a design pattern for this... :^)
      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    22. Re:I'll be the first to quote Bash... by dkf · · Score: 1

      the "write once" mantra has been with us for 30+ years... and, in that regard, java beats the living pants off the other contenders.

      Call me cynical if you wish, but the only way that works is if you define everything that beats the pants off Java in this area (Tcl for sure, and reportedly also Perl and Python) as being "not a contender". As far as I can tell, the only reason for doing this is if you've decided what you want the answer to be ahead of time and don't want to admit that something else might be better... "Write once, run anywhere" perhaps fits Java, but don't think that Java's anywhere close to the best solution for that style of program deployment.
      --
      "Little does he know, but there is no 'I' in 'Idiot'!"
    23. Re:I'll be the first to quote Bash... by PaleBoy · · Score: 1

      nonono....I know it's spelled wrong. That's not the point of contention. What I'm saying is, perhaps the poster spelled it wrong on purpose, as it is the "Department of Mispelling"...

      --
      ------ What's sadder than realizing you've filtered out your own comments?
    24. Re:I'll be the first to quote Bash... by M.+Baranczak · · Score: 1
      That won't work; it just tests whether you can create an instance of the object, but you still need the class around for when you do the load of the calling class

      A class doesn't get loaded until you actually try to do something with that class. Try it yourself. Just loading another class that makes a reference to it isn't enough; otherwise, the JVM would have to load EVERYTHING in the classpath at startup time. (Come to think of it, is this behavior an official part of the language spec? I'll have to check.)

      And I think this would be a little better:
      Class x = Class.forName("XYZClass");
      (It allows for the possibility that XYZClass doesn't have a public no-args constructor.)
    25. Re:I'll be the first to quote Bash... by Ezdaloth · · Score: 1

      Just to quote bash again, "Wanna go camping?".

    26. Re:I'll be the first to quote Bash... by M.+Baranczak · · Score: 1

      This had occured to me, but it won't compile if you catch ClassNotFoundException. The compiler complains because the exception is never explicitly thrown. Doesn't matter: if Class.forName(String) throws an exception, then it means that class is unavailable.

    27. Re:I'll be the first to quote Bash... by GimliGloin · · Score: 1

      Actually, this is cheating, as it increases the maintainance overhead.

      Really? I run and develop Java all the time. Let see.... How many hours a year do I "maintain" the JRE.... NONE..

  2. Working on a java app now by I_am_Rambi · · Score: 5, Interesting

    I do some of my development in linux, and some on windows. I have found some differences in linux but very few. There is one huge advantage of java, and one huge downfall.

    The advantage: Java has abstracted alot.
    The downfall: Java has abstracted alot.

    For anyone who has done alot of programming in Java, they will understand.

    1. Re:Working on a java app now by alw53 · · Score: 1

      But everybody knows that Abstraction Is Good. That's why Wittgenstein and Kirkegaard are so much easier to understand than Zane Gray and Mickey Spillane.

    2. Re:Working on a java app now by SunFan · · Score: 2, Insightful


      When I programmed in Java, it wasn't Java itself that was the problem with respect to abstraction, it was the dime-a-dozen here-today-gone-tomorrow APIs that appeared on the cover of JavaPro. My co-workers would get all hot and horny over some new API only to have it backfire due to bugs, high volatility between versions, or the API just solving the problem terribly. Java itself is actually quite good, and Sun makes an good effort with it. However, with popularity came idiots, and with idiots came the APIs. Kinda like that usenet/AOL article earlier today. And don't get me started on XML. Ugh.

      --
      -- Microsoft is the most expensive commodity operating system and office suite vendor in the marketplace.
    3. Re:Working on a java app now by FerretFrottage · · Score: 1

      So you Object?

      --
      "Look Lois, the two symbols of the Republican Party: an elephant, and a fat white guy who is threatened by change."
    4. Re:Working on a java app now by jallen02 · · Score: 1

      Thats why there is a new movement to design lightweight Java frameworks that are small enough and agile enough to move with the times.

      Check out Spring and Hibernate. They are easy enough to learn that its not like a MAJOR time investment to get your work done (as compared to say EJB). At the end of the day you learn what you need to accomplish A B and C. The frameworks are written well, are easy to understand, and attempt to have as loose a relationship to your application as possible.

      A winning combination in my opinion. Something Java has sorely lacked. In all of my J2EE developments I found it cumbersome, but tolerable after many man hours of investment in reading documentation and experimenting. Then I found Spring and Hibernate. I spent a few hours playing around and I was doing things that had me thinking, "Well....". But then I moved on to writing more code and it just worked. Maybe its a fad, maybe not, but at least it works for me and it was damn easy to do.

      Jeremy

    5. Re:Working on a java app now by owlstead · · Score: 1

      One of the big reason why Java is so interesting is the Sun API. Of course there are many extensions, and many of those are badly written. This is so with ANY language. The default Java API is far from perfect, but it provides a very stable platform to develop against, on any platform.

    6. Re:Working on a java app now by KidSock · · Score: 1

      I've done "a lot" of Java development on Linux and I have no idea what you're talking about.

    7. Re:Working on a java app now by uncledrax · · Score: 1

      Yeap.. I can concurr with that..

      The problem is of the 1000 solutions for a given problem-space, you gotta pick one.. hopefully one of the 3-4 that stay on solid ground after all the dust settles..

      Unfortunately I've run into the case of a manager that knows alittle java and would issue devine mandate down that we will use 'tech X to solve everything!'.. sometimes it works, sometimes it doesn't..

      *shrug*

      --
      ----- The internet has given everyone the ability to have their voice heard equally as loud.. even if they shouldn't be
  3. I hope the book has a section on porting.... by bigmike_f · · Score: 3, Interesting

    The biggest issue with cross platform development is the "Gotchas". I'd like to see a list of what is actually different between all the OSes. What os specific parameters are there. What classes are unique to Linux devices. Especially with the native IO that 1.4 and later have included.

    1. Re:I hope the book has a section on porting.... by CowboyBob500 · · Score: 3, Informative

      Especially with the native IO that 1.4 and later have included.

      I think you'll find that the java.nio classes are actually non-blocking IO, not native IO.

      And in all my years developing Java on AIX, Solaris, Windows, Mac, and Linux, I've yet to come across a platform specific class (at least in the core APIs or any API written in pure Java - JNI excluded). In other words, there are no OS gotchas. There are, however, app server gotchas, but that's a different story.

      Bob

    2. Re:I hope the book has a section on porting.... by aschneid · · Score: 2, Interesting

      I recently wrote a multi-threaded socket based server that uses the NIO classes. This application uses not just the network portion, but also utilizes the DirectAllocate functions for memory allocation. DirectAllocate does use system calls to allocate memory directly in order to speed up all the manipulations of the buffers. I.E. Sun recognized the fact that when manipulating large buffers in memory....it can be slow when having to go through a translation layer. So, there are native libraries needed for this.

      I developed the code using JDK 1.4.1 on Linux (Red Hat 9). Tested it on my workstation at work that ran Windows 2000 using both JDK 1.4.1 and 1.4.2, and have deployed it on two Solaris boxes and it has run under 1.4.1 and 1.4.2 (albeit better under 1.4.2).

      There was no porting needed whatsoever. I used pretty much all of the NIO classes in my code.

      Andrew

    3. Re:I hope the book has a section on porting.... by steve_l · · Score: 1

      biggest recurrent issue that causes complaints to the Ant team (I am one member) is that there is no way in Java to tweak file permissions. That is right, Java, written by a Unix vendor, has no way to read/write unix file perms. which sucks, and usually surfaces as "Ant copy task broken" bugreps.

      As far as NIO, the only problem I know there is that you cannot select more than 64 objects on windows, which is MAX_WAITABLE_OBJECTS on WinNT/DOS.

    4. Re:I hope the book has a section on porting.... by JKR · · Score: 1
      I think you'll find that the java.nio classes are actually non-blocking IO, not native IO.

      I believe some parts of the java.nio classes are handled natively - the memory mapped byte buffers, for example, are not a pure Java implementation. The details of the implementation are deliberately concealed by the API with enough wiggle room to use mmap() or the Win32 equivalent.

      Jon.

    5. Re:I hope the book has a section on porting.... by cygnus · · Score: 2, Informative
      I think you'll find that the java.nio classes are actually non-blocking IO, not native IO.
      actually, it stands for New I/O. the OP might be confused because it generally contains some APIs that are closer to the OS than the java.io.* ones are.
      --
      Just raise the taxes on crack.
  4. Eclipse? by nhnfreespirit · · Score: 4, Insightful

    From skimming through the review, I saw no mention of Eclipse. I wrote a large part of my Masters Thesis in Java on a Linux machine. Sure, Í could use vi, emacs or whatever and a command line compiler, but for me Eclipse is the Java development tool of choice.

    BTW. the ret of my project was Java for a HP iPAQ 5555 which, interestinly enough was developed on Windows using IBM websphere device developer, which is based on Eclipse

    Freespirit

    1. Re:Eclipse? by nhnfreespirit · · Score: 1

      Ok, so after a little more skimming, Eclipse IS mentioned, but more as a side note.... :-)

    2. Re:Eclipse? by Gr8Apes · · Score: 1

      They mention Eclipse, but the book is focused on NetBeans. Why, who the heck knows. Some conspiracy I'll bet! (where's the tinfoil hat? Oh crap, it's too late!)

      --
      The cesspool just got a check and balance.
    3. Re:Eclipse? by jlarkin · · Score: 1

      While Carl and Michael focus on NetBeans, SunONE Studio Community Edition and Eclipse are also covered.

    4. Re:Eclipse? by ralphdaugherty · · Score: 1


      From the review:

      Finally, Integrated Development Environments are covered. While Carl and Michael focus on NetBeans, SunONE Studio Community Edition and Eclipse are also covered.

      rd

    5. Re:Eclipse? by leif.singer · · Score: 1
      See above:
      "While Carl and Michael focus on NetBeans, SunONE Studio Community Edition and Eclipse are also covered."
    6. Re:Eclipse? by Anonymous Coward · · Score: 1, Funny


      From skimming through the review, I saw no mention of Eclipse. I wrote a large part of my Masters Thesis ...


      Completed a Masters Thesis and you haven't even learned to accurately scan an article.


      I wrote a large part of my Masters Thesis in Java ...


      Well there's your problem. You should have used a word processor or something like TeX.

      A Masters Thesis written in Java would be a strange thing indeed.

    7. Re:Eclipse? by buddha42 · · Score: 3, Informative
      From skimming through the review, I saw no mention of Eclipse.
      Finally, Integrated Development Environments are covered. While Carl and Michael focus on NetBeans, SunONE Studio Community Edition and Eclipse are also covered.
      skim harder
    8. Re:Eclipse? by Mastoid · · Score: 1
      Finally, Integrated Development Environments are covered. While Carl and Michael focus on NetBeans, SunONE Studio Community Edition and Eclipse are also covered.

      "Ctrl-F"

      --
      I had an argument...with the person here at the university that teaches OS design. I wonder when I'll learn --Linus
    9. Re:Eclipse? by rbahaguejr · · Score: 1

      very strange... you should have used MS Word. it would have been easier.

    10. Re:Eclipse? by mOdQuArK! · · Score: 1

      MS Word & large, formatting-rich documents don't go together. Such documents will become inevitably corrupted.

  5. The IDE Issue... by TheNarrator · · Score: 5, Insightful
    The first two chapters cover enough command-line Linux to manage your files and directories, plus the Vi editor to create and edit your programs.

    While Carl and Michael focus on NetBeans, SunONE Studio Community Edition and Eclipse are also covered.

    Editing Java in vi is one of the biggest waste of time I can imagine. Eclipse and Intellij are far far more productive environments in ways that are too numerous to describe. I think a Java development on Linux book should really ignore vi and just be an Eclipse centered tour at this point with a little bit of documentation on bash usage , scripting, deployment issues and tuning the environment.

    1. Re:The IDE Issue... by javaxman · · Score: 1
      Editing Java in vi is one of the biggest waste of time I can imagine.

      Yea.

      /me puts on flame-resistant suit
      You should use EMACS, of course !!!

    2. Re:The IDE Issue... by nodrogluap · · Score: 1

      XEmacs is my preferred editor for Java source files, which is probably the case for others who have a lineage of UNIX C/C++ programming and are used to its indentation scheme. If you combine XEmacs Java mode and Ant, it's pretty easy to manage even large (>1000 source file) projects. This also means that other people with just Ant can easily recompile your code.

    3. Re:The IDE Issue... by pzarecta · · Score: 3, Interesting

      I've been programming Java for years and I've always used vi. How much time have I wasted? I find IDEs a bigger waste of time. IMO, every second my right hand leaves the keyboard to reach for the mouse is time wasted. The only thing you get from a graphical IDE is the ability to step through the instructions. But there are other ways to compensate for that...

    4. Re:The IDE Issue... by ZeroZenith · · Score: 1


      Editing anything is IDEs is a bigest waste of time I can imagine. vi (vim) is the most productive editor by far. IDEs are nice when you starting out but when you need to produce vim + some plugins can't be beat.

      ZZ

      --
      -- ZeroZenith
    5. Re:The IDE Issue... by madhippy · · Score: 1

      every second my right hand leaves the keyboard to reach for the mouse is time wasted

      is 'keyboard' a euphemism?

    6. Re:The IDE Issue... by zipwow · · Score: 4, Informative
      The only thing you get from a graphical IDE is the ability to step through the instructions.


      You *really* need to have a look at Eclipse. Debugging is nice, but it's not the whole crop.

      What's at the top? It understands your code. The first thing you'll notice is the incremental compilation. You don't have to ctrl-z (or alt-tab or whatever) and run the compiler and wait. It compiles it as you're typing, and tells you where you've screwed up. That improves your efficiency right there.

      Next on the list is lint-checking. This starts with needless imports, and continues with warnings for unused private methods, empty and undocumented catch blocks, and a host of things that are easily missed. It's a real eye-opener to load up your vi-edited code into Eclipse and see the cruft.

      Last, and most powerful of all, is refactoring. I can, with that dreaded mouse, move a class between packages far faster than you can even if you're a regexp wizard. I can rename variables and methods without fear. In short, I can do everything I need in order to make sure that the codebase makes sense. No more comments like, "This method doesn't do this anymore, but it's too much hassle to change its name"

      Knowing that classnames and packages aren't set in stone, you are much more free to get to writing the code, and change what you need to change, as you discover the need to change it.

      If I had to guess, I'd guess that you tried JBuilder, didn't care for it, and haven't looked back. Eclipse is so radically different from that environment that its almost miscategorization to call it 'an IDE'.

      -Zipwow
      --
      I don't know which is more depressing, that 2/3 didn't care enough to vote, or that 1/2 of those that did are crazy.
    7. Re:The IDE Issue... by mabinogi · · Score: 1

      keep trying, its really pretty easy...

      I used to use vim for everything, and didn't see any need for any other IDE, after all - it does code folding, syntax highlighting, gives you an overview of you code and integrates with your build system. I still do use it for C, but at some point I decided to try out Eclipse for Java use, and after five minutes, I never went back to vi.

      Eclipse feels very much like it's written by developers for developers - and I don't mean it's got a crappy UI - I mean that rather than waste time with pointless wizards for making easy things that you'll do once in a project easy (like jbuilder does), it instead concentrates on making the actual job of writing code easy.

      --
      Advanced users are users too!
    8. Re:The IDE Issue... by javaxman · · Score: 1
      I agree completely. For instance, any interview candidate who seriously suggested developing java in vi, or even in emacs, would have to work very, very hard to justify their position. If you're not using Eclipse or IntelliJ you're making things much, much harder for yourself, and you're much less productive than you could be.

      How about, "I've been developing Java programs since JDK 1.0 Beta 2 came out, and every project I've seen where GUI builders were used had problems as a result."

      No, seriously. I'm not against using an IDE... for editing text and managing builds. But if you want me to use SWT ( and lose true cross-platform compatability for buzzword compliance ) or use a code-generating GUI builder tool that limits my ability to manually edit GUI classes... well, you should work very, very hard to justify that position.

      I probably want to work for someone else, anyway...

    9. Re:The IDE Issue... by pzarecta · · Score: 1

      no, but "mouse" typically is... :P

    10. Re:The IDE Issue... by symbolic · · Score: 1

      Editing Java in vi is one of the biggest waste of time I can imagine.

      Perhaps for experienced developers, but for those just getting familiar with Java, you can't beat a text editor. IDEs obscure too much of what's actually going on. If you learn java with an IDE, you'll likely find it difficult without one. But then, "graphical programmers" seems to be the big rage these days.

    11. Re:The IDE Issue... by howlin_walleye · · Score: 1

      I develop in java and C/C++ on linux, windows, OS/X. I use eclipse for all real development because it runs on all these platforms. I learn (and someday master) a single IDE, with all ^-whatever keystrokes and idiosyncracies (and spell checkers). Emacs also runs on all platforms, and I use it as a code browser for read-only stuff and minimal editing. Otherwise eclipse all the way!

    12. Re:The IDE Issue... by b17bmbr · · Score: 1

      except...

      when you get used to vim, really used to it, you can't live without it. and yes, it does code completion. sadly java is so verbose that it kinda makes vim hard. i have very little c experience, but have done alot of work with perl, python, and php. for scripting languages, especially like perl, it's invaluable. not a user of emacs, but i'm sure it's the same.

      however, vim is great for alot of 2-3 class java solutions, and even larger ones as well. not everyone writes huge enterprise apps. an editor gives you total control, whereas an ide still makes you do things "my way". i was trying to compare netbeans versus vim for my ap comp sci class, trying to write a small gui graphics app. by the time i got the JPanel on netbeans to subclass, i would hav ebeen done on vim. as for the other tool i use, jedit rocks.

      --
      My problem? I was perfectly gruntled, until some numbnuts came by and dissed me.
    13. Re:The IDE Issue... by Anonymous Coward · · Score: 1, Insightful

      But if you want me to use SWT ( and lose true cross-platform compatability for buzzword compliance ) or use a code-generating GUI builder tool that limits my ability to manually edit GUI classes... well, you should work very, very hard to justify that position.

      What code-generating GUI builder limits your ability to manually edit the classes? Certainly not Eclipse's Visual Editor plugin.

    14. Re:The IDE Issue... by pzarecta · · Score: 1

      The last IDE I used was Visual Studio, but actually edited my code externally using vi. I just found it much faster to code using vi than the built-in editor. (Once you get used to vi, you can write code faster than you think...) In the end, I would pop into the IDE just to compile and debug. But your points are true enough... a well designed IDE has its benefits. The bottom line is, an IDE is not a text editor, and vice versa...

    15. Re:The IDE Issue... by ZeroZenith · · Score: 1

      What's at the top? It understands your code. The first thing you'll notice is the incremental compilation. You don't have to ctrl-z (or alt-tab or whatever) and run the compiler and wait. It compiles it as you're typing, and tells you where you've screwed up. That improves your efficiency right there.

      This is all nice and good, but lets say you java source contains preprocessor instructions. How does eclipse handle that? Can I specify to run my preprocessor before the compiler as I'm typing.

      Also, last time I looked at eclipse I couldn't find a way to open a single file without creating some project or something.

      --
      -- ZeroZenith
    16. Re:The IDE Issue... by Maltheus · · Score: 1

      With IntelliJ I never have to type import statements or try/catch clauses (other than to hit alt-enter). If I've made a syntax error or I've forgotten to do something, I know before I save my files. I don't get compile errors anymore. And anything that requires a mouse usually has a keyboard shortcut associated with it. When you also consider the refactoring capabilities, it's not even a question as to which is more productive. Make no mistake, you are living in the land of punch cards. There isn't a single development tool out there that has done more to increase my productivity. You're just being stubborn. It use to be a matter of opinion on which was best, but not anymore. The only purpose that vi still serves is for when you're logged in through a telnet/ssh session. No matter how fast you type, you can't ever compete with someone who's writing their code in shorthand, which is what these new IDEs allow for.

    17. Re:The IDE Issue... by jgrahn · · Score: 2, Insightful
      Editing Java in vi is one of the biggest waste of time I can imagine.

      Me too. But I suspect the book covered vim, not vi. That's a modern, good programmer's editor.

      Personally, I've used Emacs for all kinds of text editing for ten years, and I can't see why I should learn another, inferior one just because I happen to be programming in Java rather than C, C++, Python or Perl at a certain point in time ...

    18. Re:The IDE Issue... by Cederic · · Score: 1


      I do find I tend to have an IDE open AND a shell prompt AND a decent (tabbed) window based text editor.

      As you point out, IDEs can be a bit clunky for many simple uses.

      ~Cederic

    19. Re:The IDE Issue... by zipwow · · Score: 1

      What preprocessor are you talking about? If you're talking about JSPs, there are plug-ins. If you're rolled your own, you'll need to roll your own preprocessor worker (called a 'builder' in Eclipse) as well.

      -Zipwow

      --
      I don't know which is more depressing, that 2/3 didn't care enough to vote, or that 1/2 of those that did are crazy.
    20. Re:The IDE Issue... by espressojim · · Score: 1

      Jbuilder has all the stuff you mention as well. Not to mention that both have built in support for CVS, remote debugging (and debugging into an app server is HANDY), support for jsp and JSF, etc.

      They are both really good at what they do. They both have lots of plugins.

      I got JBuilder on an acedemic license for $400. I've used eclipse as well. I found Jbuilder easier to use, but you may find eclipse easier.

      I'd say: try both, see what you like and if it's worth the cash for JBuilder. If you're on a budget, then eclipse is a heck of a lot nicer than any text editor out there...

    21. Re:The IDE Issue... by NatteringNabob · · Score: 1

      Probably just becuase I'm old fashioned, but I absolutely can't stand incremental compilation. It disrupts my logical flow when I'm coding and I the pause while it is figuring stuff out drives me crazy. For me, it is more productive to just write code and fix the typos later. For debugging, much to my surprise, netbeans 4.0 is much better than Eclipse. It uses your existing ant build.xml file to construct it's project file, and feels a lot more responsive. I still wouldn't use it to acutally edit a program though.

    22. Re:The IDE Issue... by javaxman · · Score: 1
      What code-generating GUI builder limits your ability to manually edit the classes? Certainly not Eclipse's Visual Editor plugin.

      An AC ?? And you want an answer??

      Ok, try this : create a GUI with the Visual Editor plugin. ( BTW, since everything in Eclipse is a plugin, is use of the word plugin redundant? )

      Now, open one of the generated code objects. Edit it to include some sort of functionality not there... like add a focus listener to a text field or put a label somewhere or something, whatever you want, it doesn't really matter. Just something you can notice and test in the UI.

      Now, test your GUI. Is the change there? It'd better be.

      Now, go back into the Visual Editor. Now make a change there, and save the resulting changes. Ooops, did that just overwrite your manual changes??

      Open up the GUI code file you previously edited manually, are your edits there ??

      My point is obvious to anyone who has used code-generating tools extensively: once you've manually edited code-gen-created GUIs, you're (typically) not going back to the GUI builder to edit that UI, unless you didn't like the manual changes you had made. In my practical experience, code generation tools are full of issues like this- they're good for prototyping but poor for iterative changes. I'm not saying they're poor for all uses, but unless you know _exactly_ what your GUI is going to look like ( and aren't going to tweak the GUI classes to do anything special ), they'll cause a few headaches. And that generated code? Not exactly easy to maintain...

    23. Re:The IDE Issue... by Taladar · · Score: 2, Informative

      Not to mention that your editor still works for the hype-language of tomorrow when Java is gone. Except for Lisp, Fortran and a few other examples programming languages don't last as long as a programmer's work life.

    24. Re:The IDE Issue... by Taladar · · Score: 1

      You will know who wasted the time when the Emacs or vi user happily uses his/her knowledge with the next language and you have to relearn a whole IDE all over again because your IDE of choice just works (or just works as well as you describe) with one language.

    25. Re:The IDE Issue... by Derkec · · Score: 1

      I like Eclipse as a fancy editor. The syntax checking on the fly is nice - although occassionally when I'm low on memory it seeems to cause Eclipse to just go off to never-never land which is disruptive. I'm seeing that less on 3.

      Once my project gets vaguely serious, I try to avoid doing real builds out of the IDE and I rarely do step through debugging.

      We also have NetBeans people in the office and they like that too. I think the tools are fairly similar for our purposes. Eclipse has more plugins for it but most of them do crazy shit that just doesn't seem to belong in my editor.

      Refactoring (also in Netbeans) is definately the big selling point. I use it both for legitamate purposes and to create my beans. Hating wizards, I just make a stack of public fields and refactor them into private fields with public getters and setters. The whole process is super quick. But renaming methods and having that take effect across the code base is just so nice.

    26. Re:The IDE Issue... by colinrichardday · · Score: 1

      You mean that eclipse doesn't have a TeX/LaTeX mode? :-)

    27. Re:The IDE Issue... by Kurrelgyre · · Score: 2, Informative

      Well it sounds like you've never seen incremental compilation done *in the background* while you resume typing. Eclipse 3.0 introduces some major UI improvements with the goal of getting out of your way when you want to do something. When you save a file it gets compiled in the background, and you'll even get feedback before you save if some things are going wrong in your source.

    28. Re:The IDE Issue... by renfrow · · Score: 1

      One of the great things about the IntelliJ IDE is that there is a plugin for vim available. It's not FULL blown vim, but, a lot of it is there. This means you get the benefit of your muscle memory editing with the power of the IntelliJ IDE.

      I liked IntelliJ so much that I bought a personal copy for home.

      Tom.

    29. Re:The IDE Issue... by jrumney · · Score: 1
      Last, and most powerful of all, is refactoring. I can, with that dreaded mouse, move a class between packages far faster than you can even if you're a regexp wizard. I can rename variables and methods without fear. In short, I can do everything I need in order to make sure that the codebase makes sense.

      Refactoring is only useful if you are working by yourself and didn't do any design work to start with. I am personally sick of hearing Eclipse fanboys rant about how its the greatest thing since sliced bread. If you're working as part of a team, it is fucking annoying to have some twerp refactor the code base so the code you are working on suddenly won't compile and you have to go searching for where all the methods have gone. Classnames and packages should be set in stone. Changing them willy-nilly just because you like to show off your new Eclipse toy makes the code less maintainable, not more.

    30. Re:The IDE Issue... by StringBlade · · Score: 1
      As of release 3 of Eclipse, it has a lot more features you find in JBuilder as well. Eclipse has built-in integration with CVS and Ant and JUnit (as do most other major IDEs like JBuilder and IDEA) and for those of you who are stuck (or *shudder* LIKE) using Visual Source Safe - there's an Eclipse plug-in that allows you to use it in a very similar way to the CVS plugin.

      Basically, Eclipse has everything every major IDE has in terms of code assist, refactoring, integration with plugins, debugging (including remote) and syntax highlighting/templates. The difference is Eclipse is free and has a very large base of support for plugins including majors like Altova (XMLSpy) and IBM.

      Personally, my experience with JBuilder wasn't horrible except that for some reason JBuilder could magically get code to work that wouldn't run outside of the IDE. In one case, it completely built a jar file incorrectly (omitted files that were selected to be in the jar). I've not run into these problems with Eclipse. I use Eclipse at home on Windows and Linux and at work on Windows (but run the code on Linux and Solaris).

      --
      ...and that's the way the cookie crumbles.
    31. Re:The IDE Issue... by Leo+McGarry · · Score: 1

      The first thing you'll notice is the incremental compilation.

      Sounds an awful lot like Xcode. Wonder who had it first? I think the first version of Xcode with predictive compilation was released in the summer of 2003.

      You don't have to ctrl-z

      Undo?

    32. Re:The IDE Issue... by Wraithlyn · · Score: 1

      I used JBuilder for the last 5 years (v3 - v9), but recently made the jump to IntelliJ IDEA, and man am I glad I put in the time to learn it.

      Let me mention just a few things that I LOVE about IDEA:

      Auto Import - Start typing a class name, ANY class name, and IDEA will import automatically it for you. Huge timesaver.

      Auto Method creation - Just invent a new method on the spot and use it. IDEA will popup a little box asking if you want to create that method with the parameters you used.

      JavaDoc help popups - Put the cursor on a symbol (eg a method, etc) and hit Ctrl-Q, you get a instant JavaDoc for it in a tooltip popup. 90% of the time this saves me from needing the API open in a browser.

      IDEA's settings give you greater control over code style.

      JBuilder's refactoring is truly bare-bones compared to IDEA.

      I could go on and on, I'm still discovering new things every day. Like, if you paste multi-line text into a quote, IDEA will automatically split it up into multiple quotes, and add newlines and addition operators. Then you can convert the entire thing to a StringBuffer.apppend() construct with another mouse click.

      JBuilder has been resting on its laurels since about version 4. IDEA is truly innovative. (And so is Eclipse from everything I hear)

      --
      "Mind, as manifested by the capacity to make choices, is to some extent present in every electron." -Freeman Dyson
    33. Re:The IDE Issue... by b17bmbr · · Score: 1

      very true. though, i rather suspect that java will be around a little longer than people predict. kinda like apple, eh? not because i'm a fanboi or anything, though i do like java, it's just that it has lots of uses, is fairly easy to learn, is plenty pwerful, is fairly safe, and mostly platform independent. though i would feel better if were open sourced, like python and perl. java suffered early from sluggishness due to its HUGE memory footprint. but the jdk's with jit compilers have made it alot more responsive, and now, even a $399 2+ Ghz box from best buy or dell has more than enough horsepower to run java apps well. it's still to early to tell if java is just another visual basic or not, though i suspect not. it has a large place in CS programs, and is still the most sought langugage for jobs. and if you think about it, aside from low level protocols and system level programming, there's not really much you can't do with java. while i don't expect to see JPhotoshop anytime soon, swing is just one facet of java.

      --
      My problem? I was perfectly gruntled, until some numbnuts came by and dissed me.
    34. Re:The IDE Issue... by zipwow · · Score: 1

      You're overstating the use of the tool, I think. Nothing's changed "willy nilly because I like to show off my new Eclipse toy". They're changed so that they say what they do.

      We do this often enough to like it, but not so often it bothers us, on my team of three. Perhaps your codebase has rather a lot of poorly named classes?

      -Zipwow

      --
      I don't know which is more depressing, that 2/3 didn't care enough to vote, or that 1/2 of those that did are crazy.
    35. Re:The IDE Issue... by zipwow · · Score: 1

      Since you mention flow...

      I find that incremental compilation and code completion are now essential to my own development flow. I type part of the classname and hit control-space. I pick the option I wanted (often faster than typing it) and it is automatically added to the import statements.

      I call a method on that class (like the constructor), hitting control-space again to see the options. Often, if the names and types in the current context match what I want, it's filled in. I hit enter and carry on.

      Wait, I missed an exception apparently, because it's telling me that. I'll either deal with it now (when I know what I'm doing) or save it for later.

      It's just another tool to use. If you're writing code 8 hours a day, why not let the computer do stuff it's good at, and free yourself up to do the hard part of actually figuring out the problem domain?

      Eclipse 3.0 is responsive on my box, but then it's a 2.8ghz with 1GB of ram. Not that those are the minimum specs, just what I happen to have.

      -Zipwow

      --
      I don't know which is more depressing, that 2/3 didn't care enough to vote, or that 1/2 of those that did are crazy.
    36. Re:The IDE Issue... by fredrik70 · · Score: 1

      uh, don't know about eclipse (which I heard lots of good stuff about), but IntelliJ gives you nothing when it comes to help you build a GUI, it's however the best damn IDE I ever used in my life.

      --
      if (!signature) { throw std::runtime_error("No sig!"); }
    37. Re:The IDE Issue... by Noksagt · · Score: 1
      The first thing you'll notice is the incremental compilation.
      Sounds an awful lot like Xcode. Wonder who had it first? I think the first version of Xcode with predictive compilation was released in the summer of 2003.
      Incremental compilation dates back to the early 60s with LISP.
    38. Re:The IDE Issue... by (H)elix1 · · Score: 1

      You will know who wasted the time when the Emacs or vi user happily uses his/her knowledge with the next language and you have to relearn a whole IDE all over again because your IDE of choice just works (or just works as well as you describe) with one language.

      They keep adding languages to eclipse. I'm using it for Java and C++ these days. I've seen one of our guys use it for COBOL! Not sure what else it does, but it sure is multi-language.

    39. Re:The IDE Issue... by aled · · Score: 1

      Java doesn't use a preprocesor nor needs it.

      --

      "I think this line is mostly filler"
    40. Re:The IDE Issue... by juanillodgn · · Score: 1
      > Java doesn't use a preprocesor nor needs it.

      RRRRight!! Sure!

      The preprocessor is one of the first things that the people at Sun obliterated when they designed a language based on C++, but without all the crap and overengineering that makes badly written C++ code difficult to understand & maintain. Java syntax is such simple and effective that allows a programmer to express himself as well as an IDE to understand what the programmer wants to say.

      Besides, I think that's one of the reasons why Java IDE's are (IMHO) more efficient handling Java than C++ IDE's are handling, well, C++ and all its "derivatives".

      Think about the simplest refactoring in eclipse or other Java IDE, such as "rename method". At least in eclipse, it works without a hitch: if the IDE tells you there's no warnings in renaming a method, you are completely sure that the refactored code will be semantically equivalent to the old code.

      On the other side, a C++ refactoring IDE has to take into account all the preprocessor directives and syntax "oddities": in the best case the IDE will not allow you to refactor, in the worst case, it will generate incorrect refactored code.

    41. Re:The IDE Issue... by juanillodgn · · Score: 1
      >Eclipse 3.0 is responsive on my box, but then it's a 2.8ghz with 1GB of ram. Not that those are the minimum specs, just what I happen to have. It's a pity that the Linux version is much less responsive than the windows version.

      I use linux at home and windows at work. When I use eclipse in my linux box, I miss badly the "responsiveness" and "snapiness" of the windows version.

      I know they have put a lot of work lately in linux performance issues, but imho, they've not reached their windows usability.

      gtk problem? Linux SWT implementation problem? I don't know, but I'm much more comfortable with my linux desktop with the only exception of eclipse, and I'm sorry to say that...

    42. Re:The IDE Issue... by easter1916 · · Score: 1

      I run Eclipse 3.1 M4 on a PowerBook G4 1GHz with 1GB of RAM and the performance is excellent.

    43. Re:The IDE Issue... by zooblethorpe · · Score: 1

      I'm curious, have you used NetBeans? Is it comparable to Eclipse for incremental compiling, refactoring, etc?

      I last looked at Eclipse some time ago, and I should probably just download it again, but at the time it was *painfully* slow, and I got tired of waiting for it and switched to NetBeans. Any informative advice you can give comparing the two would be appreciated.

      --
      "What in the name of Fats Waller is that?"
      "A four-foot prune."
    44. Re:The IDE Issue... by Leo+McGarry · · Score: 1

      Incremental compilation dates back to the early 60s with LISP.

      I'm pretty sure we're not talking about incremental compilation. I'm pretty sure that Zipwow was speaking carelessly and that we're talking about predictive compilation. That's what I'm assuming, anyway, based on context. The difference being that Xcode compiles your project in the background as you make changes at the file level. Incremental compilation is different. It breaks your program up at the function level (not the file level) and compiles it in pieces, which means when you tell the compiler to build your project, it only needs to compile out-of-date functions rather than files. Different.

      But I could be totally wrong about that. Maybe Zipwow was really talking about incremental compilation, in which case my question was pretty out-of-left-field.

    45. Re:The IDE Issue... by Rary · · Score: 1
      "If there was full-featured IDE like Eclipse for C#/.Net I'd do a lot more C# coding."

      There is.

      --

      "You cannot simultaneously prevent and prepare for war." -- Albert Einstein

    46. Re:The IDE Issue... by Cthefuture · · Score: 1

      Good sales pitch. It has been a long time since I tried Eclipse so I'm looking at it again now (plus the CDT plugin). First off, I think Java is stupid, but I'll use any IDE if it is good.

      My impression is that they have definitely come a long way. The IDE is probably the closest to the nice Visual Studio environment that I've seen. The install was relatively easy... other than the fact I had to download 87 MB for Eclipse only to realize I had to download another 16 MB for a JRE. Ugh, Java... It is a nice IDE though.

      However, it still has that funky slow-ass feeling that all applications written in Java have. It's not that it is unusably slow, it's just slower and clunkier feeling than normal native applications. Netbeans feels even worse. I hate that feeling. It feels like I have a runaway process on my machine or something that is sucking CPU away from the IDE (note this is not because of the slowness of my 4G RAM, dual Opteron 250 machine).

      I'll probably try using Eclipse for a while because I like the IDE overall, but Java still sucks. Meh, too bad they didn't use a real language to develop Eclipse in. All that wasted money, time, and effort.

      --
      The ratio of people to cake is too big
    47. Re:The IDE Issue... by MSBob · · Score: 1
      Man, as much as I hate to point this out (knowing how much this irritates IDEA people) all the features you mention are present in Eclipse. Most have been there since Eclipse 2.0.

      Auto Import - works like a champ in Eclipse. It is a huge timesaver and I just can't get myself to using an IDE that can't do it.

      Auto Method Creation - Also present in Eclipse. Just right click the error icon when it appears and pick Quick Fix and then select "create new method"

      Java Doc help can be had in eclipse in a variety of ways... selecting a method/field/class name, mouse hovering, F2, Shift-F2 there is many other ways I'm sure...

      Eclipse refactoring is every bit as complete as IDEA's. There are also things such as "externalize constants" that I wasn't able to find in IDEA.

      You should try Eclipse. IDEA is very nice but I find Eclipse even better.

      --
      Your pizza just the way you ought to have it.
    48. Re:The IDE Issue... by boodaman · · Score: 2, Insightful

      Don't blame poor development team members on the tool.

      My team is working on a serious project right now (it will be responsible for > $20 million in annual revenue when launched).

      We've used the refactoring feature in the past without issues. We also build every single time someone does a commit (using CruiseControl). Our policy is nobody leaves for the day if the build is broken.

      We've had no problems at all with the "twerps" you seem to have.

      Sounds like you might want to bitch slap some of your developers, teach them how to be part of a team, instead of ranting about the tool.

    49. Re:The IDE Issue... by Noksagt · · Score: 1

      Background/predictive compilation isn't too novel or unique either. I used to hack it with scripts and makefiles--they'd basically watch for file writes. I didn't actually use it to catch bugs, as you apparently can in eclipse & xcode now--I just did it so I wouldn't have to wait at the shell when I needed to test. I now use python & can get feedback quickly enough if I use some sort of interactive mode (I am partial to ipython).

      From their FAQ, it sounds like eclipse does exactly what my old scripts and makefiles did--compile on file saves. They also call it "incremental." Any eclipse fans out there want to clear this up?

      An officemate tells me that Visual Studio also has some sort of background compilation.

    50. Re:The IDE Issue... by Leo+McGarry · · Score: 1

      I used to hack it with scripts and makefiles--they'd basically watch for file writes.

      How did you get around the linking problem?

    51. Re:The IDE Issue... by mrjohnson · · Score: 1

      *shrugs*

      That's nice and all, but the stuff javac finds is the easiest kind of bug to kill. Heck, once you've been developing for a while, you tend to not make those mistakes anyhow. And it's not really much of a time-saver for me, since compilation from inside emacs will take me to the line I goofed.

      I just don't get all the fuss. :-)

      Honestly, I tried eclipse. But not for anything too serious because it wanted to move all of my source files to make a project... That's irritating, to say the least.

    52. Re:The IDE Issue... by Kurrelgyre · · Score: 1

      CVS update early, CVS update often. The whole point of refactoring support is that you can change all of the references at the same time.

    53. Re:The IDE Issue... by dubl-u · · Score: 1

      I've been programming Java for years and I've always used vi. How much time have I wasted? I find IDEs a bigger waste of time.

      Up until IntelliJ's IDEA I would have agreed with that. As if I needed a buggy, limited text editor with a bunch of cruft-generating wizards. Blech. Yeah, I'm talking to you, JBuilder.

      However, IDEA is an utterly different experience, and Eclipse is a reasonably close competitor. Both of them allow you to navigate the code in a much more dynamic way, and the tight integration with JUnit allows you a much faster development cycle than is possible with something like vi. Also wonderful is the tight CVS integration (with per-line color hints), the java-aware assistance (like the live templates and the intentions), and the in-editor docs (where a quick keystroke can show you the javadocs, the parameters, similarly named methods, and other valuable info).

      Plus, there's excellent support for keeping your hands on the keyboard; although I do use the mouse sometimes, I never have to use it.

      So download it and give it a fair try. I liked it enough that I bought a license out of my own hard-earned cash. It's that good.

    54. Re:The IDE Issue... by GlowStars · · Score: 1

      That's nice and all, but the stuff javac finds is the easiest kind of bug to kill.

      That's why eclipse has it's own compiler witch detects much, much more. Yes, read after me: eclipse does not use javac.

      And even better, for most of the detected errors, eclipse provides sensible Quickfixes that can save you a lot of typing.

      Honestly, I tried eclipse. But not for anything too serious because it wanted to move all of my source files to make a project...

      And you tried using eclipse for what? 10 minutes?

    55. Re:The IDE Issue... by vilbara · · Score: 1

      You can easily move your classes between packages as long as you don't use CVS :-)

      In our projects we use Intellij IDEA IDE. We already have painfull experience with ability to move classes easily (while using CVS). Try moving a class and then merge modifications to different branch...

      Good news is that SVN integration comes to IDEA soon. We will migrate our projects to SVN ASAP and then enjoy all features of IDE.

    56. Re:The IDE Issue... by beowulfcluster · · Score: 1
      Honestly, I tried eclipse. But not for anything too serious because it wanted to move all of my source files to make a project... That's irritating, to say the least.
      It is irritating, so it's good that you don't have to let it move anything and can set up your projects however you like.

      I've never even seen it suggest that it should or would move any files when making a new project so I don't know how you accomplished that to be honest.
    57. Re:The IDE Issue... by beowulfcluster · · Score: 1

      I run 3.1 on my 1.4ghz (XP) laptop with 512mb ram and as long as there's not too many other resource hogs running the performance is perfectly fine.

    58. Re:The IDE Issue... by Noksagt · · Score: 1

      My system would fail without any complaints (and not remake until the next file change), so sometimes I didn't get around it. I also normally used the system when most dependent files were already written & I was just refining them.

      However, I also used simple auto-dependency generation for projects where I was also making new files. I suspect this is the particular detail you were interested in & would advise you to check outa few tutorials on GNU make if you want to implement a similar system.

      I might be able to dig out my old scripts, but the only thing I currently do that is even close is to automatically recompile my LaTeX files, which is usually much simpler.

    59. Re:The IDE Issue... by cygnus · · Score: 1
      it is fucking annoying to have some twerp refactor the code base so the code you are working on suddenly won't compile and you have to go searching for where all the methods have gone.
      if your methods are getting broken, then it isn't proper refactoring, is it? your problem is a behavioral one, not a problem with refactoring. you have to make sure your team all is on the same page.
      --
      Just raise the taxes on crack.
    60. Re:The IDE Issue... by ZeroZenith · · Score: 1

      Now, that's actually useful infomation. I'll look into building a 'builder' for my preprocessor.

      Now if only eclipse included VIM key bindings life would be great.

      Thanks,

      ZZ

      --
      -- ZeroZenith
    61. Re:The IDE Issue... by ZeroZenith · · Score: 1


      Java may not have a preprocessor but that doesn't mean that I can't have something that is not exactly java which will be turned into jave. JSP, XSP are good examples.

      Preprocessor does not mean just #ifdef and #define although there are valid reasons for using cpp with java.

      --
      -- ZeroZenith
    62. Re:The IDE Issue... by naarok · · Score: 1

      I went the other way. I was a rabid Eclipse fan until I was forced to use IDEA on a project. I went to it kicking and screaming about my right to choose whatever IDE made me most productive. After about 3 weeks of using IDEA I decided IDEA was slightly more polished then Eclipse.

      I've since become a rabid IDEA supporter where you have the money to pay for it. At home, I was still using Eclipse until someone at work pointed out that IDEA's license allows me to use when I'm working from home.

    63. Re:The IDE Issue... by zipwow · · Score: 1

      However, it still has that funky slow-ass feeling that all applications written in Java have. [...] Java still sucks.
      I'll be frank here:

      I think this is in your head. Unless you're running it on a p90, Eclipse and SWT is really quite snappy. Especially Eclipse 3.0. If you felt slowness in 2.0, it's because of the immense amount of work it attempts to do in the background. Parsing, compiling, interpreting your codebase is not a small task, unless you've got a small project.

      As for Java's general performance, I can tell you that at my company, it's sufficient for the $10,000/hr server platform that must have sub-3ms response times.

      Have you actually tried it since 1998?

      -Zipwow

      --
      I don't know which is more depressing, that 2/3 didn't care enough to vote, or that 1/2 of those that did are crazy.
    64. Re:The IDE Issue... by zipwow · · Score: 1

      First, I was unaware of the other definition of "incremental" compilation.

      What Eclipse does is attempt to compile the code as I type, even before I save the file. If I need to add a cast, I can see that immediately. Perhaps it ought to be called immediate compilation, but that sounds a lot more intrusive than it is.

      Since I'm on the topic, the other thing that Eclipse provides is a "quick fix" functionality that actually works. I never type the cast block in my 1.4 code, I type the Collection accessor and press control-1 for quickfix. The compiler has already complained, and the IDE says "Add cast to String?". Which I never read because it's always right, and I've pressed enter and continued on.

      Similarly for undeclared variables. I assign it to something, hit control-1 and select whether I wanted a local variable or a field. It fills in the type, and I carry on.

      The "predictive" stuff (that isn't compilation) is more like when I call a method that takes an Integer field called "size" and a String field called "message". If I happen to have an Integer and a String with those names, it fills them in for me. It also leaves them highlighted so I can type over them if I want, with no extra keystrokes.

      -Zipwow

      --
      I don't know which is more depressing, that 2/3 didn't care enough to vote, or that 1/2 of those that did are crazy.
    65. Re:The IDE Issue... by zipwow · · Score: 1

      Well, yeah. Eclipse can't really magically solve one of CVS' major defects. FWIW, it does handle it as gracefully as possible, there's an "add file" and "delete file" action when you go to commit.

      --
      I don't know which is more depressing, that 2/3 didn't care enough to vote, or that 1/2 of those that did are crazy.
    66. Re:The IDE Issue... by Cthefuture · · Score: 1

      Did you read what I wrote? I just tried it. The latest version.

      I think it's in your head because you're not used to using native environments. I'm used to Kdevelop, Anjuta, and Visual Studio. Eclispe is most definitely "funky" feeling compared to those. It's not as snappy.

      It all depends on what you get used to, but that doesn't change the fact that it is less snappy than a native application.

      --
      The ratio of people to cake is too big
    67. Re:The IDE Issue... by Cthefuture · · Score: 1

      And before you start spouting some gibberish please note that I said it was less snappy, not that it wasn't snappy at all. I said that in my original post as well. It's fairly fast on my fast machine but it is slower than the other applications I normally use.

      --
      The ratio of people to cake is too big
    68. Re:The IDE Issue... by javaxman · · Score: 1
      Nope, your point is only obvious to those that have used outdated or poor quality tools. The Java community has access to many nice, open source tools that can easily handle hand-modified code.

      Well, then, it's a shame you're an AC, because nobody will read your very good point, which, if your demo is correct, I concede.

      if (jPanel == null) {jPanel = new JPanel();GridBagConstraints gridBagConstraints3 = new GridBagConstraints();GridBagConstraints gridBagConstraints4 = new GridBagConstraints();
      jPanel.setLayout(new GridBagLayout());jPanel.setSize(695, 201);gridBagConstraints3.gridx = 0;gridBagConstraints3.gridy = 1;gridBagConstraints3.insets = new java.awt.Insets(0,0,0,0);gridBagConstraints3.weigh ty = 0.0D; gridBagConstraints3.fill = java.awt.GridBagConstraints.HORIZONTAL;gridBagCons traints3.weightx = 1.0D; gridBagConstraints4.gridx = 0; gridBagConstraints4.gridy = 0; gridBagConstraints4.weightx = 1.0; gridBagConstraints4.weighty = 1.0; gridBagConstraints4.fill = java.awt.GridBagConstraints.BOTH; jPanel.add(getJPanel1(), gridBagConstraints3); jPanel.add(getJTextArea(), gridBagConstraints4);} return jPanel;} private JPanel getJPanel1() {if (jPanel1 == null) {FlowLayout flowLayout5 = new FlowLayout(); jPanel1 = new JPanel(); jPanel1.setLayout(flowLayout5); flowLayout5.setAlignment(java.awt.FlowLayout.RIGHT );
      jPanel1.add(getJButton(), null);} return jPanel1;} private JTextArea getJTextArea() {if (jTextArea == null) {jTextArea = new JTextArea();}return jTextArea;}
      is still some damn ugly code, though. Please for the love of god tell me that the plugin at _least_ puts line feeds after semicolons.

      _Good_ programmers can still be productive without a tool like that, is all I'm saying.

    69. Re:The IDE Issue... by zipwow · · Score: 1

      Whoop, you're on Linux. SWT does have issues on Linux. However, SWT (the GUI library that Eclipse is written in) ... and listen to this closely... SWT is not Java. You're decrying an entire language based on a third-party tool that was neither developed nor supported by the makers of the platform.

      In case you're unaware, SWT is a bizarre partly-native abomination. If you have problems on your platform (and there are some on Linux), it's a problem on your platform with the platform-specific half of said abomination.

      How well does Visual Studio run on Linux, anyway?

      -Zipwow

      --
      I don't know which is more depressing, that 2/3 didn't care enough to vote, or that 1/2 of those that did are crazy.
    70. Re:The IDE Issue... by aled · · Score: 1

      that doesn't mean that I can't have something that is not exactly java which will be turned into jave. JSP

      I was talking about pure Java sources.

      Preprocessor does not mean just #ifdef and #define although there are valid reasons for using cpp with java.

      While is possible to use preprocesing with Java sources I can't imagine right now a need to do so. That doesn't mean there aren't, just I don't know one. If using one is valid is a case of common sense. What I wouldn't call a valid use is to use preprocessing for the same reasons that C programs (for portability, macros). That use means one isn't programming rightly in Java.

      --

      "I think this line is mostly filler"
    71. Re:The IDE Issue... by chochos · · Score: 1

      The first version of Eclipse I used was 2.1 in september 2002, and it already had much of this stuff. Eclipse compiled on every save, in the background. And many mistakes like undeclared variables or unknown methods would show up even without saving. But the quick fix feature I think is part of eclipse 3, I don't remember having that before.

    72. Re:The IDE Issue... by Cthefuture · · Score: 1

      Whoop, you're on Linux. SWT does have issues on Linux. However, SWT (the GUI library that Eclipse is written in) ... and listen to this closely... SWT is not Java. You're decrying an entire language based on a third-party tool that was neither developed nor supported by the makers of the platform.

      I've been a Java developer since Java was just an experimental beta language that no one knew existed. I think I have enough experience and justification to say Java sucks.

      I know what SWT is. I would hate to see what Eclipse would be like in Swing or something. Actually, there probably would be no Eclipse in that case because AWT & Swing suck more than Java does.

      Who said I run Visual Studio on Linux? I just said that's one of the native IDE's I'm used to. As a consultant I work on all sorts of operating systems and development environments.

      --
      The ratio of people to cake is too big
    73. Re:The IDE Issue... by Rary · · Score: 1
      Ya, it's interesting to see all the Java tools being ported to the .NET world. I just read about log4Net today.

      I also haven't tried the C# plugin for Eclipse, but I really like the idea of Eclipse becoming the platform of choice for development in other languages besides Java. Of course, I'm a Java guy, so I'll keep using Eclipse primarily for that.

      --

      "You cannot simultaneously prevent and prepare for war." -- Albert Einstein

    74. Re:The IDE Issue... by zipwow · · Score: 1

      Congratulations on your long, though apparently shallow, experience with Java. Perhaps you'd like to quantify your complaints other than what boils down to "I've heard of the language since the beginning, used it in the late 90's, and still think it's terrible"

      You've pointed out that you know what SWT is. Can explain why you use its Linux shortcomings as a reason to dismiss the entire platform, even though you know that it's an unrelated third party library? Especially as regards to performance?

      And as for the Visual Studio comment, if you're going to compare IDEs (or any application, really), and use it to bash the language, I think you have to compare them platform by platform. Eclipse runs as "snappily" on windows as Visual Studio does. Eclipse also runs quite a bit better on Linux than Visual Studio does.

      If you're going to discuss the parent topic (Linux Java dev environments), then I think you have to leave out your outdated "java sux" trollery.

      If my replies seem rather harsh, I have to apologize. This is one of those Java Myths that drives me nuts. /. pundits have fallen so behind when they complain "java gui's are slow! java gui's are slow". Java's gui interactions were increased dramatically with 1.4, and with 1.5 there's no reason at all to even perpetuate this myth.

      If there's a legitimate complaint to be heard here, it's that Sun wants to push a Java-branded look and feel. That interaction is "different", and since they don't pay their designers as well as Apple or Microsoft (or at least I hope they don't--Metal is ugly), it ends up looking boxy instead of modern. Looks and performance are two different things, and there are certainly well-known and well-supported (just not default) approaches to having a more native look-and-feel.

      Ultimately, though, as a "consultant working on all sorts of operating systems and development environments", you should be able to tell the difference between appearance and performance. In this case, I think you're misleading yourself.

      -Zipwow

      --
      I don't know which is more depressing, that 2/3 didn't care enough to vote, or that 1/2 of those that did are crazy.
    75. Re:The IDE Issue... by Cthefuture · · Score: 1

      "I've heard of the language since the beginning, used it in the late 90's, and still think it's terrible"

      I don't think you understand my experience. I was using Java for development on systems that went into production in the early 90's. I still develop in Java to this day as I have been for the last 10 years. It's not my choice but clients sometimes want Java and sometimes I do work for Sun. Trust me, I know Java.

      Ultimately, though, as a "consultant working on all sorts of operating systems and development environments", you should be able to tell the difference between appearance and performance. In this case, I think you're misleading yourself.

      I am an extremely intuitive person. Often it is difficult for me to translate my reasons into something a normal person can understand. Usually, like now, I won't even try. Lets just say we disagree and leave it at that. Suffer on my friend.

      --
      The ratio of people to cake is too big
  6. The Java trap by jmkrtyuio · · Score: 2, Interesting
    1. Re:The Java trap by Joe+Tie. · · Score: 3, Insightful

      I'm a little lost as to what your point is in linking to that. Are you suggesting people don't use java, or that people stick to gcj, gnupath, and swingwt? If the latter, isn't it a bit redundant given that gcj is specifically mentioned as being covered in the book?

      --
      Everything will be taken away from you.
    2. Re:The Java trap by CowboyBob500 · · Score: 1

      *Flameproof suit on*

      Jesus, Stallman can talk a load of crap. Most people use an OS, program, language, whatever because of the *benefits*, not because of some ideology. Stallman can really come across like a religious fundamentalist sometimes.

      Is he seriously suggesting that no-one should ever use any proprietary software? So what if Java isn't licensed under the GPL?

      And then there's this:-

      If you develop a Java program on Sun's Java platform, you are liable to use Sun-only features without even noticing.

      Clearly the man's never even programmed in Java. There's no such thing as a Sun only feature, or an IBM only feature, unless you use something like the com.sun packages - in which case you're an idiot as it clearly states in the API spec - "Note that the classes in the com.sun.image.codec.jpeg package are not part of the core Java APIs. They are a part of Sun's JDK and JRE distributions. Although other licensees may choose to distribute these classes, developers cannot depend on their availability in non-Sun implementations. We expect that equivalent functionality will eventually be available in a core API or standard extension."

      Bob

    3. Re:The Java trap by Megaweapon · · Score: 1

      I'm a little lost as to what your point is in linking to that.

      Posting links to anything remotely related on GNU.org is an easy way to get modded up.

      --
      I'm sure "SlashdotMedia" will improve on all the wonders that Dice Holdings blessed us all with
    4. Re:The Java trap by Per+Bothner · · Score: 1
      Most people use an OS, program, language, whatever because of the *benefits*, not because of some ideology.

      That's not an argument: Most people do foolish things. More specifically, things that are easy in the short-term, but may hurt in the long-term. (Most programmers don't use version-control systems, which is really scary!) One example: putting all you documents in a proprietary undocumented format so your documents are at the mercy of one company. Another example is writing your programs in a proprietary language, and/or one that has no specification beyond the implementation. Java isn't quite in either of those positions, but as usual Stallman is more right than those who would dismiss him without even understanding his points.

    5. Re:The Java trap by Taladar · · Score: 1

      I read the article a while ago. The point is that Java falls when Sun falls and Sun is not a company with the most stable business model out there. If that should happen all the Java Developers have a big problem since there is no free (and no real alternative to Sun) Java Implementation out there.

    6. Re:The Java trap by toganet · · Score: 1

      -- And that's a stupid argument. If Java is being used enough for that to matter, than it has value. That means that even were Sun to go bankrupt tomorrow, Java won't go away -- they would probably have to sell it (the IP) to someone to pay their creditors.

      Now, if Java were open-source, Sun couldn't sell it to pay their creditors. So in what way is something _more_ valuable if it is open?

    7. Re:The Java trap by aled · · Score: 1

      So we should take from people the ability to do foolish things for their own good? And how that freedom?

      --

      "I think this line is mostly filler"
    8. Re:The Java trap by metamatic · · Score: 1
      There's no such thing as a Sun only feature, or an IBM only feature, unless you use something like the com.sun packages

      Not true if you're doing J2EE development. As far as I can tell it's impossible to write a .ear J2EE application that will deploy to any J2EE environment.
      --
      GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    9. Re:The Java trap by MSBob · · Score: 1
      Anyone else remember when Stallman acted like a kid wrt KDE and like a cheerleader when it came to GNOME? And then Miguel started to develop quite non-Free code at Ximian and later sold the company to the decidedly-non-Free Novell. That make Stallman look like a real ass who backed the wrong horse.

      Shame on you Stallman for picking sides and then getting fucked in the ass by those you put so much of your fundamentalist faith in.

      --
      Your pizza just the way you ought to have it.
    10. Re:The Java trap by MSBob · · Score: 1
      --
      Your pizza just the way you ought to have it.
  7. Sounds pretty wide-ranging by Doctor+Memory · · Score: 4, Insightful

    Let's see, they discuss:
    * Basic Linux (files, directories, vi)
    * Basic Java (two different SDKs)
    * Basic software development (requirements gathering, et.al.)
    * Basic programming (CVS, build tools)
    * Basic Web programming (servlets, presumably JSPs, no Struts/Spring/other frameworks)
    * Database programming (Oracle AND PostgreSQL AND MySQL)
    * And finally, Enterprise Software in the guise of EJBs (remember: friends don't let friends use Entity Beans!)

    Granted it's 600 pages, but I'm wary about how much real detail they can pack into all those topics. I'm guessing this won't be much of a reference book, but rather a large collection of introductions to a variety of Java topics.

    --
    Just junk food for thought...
    1. Re:Sounds pretty wide-ranging by mauddib~ · · Score: 1

      Well, it all depends on the intelligence of the reader. Some books I've seen in the bookstore (something like 'Notepad for Dummies'), count multiple inches of book thickness but covering single nano-meters of body. Other books we've had here on the university do the opposite, trying to summerize multiple inches of content in 20-30 pages.

      There is also always the option to 'refer to the manual' (or 'leave as an exercise for the reader'). Explaining vi to a noob will take time (and needs to feed the willingness of the learner to learn, it is not easy). The filesystem of Linux isn't so difficult at all, actually it is more comprehensible (everything is a file) than the MS paradigm (everything is a file, except directories and volumes).

      Same goes for DB's. When in-depth info on normalization/XML serialization/optimalization/etc.etc. can be left out, SQL can be explained in 20 pages. It's only MySQL which does stuff strangely.

      Nevertheless, I find it impressive they have managed to put so much info in 600 pages.

      --
      This is a replacement signature.
  8. Re:Run everywere, my ass. by spac3manspiff · · Score: 1

    Exactly, OSX was designed for UNIX not LINUX. How can you even think about using LINUX on a powerbook!

  9. Java as a word processor? by Anonymous Coward · · Score: 1, Funny

    I wrote a large part of my Masters Thesis in Java on a Linux machine.

    Most of us simply use LaTeX, or something similar.

    1. Re:Java as a word processor? by rbahaguejr · · Score: 1

      yup. i have been writing my researches in latex. and not with java...

  10. So...? What's the big deal? by Anonymous Coward · · Score: 1, Interesting

    The book seems to cover all the major aspects of Java Development. Nice and fair and all. But what makes it so special for Linux users? All the tools mentioned are available for Windows or MacOs too. Either the book has the wrong name, or the review missed some important point?

    Maybe the important point is "it does not matter which platform you use for Java programming, but by throwing in some buzzword into my booktitle, I can target more nerds and make some extra bucks". ;-)

    1. Re:So...? What's the big deal? by steve_l · · Score: 1

      Yes,

      it would be nice to see how to talk to KDE or Gnome. Hey, it would fantastic to see someone telling me how to get drag and drop in either system to integrate with a swing app.

      Plus something on how to do JNI code. We actually have a chapter doing that for both Windows and Linux in (product placement) Java Development with Ant; using Ant to compile then run some C code that reads the P5 real time clock, and so work out the round trip time. It isnt hard, just fiddly.

      That is what I want with a Java on Linux book: Linux coding with Java. This sounds more like -java-development-with-vi.

      Still, if it encourages Java developers to move to Linux -which is a great Java dev platform- this can only be a good thing.

  11. Re:Java: I love it, but... by koehn · · Score: 5, Informative

    *sigh*
    I can't remember the last time I had issues with code because I changed platform, OS, or even JVM version. It's to the point where I don't think about it anymore.

    Maybe if you're talking GUI code (desktop/applet), but for web or backend it's just not been an issue for me in some time. I've been developing on Java professionally for nine years now, and have have production systems in place for eight. I remember when you used to need to test every single VM, but by and large that time is done.

    For example, I just finished working on a project running on J2EE 1.2 on Websphere 4 (jdk1.3.1) on Windows to running Websphere 5 (jdk1.4.1) on Z-Linux. The *only* thing I had to change was code that was written out of spec (a few JSPs forgot to import java.util.Vector). If the developers of the app hadn't been sloppy, there would have been no code change at all. This is an app that hits databases on Oracle, DB2, Teradata, and LDAP (with updated drivers for all of those, too).

    I can think of plenty of counterexamples, but for most server-side business apps it really is write once, run anywhere.

  12. Re:I still fail to see .. by furball · · Score: 2, Funny

    Your binary gets interpreted by the local parser too. It's called a CPU.

    What's wrong with ./configure, make, and make install? Simple. Not everyone wants to distribute source code. Shocking, I know.

  13. Re:Java: I love it, but... by photon317 · · Score: 1


    I don't love Java. All things considered, I don't see that their efforts at cross-platform compatibility are really a big win over things like the Standard C Library. In both cases, you have a language and a supposedly cross-platform standard set of library calls, and in both cases you end up having to code around the quirks of the platforms you run on. I think the right place for Java to have targetted, the place where it could have been the most useful, was as a client-side platform-indepedant environment, ala Applets in the web browser and whatnot. Unfortunately all the effort went into perfecting a server-side environment instead.

    --
    11*43+456^2
  14. Commercial quality apps? by Profane+MuthaFucka · · Score: 3, Insightful

    I know what they mean by that, but really I'd like to have open source quality apps. That's the next level up.

    --
    Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    1. Re:Commercial quality apps? by nkh · · Score: 1

      You already have Azureus (the Bittorrent client) but it requires a lot of RAM to work properly...

    2. Re:Commercial quality apps? by fimbulvetr · · Score: 1

      I used Azureus for about 28 seconds, then it started (1.7Ghz PentiumM 1024MB running minimal X/Gentoo) and I uninstalled it.
      Switched to apollon and never looked back.

    3. Re:Commercial quality apps? by EJB · · Score: 1

      Bzzz.. you missed something.

      "Commercial quality" and "Open source" are two different possible aspects of a piece of software.

      Don't fall into the FUD trap, there are plenty commercial quality open source applications. There are also plenty of commercially sold open source applications.

      There's nothing wrong with that.

      - Erwin

    4. Re:Commercial quality apps? by Derkec · · Score: 1

      Commercial quality is "High enough quality that someone would you pay for that and won't be pissed." There are plenty of closed and open source projects that don't meet that threshold.

      Mostly they mean building serious stuff and not just toy projects.

    5. Re:Commercial quality apps? by jbplou · · Score: 1

      open source quality apps. That's the next level up.

      Thats crazy, open source is great but commercial apps are much more polished, there are some exceptions like Firefox and MySQL but for the most part your statement does not hold true.

    6. Re:Commercial quality apps? by Profane+MuthaFucka · · Score: 1

      My Reply: DBase IV

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    7. Re:Commercial quality apps? by aled · · Score: 1

      Try with a product in use in the last 10 years.

      --

      "I think this line is mostly filler"
    8. Re:Commercial quality apps? by blight · · Score: 1

      sounds like it's been quite a while since you tried it.

      it still eats quite a bit of memory, but I haven't seen a big java program that doesn't.

    9. Re:Commercial quality apps? by Profane+MuthaFucka · · Score: 1

      Windows ME

      --
      Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    10. Re:Commercial quality apps? by EJB · · Score: 1

      Yes, and that is a logical impossibility since there are many commercial open source applications. And something can't be better than itself.

  15. Stick to FREE Java for your own protection by Ars-Fartsica · · Score: 1, Troll
    I think a good baseline is to stick to that Java which can be compiled and run by the gcj* toolchain. This is for your own protection - in the event a vendor (gee guess who) ticks you off you will always have a free option.

    While the gcj toolchain is not capable of supporting bleeding edge features, its likely you do not truly need these so the gcj baseline will also hold you to a sane subset of proven Java features.

    1. Re:Stick to FREE Java for your own protection by ldspartan · · Score: 1

      Is there a grid somewhere that indicates what's supported by the above toolchain? It seems like it'd be nice to develop to it, but I'd need to evaluate if it provided everything I anticipated needing before starting a project.

      Thanks,
      lds (a soon-to-be coorporate java programmer).

    2. Re:Stick to FREE Java for your own protection by mustard76 · · Score: 1

      Is anyone doing gcj + swt development?

    3. Re:Stick to FREE Java for your own protection by Joe+Tie. · · Score: 1

      Then your program written on linux is stuck on Linux so 99% of the world can't run it.

      As far as I know, mingw should be able to compile windows binaries.

      --
      Everything will be taken away from you.
    4. Re:Stick to FREE Java for your own protection by tepples · · Score: 1

      As far as I know, mingw should be able to compile windows binaries.

      Not if you use too many POSIX APIs. MinGW uses the msvcrt.dll implementation of the C library, which supports pretty much the bare minimum of what's necessary to get an ANSI C app running.

  16. Re:Java: I love it, but... by pivo · · Score: 4, Insightful

    Sure, you have to test on all the platforms that you support. But, what language/runtime requires less x-platform testing than Java? Today, the real issue is testing on each J2EE app server. That's where the real issues are. I haven't seen a pure Java platform issue in years.

  17. Re:Java: I love it, but... by michaelggreer · · Score: 1

    This is an old joke from 1998. In my experience, I have rarely found a problem and I regularly code and compile in OS X or Windows and deploy onto Linux servers. The one area I always have to be careful about is setting up the AWT environment, but this is sysadmin stuff and does not effect the code. What experiences have you had (since 1998) that lead you so say this? Probably in GUI apps, where I do agree. Everything gets tested on Windows, and looks like utter crap on a Mac. Except Eclipse, of course.

  18. Re:Java: I love it, but... by gustgr · · Score: 1, Flamebait

    "Write Once, Wait Forever to Run Everywhere"

  19. success largely depends on expertise by bwy · · Score: 2, Informative

    Write once, run anywhere becomes closer to the truth if the developer has experience with multiple platforms and knows what he is doing.

    Our product that runs on Linux/Solaris/AIX/Win32 also runs wonderfully on OS/390, but this is only AFTER the code base was revisited to respect that fact that a 390 is EBCDIC. For example, ASCII config files that you ship along with your distro to the 390 will be read in the system default encoding if you're using plain Readers. You'd want to use streams with an explicit encoding type. Or, just use XML since the parsers internally understand UTF-8.

    So, some may say "debug everywhere" but in some cases this isn't being completely fair, if you're placing the whole blame on the JVM.

    1. Re:success largely depends on expertise by Taladar · · Score: 1

      Normally it might not be fair to blame it on the JVM but when the JVM marketing people promise you "Write once, run anywhere" you can blame them if they can't deliver even if the feature is technically impossible to implement in the JVM.

    2. Re:success largely depends on expertise by aled · · Score: 1

      I don't want to pedantic and I'm probably saying something too obvious and don't really know the platform... but what the hell, this is slashdot: didn't you transfer your config files in text mode so they get converted to EBCDIC and the native encoding of the OS/390 JVM could read them?

      --

      "I think this line is mostly filler"
    3. Re:success largely depends on expertise by bwy · · Score: 1

      I don't want to pedantic and I'm probably saying something too obvious and don't really know the platform... but what the hell, this is slashdot: didn't you transfer your config files in text mode so they get converted to EBCDIC and the native encoding of the OS/390 JVM could read them?

      A completely valid question to ask. To answer, we provided a tarball that could be sent up as one file and extracted. They were running Unix system services so that option was available. Being that their host was very secure, they didn't even allow inbound FTP. So we had to use the host as the FTP client to grab the tarball from the workstation which was running an FTP client.

      Also, we often jar up some of our more static config files that are not designed to be modified by the customer. You know, things developers might want to be able to easily change or set up without recompiling. Since a .jar would be sent as binary, you'd still be out of luck.

      Overall it was a good learning experience. It has actually helped me build better desktop Java apps that work in international settings with any character set.

    4. Re:success largely depends on expertise by aled · · Score: 1

      We sometimes deploy to an AS/400. Thanks for the heads up!

      --

      "I think this line is mostly filler"
  20. Re:I still fail to see .. by pjt33 · · Score: 2, Insightful
    It's easy to write non-portable Java code: just use hard-coded paths rooted at "c:\", or use a non-standard library (com.ms.* springs to mind). However, it's probably easier to write non-portable code in C++: just count the platform-checking #ifdefs in a typical program.

    (Just as a side note, the weirdest porting problem I had was the result of someone who shall remain nameless assuming that all filesystems are case-sensitive. I unpacked the source tar onto an HFS drive and spent ages trying to work out why some externs were undefined. tree.c was being extracted over TREE.c. There are so many assumptions one can make without checking that they hold for every platform - and even if they do, a future platform may break them if they're not part of a standard to which you're working).

  21. Best java gui tk for linux by sprekken · · Score: 3, Insightful
    http://java-gnome.sourceforge.net/cgi-bin/bin/view

    Java-Gnome binds gtk with java. Very nice.

    1. Re:Best java gui tk for linux by Seb+C. · · Score: 1

      Speaking of a toolkit, SWT is less linux centered and also quite a good toolkit. Never saw how gtk bindings looks like, so i won't compare, but for playing a bit with SWT (writing eclipse plugin), it's definitely worth a look (and wraps gtk as well).

  22. Re:Java: I love it, but... by id09542 · · Score: 1

    Why do I keep having Java applications that require a specific JVM level. Not just a minimal level but an exact level. I am running 3 different JVMs on my workstation because of this. Is this just sloppy programming on someone's part or what.

  23. Java -- the abusive relationship by Eberlin · · Score: 5, Funny

    Well, here's another article just beckoning me back to try Java development once more. Here I am, on the rebound again, not knowing any better. Almost forgetting the tough time I had creating GUIs, coming to grips with the AWT then Swing. Going nutty putting multiple classes in a jar file and all that manifest destiny sweet talk that had me at "hello world" but not much further when I ventured out past the simple stuff.

    Oh yes, it was sooo much better than VB if you can get past the quick way to make graphical interfaces. The multi-threading made creating a multiplatform port-scanning tool so much more pleasurable.

    Then there was running the code on multiple platforms. The need to install the JRE, ensure you're pointing to the right CLASSPATH, and all those somewhat cumbersome things.

    Yeah, after a while, I forget those experiences. I come crawling back, not wanting to be assimilated in .NET, but too afraid to jump head-on into a relationship with cpp.

    I'm sure it's going to take time and effort, and I know I need to put more time in our relationship. Right now, though, I'm in the middle of a project with PHP so I'll get back to you when I can. Just remember, Java, that it's not you...it's me.

    P.S. -- I think your father's a prick.

    1. Re:Java -- the abusive relationship by Joe+Tie. · · Score: 1

      I started to get back to Java, but as much as I love it at times I also began to recall just how much I....fell down the stairs back then. Much happier with python, wx bindings for the gui, and the 0.4.0 pre-release of Boa.

      --
      Everything will be taken away from you.
    2. Re:Java -- the abusive relationship by thej1nx · · Score: 1
      I'll buy on your satire dear sir, when you show me a cellphone using php or python to run applications.

      I am not sure when someone speaks about portability, why people instantly visualize it as running it on just windows or *nix. There *are* other architectures you know ? And there *are* other things, that java can be used for beyond servlets to generate webpages.

      In other words kind sir, the world is bigger than the small pond you have been living in.

    3. Re:Java -- the abusive relationship by Ikari+Gendo · · Score: 1
      I'll buy on your satire dear sir, when you show me a cellphone using php or python to run applications.

      Done.

  24. Re:Java: I love it, but... by michaelggreer · · Score: 1

    That is exactly where they initially promoted it, but AWT performance was terrible and few had the broadband to download the jars in a reasonable time. So focus moved to the server side, where it performed well. Now, IBM has built native SWT widgets and performance is not as bad, although still a slow start and a monster memory hog for GUI apps. The best thing about Java now, as with Linux, is the enormous community of developers building excellent libraries (jakarta, hibernate, spring, webwork, etc). That is where it truly shines.

  25. Re:Run everywere, my ass. by SunFan · · Score: 1


    I had no trouble with recent JDKs on Debian 3.0. Your powerbook must be the flintstones model.

    --
    -- Microsoft is the most expensive commodity operating system and office suite vendor in the marketplace.
  26. Re:Write once, run everywhere is called GCC by MightyMartian · · Score: 2, Interesting

    > JAVA is a big fat marketing lie.

    Which, amazingly enough for a lie, I am now using to rewrite some of our inhouse utilities in preparation from the move from Win2k to Linux servers. There's not too much overhead on CLI Java programs, and I've ported one app so far, rewritten on my Windows box, and it ran without a single hitch on the Linux server it's destined for. No recompiles, no nothing.

    --
    The world's burning. Moped Jesus spotted on I50. Details at 11.
  27. Re:Java: I love it, but... by mabinogi · · Score: 5, Informative

    Sloppy programming and / or paranoia by the developer.

    Anything written for java 2 (1.2 and up) should work fine on the latest 1.4.x, and will probably work fine on 1.5 (I have had some funny issues with 1.5, but they were build time issues)

    The only thing I've encountered that actually broke stuff in a version change was the bizarre choice by Sun to not just deprecate reading the OS environment, but to completely disable it by causing it to throw a runtime exception in 1.4 They changed their mind and re-enabled it and un deprecated it for 1.5 though.

    --
    Advanced users are users too!
  28. Re:Run everywere, my ass. by SunFan · · Score: 1


    Sorry about that, _Powerbook_ didn't sink in right away.

    --
    -- Microsoft is the most expensive commodity operating system and office suite vendor in the marketplace.
  29. I wonder by Skiron · · Score: 1

    ...if this book was about any other language ever invented it would be 50 pages and 10 times quicker to read with 90% less calories burnt?

  30. Re:Java: I love it, but... by Raul+Acevedo · · Score: 2, Interesting

    I work for a fairly high profile Internet commerce company that uses WebLogic and pure Java. Our production servers all run Solaris, most of our developers run Windows XP (previously Windows 2000), and I run Linux.

    We have hardly ever had any issues with "Write once, run everywhere." It works. Really. Probably writing Swing/GUI apps is different, but on the server side, developing and deploying across different platforms works like a charm. Admittedly the issues you get on development vs. production can be very different, so deploying a production system on multiple operating systems might give you different results. But as far as testing and developing on two platforms, then deploying on a third, we have no complaints.

    --
    In a real emergency, we would have all fled in terror, and you would not have been notified.
  31. Re:I still fail to see .. by sundru · · Score: 1

    Mebbe, neither does anyone else for making your post about what i cared or did not care.

  32. Wow... that's just troll-tastic! by MidKnight · · Score: 2, Insightful

    I congratulate you on providing one of the best examples of trolling I've seen in a while from a non-anonymous post. Let's see if you've covered the basics:

    • Don't even mention the article or review? CHECK.
    • Claim through a variety of tech buzzwords that something else is better than the subject matter? CHECK.
    • Offer no substantive proof other than "a zillion times"? CHECK.

    Congratualations... you're a winner!

    All sarcasm aside, if you don't like Java and don't develop software in Java, then a book whose title starts out Java Application Development is probably not for you. Moving right along....

  33. Re:I still fail to see .. by jbellis · · Score: 1

    If you seriously can't see the difference between having to run "make install" (oh, and good luck if autoconf didn't get things right) and "java -jar myapp.jar" you have never developed an application worth the name.

    As a troll though, congrats I guess.

  34. Re:Write once, run everywhere is called GCC by SunFan · · Score: 1


    Which linker? Which version of libc? Linux or UNIX headers?

    C is technically the most portable language ever, but it doens't make it trivial. People say "test everywhere" as if that's supposed to make Java look bad, but I think it is a god-send relative to hacking up the C preprocessor and figuring out autoconf.

    --
    -- Microsoft is the most expensive commodity operating system and office suite vendor in the marketplace.
  35. Re:I still fail to see .. by hanshotfirst · · Score: 1
    The point of java is not compile anywhere, but run anywhere. When you compile c/c++ on one platform, you get a binary for that platform. When you compile a java class file on one platform it (in theory) will work on a comparable jvm on any platform without needing to recompile. Distribution just got easier.

    Of course theory and practice are still 2 different beasts.

    --
    Why, oh why, didn't I take the Blue Pill?
  36. Re:Run everywere, my ass. by FatherOfONe · · Score: 2, Informative

    I normally don't reply to "Anonymous Cowards" but in this case I will make an exception.

    If you are running OSX 10.3 you are running a very new version of the JVM. If you are running OSX 10.2 you are also running a very new version of the JVM. So I guess my question is what OS are you running on it?

    Now you mention that you don't "miss" Java. I will argue that you don't care what an application is written in, as long as it looks good, is stable and does what you want. So I challenge you with this. How do you know what the application was written in? You probably don't. If you are a Linux/Macintosh/Windows/Netware/Solaris user and you launch your MP3 player and it works do you really care to see if it was written in C, C++, Java, Cobol?

    JAVA runs on all MAJOR platforms.
    It doesn't require the user to "compile" any code to run.
    It has a rich GUI toolkit built in.
    It handles object cleanup well.
    It's speed has become excellent at most tasks
    It has excellent networking support built in.
    It has a giant developer base helping to add funcitonality.

    --
    The more I learn about science, the more my faith in God increases.
  37. Re:I still fail to see .. by michaelggreer · · Score: 1

    Actually, Java byte code is not interpreted, and has not been for some time. You are running just-in-time compiled code. This means startup is slow, and memory is hogged, but don't claim it has to do with an interpreter.

  38. IN Java not WITH Java by somethinghollow · · Score: 1

    I think he meant he was sitting in a cup of coffee that was sitting on top of a Linux machine.

  39. Re:I still fail to see .. by NewOrleansNed · · Score: 1

    The sad part about this is that someone might actually give you a job someday to do something that involves programming when your real calling is at the CBS News department.

  40. Java and Linux by MarkWatson · · Score: 3, Interesting

    Actually, this book sounds like a good idea - cover deployment issues like database installation and configuration with Java, tips for deployment, etc.

    I usually do my development on OS X (except for new JDK 5 coding - use my Mac as an X display for a Linux box -- annoying that Apple is slow getting JDK 5 out except for in a $500 developer's preview). Anyway, I do most of my deployment on Linux, and the ease of this depends on which hosting company I am renting a server from. For example, is a usable (i.e., PostgreSQL) database installed, easy to administer, etc. I have not read the reviewed book, but hopefully a lot of practical issues are addressed.

    One interesting thing about the Linux platform is that now all new distros have RPMs (or equivalent) for installing runtime and developer support for GNU GCJ.

    I find GCJ to be very interesting (a bit of a nuisance to run on OS X) because not only is it a way to run Free Software (GPL) on Linux, but it also makes it possible to take large Java applications like Lucene, compile them natively, and then use the compiled code in Python, C++, Ruby, etc. programs. Very cool, really.

    If Linux was my development platform, GCJ would be a much more important tool for me - it would be great if Apple installed GCJ runtime libraries by default (yes, they are large). While Java is not as productive a language for many programming projects as Python, Ruby, etc., Java is a great language and platform for many types of projects; having GCJ runtime installed by default on OS X, Linux, and Windows (well :-) would make Java a more suitable language for small applications and utilities. This would get around Sun's lame Linux/Java licensing issues also.

  41. Credit where credit is due. by IvanHo · · Score: 3, Insightful

    I'm not a Java zealot by any means, but Java deserves credit for what it does well and one of those things is reducing the importance of platform.

    I've recently worked on a J2EE project with nearly 1 million lines of code -- they're all needed, really ;) -- that runs on XP, Redhat, Mac/OS, Solaris >= 8, HP/UX and AIX 5L.

    Have there been platform related bugs? Yes.

    Are there any open? No.

    Are there some lurking? Maybe, but we've tested extensively.

    Could any collection of jackasses build this app? No, sorry.

    Is Java a magic bullet? No more than any other tool.

    1. Re:Credit where credit is due. by metamatic · · Score: 1

      Have you tried it on multiple J2EE platforms (e.g. WebSphere, JBoss, etc)? Or just multiple operating systems running the same platform?

      --
      GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    2. Re:Credit where credit is due. by IvanHo · · Score: 1

      In the case I mentioned in my original post, it's a single J2EE platform, Weblogic. Switching application servers would be non-trivial because our system uses EJB 2.0 CMP/CMR extensively. We use Ejbgen, which has been great, but is targeted to the Weblogic platform. If I were starting again today I'd use xdoclet as it's more flexible and, I believe, switching platforms would be nearly as easy as switching OS's is now. This is wishful thinking with a small POC as the underpinning.

    3. Re:Credit where credit is due. by metamatic · · Score: 1

      Right, that's one of my big problems with J2EE--it's really totally non-portable. Throws away the entire point of Java.

      --
      GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    4. Re:Credit where credit is due. by chochos · · Score: 1

      That's why projects like Spring have become somewhat popular. I use it a lot, to avoid all the EJB ugliness and any dependency to a particular J2EE container. You can declare your own JDBC connection pools, configure a lot of beans (not necessarily EJB's) as singletons and access them through an object called ApplicationContext. It's really cool. And for persistency I'm using Hibernate, which CMP is trying to catch up with.

  42. Binary Programs are not always appropriate by fistfullast33l · · Score: 2, Insightful

    I won't argue that Java feels a little bit slower than C++ on a native platform. However, there are a few instances that I can think of where a developer would choose Java over C++:

    Portability - You can't run C and C++ in a web browser very easily. In an enterprise environment, or even on the internet, you need to be able to distribute your application quickly. No one likes having to download a program from the Internet, especially in the days of spyware and adware. Allowing people to just run your program with code they know won't break their computer is the best way to fly. No to mention, HTML allows you to embed a Java applet much easier than CGI allows you to execute a local program, in my opinion.

    User Interface Design - Ever try to write a Windows interface? What about a GTK interface? If you need a program whose main focus is in computation and calculations, not User Interface or data entry, an IDE like NetBeans will help you easily design the interface in an hour or two rather than having to manually code it by hand and constantly test how it looks. Before .NET, you couldn't easily code the interfaces. At least with Java you can guarantee everything will look the same no matter where it runs.

    Memory Protection - With Java, you have no worries about memory troubles. With C and C++, the developer has to handle his own memory allocation and garbage collection. Java does it automatically. What worries do you have when you dereference a pointer to 6 MB's of memory if Java is going to clean it up for you? There's almost no room for pointer miscalculations and for dealing with ugly Microsoft API's that handle six or seven different arguments, all either reading or writing and all being pointers. Unix API's are simpler but you still run into Segmentation Faults with Linked Lists and other Data Structures.

    When you write an application, you want to focus mostly on the purpose of that app, not small CS details such as memory allocation and UI design. Obviously, some projects require this attention but for an enterprise project that isn't going to break into any new territory, eliminating as many problems as possible is the best choice. That's why languages like Perl and Java are great - very little chance to blow things up. I'd agree with someone that Perl might be a better choice in some instances over Java, but saying that C and C++ are better choices because you can compile them natively and run them a few milliseconds faster isn't a good reason for me.

    1. Re:Binary Programs are not always appropriate by Scorchio · · Score: 1

      Memory Protection - With Java, you have no worries about memory troubles.

      Unless you're working with a seriously restricted system.

      I'm relatively new to Java, but I like it. The code seems more refined, elegant, and less likely to blow your face off if something goes wrong.

      However, all the overheads involved with type checking, array bounds checking, etc, and the relative lack of control over the memory management compared to C/C++ all make life hard when your available memory is measured in kilobytes, not megabytes. I'm currently knee-deep in a J2ME project, cramming 15lb of crap into a 10lb bag, and my #1 problem is cutting down on heap usage. The line "With Java, you have no worries about memory troubles" caught me like a slap around the face with a haddock!

    2. Re:Binary Programs are not always appropriate by nazzdeq · · Score: 1

      You meant to say, "At least with Java you can guarantee everything will look like shit no matter where it runs." Java GUI apps look like something that came from Sun. Ugly ass. Nazz

  43. Re:Run everywere, my ass. by dogfull · · Score: 1

    I'm a starting (as in: learning) developer, and my platform of choice is linux. I write mostly in C. So if I compile my stuff with in elf format, it'll run perfectly on linux 2.4.26 with glibc 2.3.2 and the likes, but thats about it. Now if I however compile it with gcj (which works perfectly), I can share it with all my friends with much rejoice :-) I can actually get feedback from my windows-using friends. Now please convince me java is good for nothing.

  44. Re:I still fail to see .. by umshaggy · · Score: 1
    Any program you write completely from scratch with C++ could be compiled for any platform. But if you use a third party API in C++ chances are it is not available to you in source, so you are stuck.

    The thing about java is that everyone is forced to distribute "source", or more specifically, bytecode, which amounts to the same thing for cross-system compatibility purposes.

    Can you make non-portable "libraries" in Java? Yes.

    But making (and finding) portable "libraries" in Java is much easier.

    --
    Did you buy a Neuros today?
  45. What about make and emacs? by sscanf · · Score: 2, Interesting

    I use Xemacs, JDE, and make on Linux to create commercial products in java/jsp.

    At my last job, back on 2002, ant forced me to hate it when:

    1. I had to get the next version of ant to ask it to pass a -ea to the java compiler.

    2. We had this crazy huge build.xml file that was created for our project. It started off life as a rats nest and only got worse from there (OK, probably not ant's fault but it had the same effect on me). On top of it being huge, its in XML which is way hard to read compared to a makefile.

    3. I never could figure out how to ask ant to echo the compile line. Make echos it by default and I like it that way.

    That was three strikes.

    On my current project we are using make but one of them whipper snappers came along and made a build.xml file for the project. Its just one big, ugly, build.xml but it is much faster. The project has 30 or so small, easy to read/understand, makefiles (and I figured out how to make it go much faster on a clean build but its still not as fast as ant).

    Sure, make has its quirks (e.g. the tab thing) but I figured all thouse out 15 years ago.

    I tried Eclipse last fall after seeing an interesting presentation on it. I tried it for a couple of days but it felt so bloated that I soon abandoned it.

    --
    This sig intentionally left blank.
    1. Re:What about make and emacs? by tetsuji · · Score: 2, Informative

      Ever try Maven?

      build.xml files tend to get crufty. Maven builds are sleek, particularly if you write your own plugins to handle the odd bits. And the mevenide integration with both Eclipse and Netbeans is almost flawless.

    2. Re:What about make and emacs? by steve_l · · Score: 1

      > 1. I had to get the next version of ant to ask it to pass a -ea to the java compiler.

      -ea? Its not a javac option. And you can add any compiler argument like with the tag. Maybe you mean the -ea enable assertions feature of the java program. yes, that didnt come out till after java1.4, but you could still do it by hand.

      2. If you dont know what you are doing, yes, ant can be an ugly mess. So can make.

      3. Echo the compile command line. Every try "ant -verbose"? I'm not sure it does, but remember that ant doesnt create a command line for javac; it just loads it inprocess and streams stuff by.

      I am sorry that had a bad experience with Ant. Maybe you should try Maven instead.

      Steve Loughran, Apache Ant Project.

    3. Re:What about make and emacs? by Cederic · · Score: 1


      For people under the age of 40 Make is incomprehensible, unintuitive and full of quirks that make so sense. Or maybe that's just me.

      If you want 30 or so small, easy to read/understand Ant build.xml files, all controlled by a single daddy build.xml file, go right ahead - the tool supports it just fine. And it'll still be fast.

      If you want them really really easy to read, I'm very concerned. You shouldn't need to be messing about with them - write them, get them working, leave them alone. Constant fiddling implies you keep doing it wrong.

      If you want easy to read anyway, go back to eclipse - it has built-in Ant support. It may seem bloated but that's because you haven't learned half its features. It's designed to increase your productivity - learn how to use it so that it can.

      Shit, you're calling Eclipse bloated and you use Xemacs? I should kill this reply and mod you 'troll'....

    4. Re:What about make and emacs? by SurfTheWorld · · Score: 1

      1. I had to get the next version of ant to ask it to pass a -ea to the java compiler.


      You could've used exec and ran javac, which allows you to specify any worldly command line argument you wish.


      2. We had this crazy huge build.xml file that was created for our project.


      Ant allows you to import other buildfiles in a namespace-aware fashion. This allows you to create multiple build files, and access them from a top-level build file that imports the smaller buildfiles.


      On top of it being huge, its in XML which is way hard to read compared to a makefile.


      Ant's build.xml syntax is decidedly declarative, and is not intended to be similar to make's rule-based syntax. According to Ant-in-Anger, the original authors did not intend for the build.xml syntax to be what developers read/wrote. They intended for people to develop tools that generate build.xml (perhaps using xsl?).


      3. I never could figure out how to ask ant to echo the compile line.


      Use the task, and exec a variable that you . You'll be able to see the full command line used to exec.

      In general, I think that a lot of people mis-use Ant (or mis-apply it). They set out to create a build environment assuming that Ant == Make (except with XML syntax), and then are bitter when what they get is not exactly what they expected.

      It sounds to me like your problem lies not with Ant. Rather, it seems to me like your problem is with the original author of your build.xml and their misapplication of Ant.

      Just a thought,
      --
      Do it for da shorties
    5. Re:What about make and emacs? by metamatic · · Score: 2, Insightful

      For every horrible build.xml file, I can find you an incomprehensible Makefile. Or even worse, an automake file... It's not the tools, it's the people writing the files.

      --
      GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
    6. Re:What about make and emacs? by sscanf · · Score: 1

      Yeah, OK Xemacs sucks up memory bit kicks ass on a reasonable box and eclipse is a dog on the same box - maybe I'm misusing the word "bloat". How's "has poor interactive performance in comparison".

      Dunno what you hava against something thats easy to read and understand. I'm not tweaking makefiles all the time but I do add to them, and create new ones as the project gets bigger. For instance, as new classes are added, they get added to the makefile. It allows for fine control of what gets built vs other code that may land in the same directory (path finding, test code, etc).

      Again, I don't know ant but my impression has been that ant just starts up the tree and sucks in every .java file it finds. Often OK but not always.

      I also get that the idea is to use a tool to configure your build.xml, well, I don't want to. When developers use tools like this, they learn how to use the tool, not how things work. A developer is forced to understand how things work when they have to create/maintain makefiles as new packages/classes are added to the system. Tools that magically put everything together for you make you dumber (or keep you from getting smarter).

      --
      This sig intentionally left blank.
    7. Re:What about make and emacs? by sscanf · · Score: 1

      > > 1. I had to get the next version of ant to ask it to pass a -ea to the java compiler.

      > -ea? Its not a javac option. And you can add any compiler argument like with the tag. Maybe you mean the -ea enable assertions feature of the java program. yes, that didnt come out till after java1.4, but you could still do it by hand.

      Yeah, it was assertions, I can't reacall the details, all I know is that our build broke when we added assertions and I couldn't teach ant how to pass in the right args to something, must have been java for the test target.

      I don't buy it that I have to use ant if I'm developing in java but thats the way the world has gone. I don't see where the big win is except thats what all the IDE's are built around. I suppose ant offers a more portable build environment but I generally don't care (and there's always cygwin).

      Maybe my real problem is that nasty build.xml that was thrust upon us on that project back in 2002 (and, yes, makefiles can get pretty ugly too).

      --
      This sig intentionally left blank.
    8. Re:What about make and emacs? by MSBob · · Score: 1

      You REALLY have not tried Eclipse. Eclipse allows you to edit Ant scripts the same way that your vi or Ed does. But it also gives you nice stuff like name completion (hit Ctrl-Space and get a dropdown with all tags available in the current context) it verifies the syntax of your Ant script on the fly and it can execute your Ant script much the same way you do it in your bash window. Hell, you can even replace the original Java Builder of Eclipse with your customized Ant based build. Eclipse and Ant is a very, very powerful combo. Learn the tools you try to criticize before you retreat to your old ways!

      --
      Your pizza just the way you ought to have it.
    9. Re:What about make and emacs? by mrjohnson · · Score: 1

      What's so wrong with the old ways? Before you get carried away about how "powerful" something is, consider what you need. Here's a Makefile excerpt:

      Search.class : Search.java
      ${CC} -classpath ${CP} Search.java

      Easy. Every developer's system should already have `make`, so there's no need for other dependencies or learning some crazy IDE just to compile some Java. Heck, every IDE and text editor should be able to run `make`.

      The following makefile target is about as advanced as I needed, and it's mostly scripting. It's a little something I added when we got some programmers involved in the source using fancy IDEs that couldn't even format multi-line statements correctly. So I use emacs to fix it for them:

      indent :
      for f in `ls *.java`; do \
      emacs --batch -l ~/.emacs -l ${TOPDIR}/batch-indent.el --eval "(batch-indent \"$$f\")"; \
      done;

      New ways are all fine and dandy until you realize you just reinvented something another programmer has been doing for years. He'll probably laugh and mumble something about "those kids these days."

    10. Re:What about make and emacs? by LarsWestergren · · Score: 1

      Every developer's system should already have `make`

      Why? Not all people have Unix or program C.

      so there's no need for other dependencies or learning some crazy IDE just to compile some Java.

      Ant is not just for compiling. Large projects usually have tasks for many steps in the development process - for instance, you can define tasks so you get the following steps just by pressing a button:
      CVS souce update, souce compile, junit testing with reports mailed to developers, javadoc generation, JAR packaging all into a tidy application.

      The following makefile target is about as advanced as I needed, and it's mostly scripting.

      No offence, but would like to see your little makefile handle a large project; with hundreds of programmers with different OSes, IDEs and subprojects.

      New ways are all fine and dandy until you realize you just reinvented something another programmer has been doing for years. He'll probably laugh and mumble something about "those kids these days."

      Sometimes a wheel comes along that is a significant improvement on previous ones.

      --

      Being bitter is drinking poison and hoping someone else will die

    11. Re:What about make and emacs? by steve_l · · Score: 1

      If you stick to one (real) OS, then Make+Unix is a good system. Cygwin is troublesome because java is still a windows app. We get a lot of support calls there: http://ant.apache.org/manual/platform.html

      I would say the nice thing about Ant is that it integrates testing and more lately deployment, plus cruise control can automate everything. IDE support is nice-ish, it does give you broad choice of IDE

    12. Re:What about make and emacs? by Seb+C. · · Score: 1

      Well, ant is running java and call for the Compiler class inside the same JVM. Java startup time is known to be slow, so make will never get close to ant compilation speed.
      I've been an Xemacs fan for a few years, and tried JDE. I had the feeling JDE was an attempt to bump some feature xemacs would not support otherwise : it worked, but was somehow painfull and laggy (Not to mention the times when you need to kill the BSH to get a refresh). Still, i've stick with it until a got a more powerfull computer, with enough RAM to run eclipse.
      Eclipse is not, by any way, bloated, but it requires large amount of RAM, and a fairly powerfull CPU. The slowdown i've experienced with eclipse were all due to the computer swapping the eclipse process (and swapping a 120Mb+ process is not trivial). Once you get enough RAM to avoid swapping, it runs smoothly. And once, you're used to "my file is saved, then it's compiled), you'll forget all your makefile, ant script what-so-ever...

    13. Re:What about make and emacs? by mrjohnson · · Score: 1

      "Why? Not all people have Unix or program C."

      Are you talking about Windows? Yeah, I wasn't... Otherwise, most other OSes either have make installed or can fetch it easily...

      Windows does have nmake, but it drove me nuts that it's necessary to restart apps to replace in use jar files. oy. So the guys I was trying to help get started on the source ended up getting shiny new Linux boxes.

      "... you can define tasks so you get the following steps just by pressing a button:
      CVS souce update, souce compile, junit testing with reports mailed to developers, javadoc generation, JAR packaging all into a tidy application."

      Uhm... I already do half of these things with make, but they're all trivial.

      "No offence, but would like to see your little makefile handle a large project; with hundreds of programmers with different OSes, IDEs and subprojects."

      make has been doing this for years...

      "Sometimes a wheel comes along that is a significant improvement on previous ones."

      I think you overestimate it's improvements, is all.

      Actually, I wondered why you were being so defensive until I realized that I forgot the smiley at the end of the last post. I don't really care what you use to compile your stuff, just don't force me to use it. :-)

  46. Re:Java: I love it, but... by FatherOfONe · · Score: 1

    Ok what have you developed in JAVA that has caused you problems on other platforms? Could you give some specifics? Perhaps I do boring code, but I have developed many many many many many java applications and have had little issues moving from:
    NetWare 5.x
    Windows NT
    Windows 98
    Windows XP
    Windows 2000
    Solaris 7-8
    Linux (various versions and distro's)
    Linux 64 bit (SuSe for X86-64)
    IPAQ (small apps, not much experience)
    Palm OS (again small apps not much experience)
    Macintosh OSX 10.2 and 10.3

    and i am now looking at the Nokia cell phones.

    I have not found any Major issue with any of those platforms. Granted I just do business applications, and don't make games, so perhaps I am missing something.

    I, on a daily basis write code in Windows/Jdeveloper and then deploy to a mid tier running JBOSS/SuSe 64 bit, then deploy to production of both RedHat and SuSe 32 bit running both JBOSS and Resin. For me JAVA has achieved write once run anywhere. We still do test, but I can't honestly think of any issue that has been because of some JAVA incompatability on a particular platform. Are there quirks with different JVM's??? Yep, but I have found that to be the case on the same platform :-) The language isn't perfect, but for a lot of us it is by far the best language out there.

    --
    The more I learn about science, the more my faith in God increases.
  47. Same tools on both by slam+smith · · Score: 1

    I find that I use the same tools on windows and linux for java development. Ant and Eclipse, they work about the same.

  48. Re:Java: I love it, but... by Bob9113 · · Score: 1

    Java's motto shouldn't be "Write once run anywhere" - it should be "Write once, test everywhere". An admirable goal, true, but don't kid yourself about what it really means.

    1 MegaLOC. 36 megs of Java source. Swing, JSP, Servlets, SOAP, SOA, Kerberos, LDAP, JDBC, and EJBs (to name just a few). Our newest clients are C#. 4 years I've been working on it. I'm one of 4 developers using Linux. The other 20 or so use Windows. We deploy to Windows 2000, XP, Solaris, SuSE, Debian, and RedHat on the server side, and all those but SuSE and Solaris on the client side. The most I've done to support it is replace backslashes with forward slashes (forward slashes in Java work on any platform).

    Stop propagating your ignorance.

  49. Re:Java: I love it, but... by WeirdKid · · Score: 3, Insightful

    A few (who am I kidding... several) years back, Gartner was promoting a different spin on why IT departements should adopt Java: "Train Once, Write Everywhere". The idea being that with Java, you could have (in theory) the same guys who are writing the GUIs and desktop apps write apps for the server and mobile environments too.

    Yes, I know you could argue that "C" fits this bill nicely, too, but the fact is that most corporate IT shops at the time were VB and PowerBuilder clients talking directly to databases. Your average corporate developer would do more harm than good with C, and Java was seen as a simplified C++.

    Anyway, I don't know if Gartner ever changed its stance on this, but the reality became quite different with the introduction of J2EE; J2EE required quite a different set of skills compared to good ol' J2SE, and many developers still can't adequately grok distributed server-side development.

    Java is just a language, and I firmly believe that more attention needs to be given to the art of programming rather than to any specific language. It seems nobody cares anymore for appropriate use of patterns and careful selection of algorithms. It's all brute force programming. Get it done. Here's your soup - go code.

    You can learn all the languages you want -- learn to speak English, Russian, Spanish, French, Hebrew, German and Greek -- but if you don't know how to communicate...

  50. Hate Eclipse by ebunga · · Score: 1

    Eclipse is just plain annoying. Behind the pretty shiny interface is, well, just an icky IDE. Oh, it's modular and open source. How nice. Heck, with software written in Java, it's almost impossible to write something that isn't modular. I'll take the sanity of IntelliJ IDEA, thanks.

    I was quite happy that the folks over at Jetbrains had a nice $250 personal license special a few weeks back. It's the only decent IDE I've used.

  51. Java on Linux Topics That Really Need Covering by rimu+guy · · Score: 4, Insightful

    None of the topics mentioned in the review really seem to be Linux specific. Why not just call it "Java Application Development" (period, no "on Linux")?

    There are some things that I think would be worth covering though, in a book about Java/Linux. Particularly for someone coming from a development of an app in a Windows Environment to deploying an app in a production Linux environment. Since often they will know all they need about Java. But won't be very familiar with Linux. And may not know the best way to do things in a 'Linux' way.

    Some examples...

    Init Scripts: Setting up init scripts to stop/start your Java services (e.g. getting tomcat to run on boot up). That differs a lot from how you'd do it with services on Windows.

    Permissions I: Often on windows things will be run as root/Administrator. On Linux the better way is to have Java services run as a non-root user. e.g. run Tomcat as tomcat not root. There are some implications to this. e.g. you an unprivileged user cannot listen on addresses with sub-1000 port numbers. The solution is something like iptables or mod_jk2.

    Permissions II: Another permissions issue (that I see crop up a lot with people moving from the Windows dev machine to one of our Linux servers for productions) is file permissions. Users being not being able to read/write config/data files that they had been able to see/use well enough on Windows. i.e. a paragraph on the almighty chown -R would be handy.

    Command Lines: A page or two on running things from the command line would be a great thing. Often people working on Linux servers are doing so remotely. And won't have a GUI. And often they are only familiar with launching their app from the ide. So knowing about 'java' and 'javac' would be handy. And mention the need for colons between dir names not semi-colons. e.g. java -cp /myclasses:/3rdparty.jar mainclass.

    Automating Tasks Users moving from a windows/dev environment to a Linux/production environment would also be well served by a page or two on automation tools. e.g. using ant to automate the process of getting code out of CVS and deploying it. e.g. cron for automating the process of running Java jobs on a regular basis.

    --
    Java Hosting on Linux, Simple Enough Even For Windows Users

  52. Re:I still fail to see .. by Goeland86 · · Score: 1

    If you seriously can't see the difference between having to run "make install" (oh, and good luck if autoconf didn't get things right) and "java -jar myapp.jar" you have never developed an application worth the name.

    I think that's also a bit more than flame bait. I'm learning both C and java. C is lower level, but at least I find it easier to write and read. And I don't have to worry about classes, filenames capitalized, commands that are extremely long and have so many "." and other weird things going on.

    So don't insult other people like that. I'd rather do a make install for a program that'll use the gtk interface like the rest of my system than do java -jar myapp.jar and have something that is totally off and disturbs the eye flow on my desktop.
    I'm sorry, but I'm picky enough to do this. If you're not, it's your problem, but don't yell at others for wanting something smooth.

    --
    ---- I am certain of only one thing : I know nothing else.
  53. Apache Gump is the nightly status of OSS by steve_l · · Score: 1

    Look at http://brutus.apache.org/gump/kaffe/

    This is a nightly check out and build of all OSS projects in Gump. It is slowly coming together, as now the projects are putting in tweaks to work better with the kaffe toolchain, pulling out any naughty use of sun.* code, etc, etc. The goal is simple: all the Apache and other main OSS projects, built with OSS libraries, on an OSS JVM. One day, we shall be truly free...

  54. Re:Run everywere, my ass. by FatherOfONe · · Score: 2, Informative

    I try and compile your code with GCC and get tons of errors. (I get them all the time with Linux and so do you if you grab lots of source code, perhaps this was the core reason RPM was developed). You and I then spend lots of time working with people to resolve the issues. We generally find out that we don't have a recent library that is needed or we find out that we have too new of a library. We then have a fun option of going to "RPM hell". We start a long process of upgrading stuff in hopes that it will fix our problem.

    Some of this is the same in JAVA but with one difference. You don't compile the source code on the machine. You send them a JAR file (zip compression) and in most cases they can just click(or double click) on that file and it runs. Doesn't that sound better? Send a file to a user, have them click on it and it runs? Heck you can even do one better. You can use Java's web start and have them go to a web page, launch the app from the page, it will check to see if you need a JVM installed, if so it will install one (major platforms only), then copy the application down to you and run it. The next time you try and run the app it will check the server automatically for updates and download them if needed. If for some reason the network is not available then it will run the local copy. Some people hate this, but a ton of developers and businesses love it. So now you have two ways of delivering your application. One with Webstart and one with sending a JAR file. No compile needed on either one. All the user needs to do is click on the file and they are off and running.

    Lastly, I would also argue that if you have some basic users out there it will be far far easier to get them to load a JVM(with or without using webstart) than it is to get them to load a C compiler. The JVM installer has come a long way on all the major platforms.

    Again though I ask you. Do you really care what the code was written in? When you click on your Instant messenger, Email client or CD/DVD burner and it runs, do you care what it was written in? If so then why?

    Now I as a developer who wants to write a DVD burner have three options.

    I only target Windows because they own 93+% of the desktop market? Most will answer yes to that question and use only Microsoft stuff, and lock the app in to the Win32 API set.

    I can develop the application in JAVA and make the installer check to see if the user has a JVM installed. I then can focus my testing on Windows and the product should (without recompile) run on all other platforms.

    I could write the software in C or C++ and force the user to have a compiler for their system, (good luck on the various windows versions), then compile the code on that system, create icons for them and they would be off an running.

    Out of those options most developers choose options 1 (sucks but it is reality), a few pick option 2 and only open source people pick option 3.

    lastly I want to point out that NOTHING is stopping the developers in option 1 or 2 from giving the source code away also. So those brave souls who wanted to compile it could. I can say that I run a quite a few JAVA applications from sourceforge that were written soley on Windows and tested on Windows but because they were written in JAVA I have had GREAT luck in getting them all to work on Linux. Specifically 64bit SuSe. Now getting C source code and compiling it.... Well that is another matter. I still don't have a working copy of Mondo, and can't compile it to save my life.

    --
    The more I learn about science, the more my faith in God increases.
  55. Re:Java: I love it, but... by alan_dershowitz · · Score: 3, Informative

    Back when I was running JDK 1.4.whatever, there were inconsistencies in operation between Windows and Linux using the NIO (non-blocking I/O) libraries. There are several messages on Sun's message boards relating to this. It seems to have been worked out by now. NIO was kind of squirrely for a few revisions there.

    I have coded a wide range of applications, and have used many of the facilities provided by Java. NIO was the only part of the standard library that gave me trouble. However, I have a friend who was using Java3D for a project. His jobsite uses pretty much the gamut of operating systems. He has told me that Java3D is just plain not portable. Code that worked on Windows would not work on Solaris. I have no details on this, but they ended up using something else, according to him.

  56. Re:Java: I love it, but... by Taladar · · Score: 1
    The one area I always have to be careful about is setting up the AWT environment, but this is sysadmin stuff and does not effect the code.
    What you call 'sysadmin stuff' is the thing that has to be repeated thousands of times (once on every computer your app is installed). If you had to spend 1 hour more with the code and 1 minute less per machine with 'sysadmin stuff' you would save lots of people lots of time although you might have to invest a little more.

    Java isn't bad because of issues at compile-time on different platforms. It is bad because you simply can't trust a JRE to install automatically (newest version) and run a given Java JAR. Sure it runs if you specifically handcraft the environment on each computer but that doesn't save anyone important (developers are not important in this case) any time.
  57. Re:Java: I love it, but... by Taladar · · Score: 1

    Almost any modern programming language can get you platform independance if you just use Sockets, File-Access and "internal" logic. Server-side programming doesn't use many platform specific libraries.

  58. It ain't just the compiler, Luke. by LordByronStyrofoam · · Score: 2, Informative

    If your program _only_ relies on gcc it must be a text-based app - X calls don't work on Windows and MFC libs aren't available for Linux.

    Java comes with portable GUI libs.

    --
    Slashdot's name? When my compiler sees /. it generates a warning about a badly formed comment.
  59. Mod parent up! by BuddieFox · · Score: 1

    Parent post is probably as balanced as you will get on /., I think he sums it up: Java is 98% problem-free cross-platform, if you poke long and deep enough you might find some problems, but these problems are most usually minor and mostly due to slightly different underlying platform issues like threading models that give different scaling behaviour (cross-platform doesn't mean you can entirely escape the platform you are running).

  60. Re:Java: I love it, but... by michaelggreer · · Score: 1

    I guess I'm talking about server deployment for web apps, since that is what Java is mostly used for. Thus, I called it "sysadmin stuff" since the code is not affected by it, nor could code in any language magically avoid deployment and system maintenance. I have deployed Java GUI apps, and believe me I spent plenty of time on the installer.

  61. Re:Java: I love it, but... by FatherOfONe · · Score: 1

    Thanks for the input and you are correct about NIO, and the 3D API's. The Java NIO API's are relatively new and from what I have read, have improved a lot. Now as for the JAVA 3D API's... I believe that does require OpenGL to be installed. So your friend is using an API that requires another API to be installed. That in and of itself sounds dangerous. Yes it should work, but heck how many times have you needed to load a newer video driver on your Windows box just to play the latest OpenGL game. Companies like ATI don't support OpenGL near as well as say Nvidia, so that also could be some issues. His problem may have nothing to do with the JAVA API's so much as video driver issues. Then again the Java 3D packages could suck, I honestly don't know. I will say that I envy your friend, he is getting to code some cool stuff.

    Again thanks for the input, but I still stand by my point that 99.999% of standard business applications will work great with not mofications to the code.

    Lastly thanks again....
    I have a new skunkworks project that needs to use JAVA's NIO package and needs to run on Linux/Solaris/Windows, so I will proceed with caution :-)

    --
    The more I learn about science, the more my faith in God increases.
  62. Re:Java: I love it, but... by TheLastUser · · Score: 1

    Too true, I used to develop a web app and used Solaris/sparc with Sun's JDK 1.3.1 for my dev server and then deployed on Linux/intel with IBM's JDK 1.3.1. Never had a problem.

    The GUI issues seem to be limited to areas where you bunt up against a platform limitation. Like using second/third mouse buttons on a mac, or failing to use the File class properly. They are usually self inflicted. The only real issue I ever had was with drag and drop flakyness under win32.

    I assume this thread will attract the usual C++ trolls. "Java's not a real language, blah, blah, blah"

  63. YMMV by KenSeymour · · Score: 1

    For me, I'll never miss copying and pasting between two files by doing:

    ma to mark the start of the block
    j as many times as it took to get to the end of the block, counting in my head as I go
    'a to return to the top of the block :.,+6w /tmp/ken1

    Then in another window, or after exiting and running vi on the second file.

    move to where you want the block of code :r /tmp/ken1

    That is so much faster than Copy, Paste.

    I used vi for years. Then I leared emacs and enjoyed the directory navigation and being able to have lots of files open.
    JDEE is not to bad for java in emacs.

    But after starting to use Eclipse, I hardly ever write code in emacs and never in vi.

    YMMV

    --
    "We can't solve problems by using the same kind of thinking we used when we created them." -- Albert Einstein
    1. Re:YMMV by metamatic · · Score: 1
      j as many times as it took to get to the end of the block, counting in my head as I go

      Yes, well, no editor is productive if you don't know how to use it.
      And vim has directory navigation and the ability to have lots of files open, and since we're talking about Linux here, vi is almost certainly actually vim.
      --
      GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
  64. Re:Run everywere, my ass. by FatherOfONe · · Score: 1

    I agree with what you say, in that if I launch a calculator program and one takes 100k and the other takes 15MB or RAM then that "can" be an issue. However the difference in bigger applications is not that huge. The amount of RAM needed by the JVM is somewhat static, so the larger the program the less of the difference between it and native code.

    I think what you are really saying is that you don't want some piece of crap C program thats big and bloated nor do you want a JAVA program that is big and bloated. In that we agree. The difference in RAM requirements between a DVD burner or MP3 player written in any language shouldn't be that large, and won't be if written by good developers of JAVA or C or C++. The difference is that the one written in JAVA will be easily portable between different systems. The one in C or C++ will probably only be made available on Microsoft Windows.

    --
    The more I learn about science, the more my faith in God increases.
  65. Re:Java: I love it, but... by Raul+Acevedo · · Score: 1

    WebLogic provides several platform-specific libraries with native language calls for performance (one example is socket and file access). In addition, our particular application uses several platform specific third party libraries, both pure Java and native code. For a while I had to hunt Linux versions of these libraries, but nowadays our vendor partners are pretty good about already having Linux libs.

    --
    In a real emergency, we would have all fled in terror, and you would not have been notified.
  66. Re:I'd rather have... by koehn · · Score: 1

    You're missing the point. If you write once, compile everywhere then you've got another pile of issues to deal with: Is the bug in the compiler? an #include? byte ordering? some library?

    There are a huge bevy of tools for dealing with this for C. Other compiled languages have similar problems. With Java all of that goes away: you know whatever problem crops up, it's definitely not the build, because you did that once, at your location, and gave everybody the same binary.

  67. Duh, its still Java by Ars-Fartsica · · Score: 1

    I did not say you were required to use GCJ, just limit yourself to the subset of Java lang and libs that can be *compiled* by gcj. Last time I checked and recent Sun javac/java combo should be able to handle this....but when they do something you really don't like, you know you can fall back on a free option for compiling (note that *any* recent Sun JVM will still be able to run the code!)

  68. Re:Run everywere, my ass. by FatherOfONe · · Score: 1

    How do you know and why do you care? If the application would do what you want and meets your needs then who cares what it was written in?

    Unless you just hate JAVA for some reason and will never run any program written in it. I know some Microsoft people just like you then. They will NEVER run anything that is not developed by Microsoft unless they absolutely have to, and then they just count the days until Redmond releases a "similar" version.

    There are some cool JAVA programs out there, that are nice to use because when you want to switch off of an underpowered overpriced laptop to say a "better" platform then you can still run all the exact same code :-)

    NOTE: I am writing this on an Alienware laptop :-)

    --
    The more I learn about science, the more my faith in God increases.
  69. Re:Run everywere, my ass. by Taladar · · Score: 1

    He is probably like me and hates bloat (other people call it 'eye candy') or just does not use an external mouse and prefers keyboard input. GUIs tend to lose much of their efficiency without a fast, precise mouse (I could argue that there isn't much efficiency to begin with but that is besides the point here).

  70. Like Windows? by tepples · · Score: 1

    Commercial quality is "High enough quality that someone would you pay for that and won't be pissed."

    Does that describe the Windows XP operating system, a competitor to GNU/Linux that is proprietary and commercial but nowhere near high enough quality out of the box or even as patched?

    1. Re:Like Windows? by Derkec · · Score: 1

      Patched, XP is easy enough for my Mom to use and I don't have to go over and administer it more than once a year and 2-3 times over the phone. Windows is fine. It also does a fine job on my development laptop. Are there places I'd rather run Linux? Sure. Do I think Windows is overpriced? Sure. Is it a real product that can be legitamately sold for money? You bet. I would also argue that Linux is commercial quality.

      An old project of mine: http://onebook.sourceforge.net/ is not. It does some cool things, is a great idea and could be made into a commercial product, but at this point it's really more of a toy or experiment.

  71. Re:Java: I love it, but... by alan_dershowitz · · Score: 2

    I agree 100%. I can't stand whiners who claim that Java portability is a myth. The exceptions are trivial and few. It is my opinion that such complainers are either not Java programmers, or whose only interest in Java is finding such examples to trash on it.

  72. Re:Java: I love it, but... by jrumney · · Score: 1
    Maybe if you're talking GUI code (desktop/applet)

    I've never seen any issues with GUI code, unless you mean that it doesn't have a native look-and-feel (but then, neither do a lot of recent Windows programs, Microsoft ones included).

    The only platform issues I've seen are former VB programmers hard-coding paths with backslashes in them, and OS/390 defaulting to EBDIC encoding for reading files (which had been deployed with the application and were actually in ASCII).

  73. Why not by TheLastUser · · Score: 1

    A better way to copy paste between files in vim might be:

    yap
    :new otherFile.java
    (position cursor)
    p
    :wq

    or in an ide:
    drag a box over the paragraph
    control-C
    find other file in an enormous list of code files.
    double click to open
    position cursor with mouse and scroll bar
    control-V
    mouse to file dropdown, click (save)
    click on little x to close file.

  74. kaffe by ChristTrekker · · Score: 2, Insightful

    The worst thing about Java, supposedly a "write once run anywhere" language, is that you can't run anywhere. You can only run on platforms that Sun has ported a JRE to. This is why projects like Kaffe are so important. With an open-source implementation of the Java specs, you never have to worry about unsupported platforms or Sun yanking the rug out from under you.

    1. Re:kaffe by aled · · Score: 1

      Sun doesn't do all the ports. For OSX is Apple who does, probably licencing from Sun, the same for AS/400 and other IBM's big irons is IBM who does the work. And so for other platforms, Sun doesn't port for every cellphone just for the like of it. It's the cellphone maker who does the port to give theirs user more functionality.

      --

      "I think this line is mostly filler"
    2. Re:kaffe by nietsch · · Score: 1
      The ONLY reason the OS zealots want Sun to release the JLS into their greasy little fingers is so they can destroy WORA by creating a million forks of the core language and call them all Java.


      Nonsense. How many forks of the linux kernel are you aware of? Branding things with some name can be protected with trademarks, that is what they are for. If somebody still forks (and puts a lot of effort in it), that is just an indication the direction/leadership of -in casu- SUN was not good enough. Better leadership would have secured that investment into their codebase.

      I guess Sun's directors consider themselves not good enough?
      --
      This space is intentionally staring blankly at you
  75. Only on slashdot.... by Man+in+Spandex · · Score: 1

    Only in slashdot could a person read the following statement:

    Anal sex works of both genders but you don't like anal sex at all.

  76. Re:The IDE Issue... A story.. by Lysol · · Score: 1

    So I have a friend who worked for Big App Server company a few years back, when J2EE was just startin to break big.

    He went in for his first day - he was doing tech support - a guy comes up to him and says "dude, here's your first case, I sent it to your email". So my friend opens the email, downloads the file to the drive root and then proceeds to drive the mouse 'till he finds Visual Cafe. Needless to say he can't find it and the guy is looking at hime thinkin 'what the hell?!' and tells my friend "dude, what are you doin? Move over."
    He kicks my friend out of the chair, opens up a cmd (yes, it's Windows) window and types:

    emacs filename.java

    he gives it back to my friend and my friend kinda stares for a sec and says "what's that?"

    "Emacs. And it's what we use here."

    Then the guy walks away. My friend called me up that night and said that was the hardest working day of his life.

    I think there's a certain art in editors that don't have a lot of icons and menus. So for me, it's always been about emacs. I also know just enough vi to get me by on whatever *nix machine I run across.

    Never use IDEs but a lot of people love them. Sorta like favorite ice cream flavor. Would I use Eclipse/NetBeans if I had to on a job - sure, but I wouldn't necessairly enjoy it (that's happened a few times).

    I think it's easier for developers to go from text -> gui development vs. the other way around. My friend was the perfect example and I've found that while on client sites, when I got to use Emacs, people would fumble quite a bit at my desk. But when I went to theirs, there usually weren't any issues.

    Plus, while I'm all for machine intelligence, there's just something about knowing all the pieces of your code and putting them there yourself. Yah, it takes longer, but when in a bind, I've seen a lot more IDE/code-completers fumbling around with errors or whatnot vs. their emacs/vi/shell countrerparts.

    Just my experience, yours may vary..

  77. Re:I still fail to see .. by mark-t · · Score: 2, Informative
    Actually, distributing java byte code isn't at all the same thing as source.

    Although you can decompile java byte code with some degree of success, obfuscators exist which can be applied to the byte-code before you distribute it to make decompiling nothing but a waste of time as the code is irrevocably incomprehensible (and some byte-code obfuscators mess things up so bad that the decompiled code won't even compile at all!) Use of such obfuscators is not bad programming practice in the same way that obfuscating source code is because you are still working from clean source. In this sense, java byte-code obfuscators have more in common with the unix utility 'strip', than the conventional notion of an obfuscator. You can set things up in your build.xml or makefile so that the obfuscator can automatically be run on each class file as it's generated, whenever you specify a target intended for distribution.

  78. ctrl-z by zipwow · · Score: 1

    In vi (and most shell apps) control-z returns you to the shell, and suspends the application you were running. This leaves you free to run other applications, like perhaps:

    ant devbuild

    watching them complete, then returning to your suspended ap with:

    fg 1

    -Zipwow

    --
    I don't know which is more depressing, that 2/3 didn't care enough to vote, or that 1/2 of those that did are crazy.
  79. Re:Run everywere, my ass. by Chemicalscum · · Score: 1

    IBM has to provide a JDK for Linux on Power now that they are selling Power servers with Linux. How else can they sell Websphere for it.

  80. Re:Java: I love it, but... by naden · · Score: 1

    Sure, you have to test on all the platforms that you support. But, what language/runtime requires less x-platform testing than Java? Today, the real issue is testing on each J2EE app server. That's where the real issues are. I haven't seen a pure Java platform issue in years.

    Apple WebObjects. Powers the iTunes Music Store and Apple Store. Is highly scalable, has great O/R persistence technology and yes, is pure Java.

    --
    Funtage Factor: Purple
  81. Re:Java: I love it, but... by Dogtanian · · Score: 1

    That is exactly where they initially promoted it, but AWT performance was terrible and few had the broadband to download the jars in a reasonable time.

    Bingo! How old is this guy? From Java's launch in the mid-90s, the selling point was as a client-side Internet language that you could use through your browser.

    *That* was the hype; applets, applets, applets!

    I guess we could blame Microsoft for attempting to foul things up, but the truth is that for 99% of the things Java was initially promoted for, JavaScript was faster (loading) and hence better.

    As for AWT performance; Swing on top of *that* was painful on my 233MHz PC. Reminded me of my 68000-based Amiga 500.

    --
    "Slashdot - News and Chat Sites Deviant". (Click "homepage" link above for details).
  82. Re:I still fail to see .. by owlstead · · Score: 2, Interesting

    Any program you write completely from scratch with C++ could be compiled for any platform. But if you use a third party API in C++ chances are it is not available to you in source, so you are stuck.

    Close, but no cigar. If there are enough binaries for the different platforms, you might not need the code. The bigger problem is that people tend to stack libraries - e.g. on the Windows libraries. That will really get you stuck.

    The thing about java is that everyone is forced to distribute "source", or more specifically, bytecode, which amounts to the same thing for cross-system compatibility purposes.

    Byte-code is far from source. Though many names (public class names, method & field names) are preserved, none of the code within methods, as well as parameter names will be preserved. Please stick to the Virtual Machine paradigm instead - it pretty much explains itself.

    Can you make non-portable "libraries" in Java? Yes.

    Well, only if you move outside the Virtual Machine (JNI/exec() calls from the VM), since the default API is available on any supported platform. So that's pretty difficult indeed.

    We are probably in the same mind on this issue, but it seems that your explanation is more confusing than it needs to be.

  83. Re:Java: I love it, but... by ray-auch · · Score: 1

    Sorry but that is just not true. Example:

    With one 1.4.2 point release (not even a minor version), all our applets suddenly became unable to load images. It looked like they changed the rules - previously you could access files beneath the codebase when running locally (ie. without web server), now it gave security violation.

    In fact, it turned out that they didn't change the applet security rules, they just required code to be wrapped in a privileged block where it didn't need to be before. The new code won't work on old (eg. MS) VMs either, so now you need JVM version detection etc.

    The code was standard image loading stuff (originally used Sun examples IIRC), worked fine from 1.1 through to 1.4.2, then broke completely from 1.4.2_04 (I think) onwards.

  84. Re:Java: I love it, but... by BigGerman · · Score: 1

    Java app can have a perfect "native" look too.
    For example, this is the product (sharing and sync application) my friend and I developed:
    Windows screenshot
    Linux screenshot
    or, if you have Java, just Web Start it here - another great Java feature.

  85. Re:Java: I love it, but... by pivo · · Score: 1

    What I mean by, "I haven't seen a pure Java platform issue in years" was that I haven't seen a cross platform issue with the Java language or runtime in years. I've seen plenty of pure Java platform (J2EE servers) which had problems running supposedly portable J2EE applications.

  86. Re:Java: I love it, but... by abborren · · Score: 1

    both ways are ugly

    --
    ><////>
  87. Re:Java: I love it, but... by mabinogi · · Score: 1

    oh well, I don't do applets or GUI stuff, maybe I should have included that as a disclaimer in my post ;)

    --
    Advanced users are users too!
  88. Re:What's even more freaky by Kurrelgyre · · Score: 1

    The formatter is *very* customizable. If the indentation is messed up from you viewpoint, odds are that you typed it in that way.

  89. Eclipse is toast... by nazzdeq · · Score: 1

    ...went to the web site and tried to download... So much for java. Warning: Too many connections in /home/eclipse-php-classes/system/dbconnection.clas s.php on line 27 Warning: MySQL Connection Failed: Too many connections in /home/eclipse-php-classes/system/dbconnection.clas s.php on line 27 Unable to connect to the database server at this time.

  90. Re:I still fail to see .. by nazzdeq · · Score: 1

    Yeah, show me a website powered by Java and I'll show you one slow ass website. No big websites use Java. Yahoo, MSN, Google, Dell, eBay, CNN. Imagine Google trying to use Java....lol. -Nazz

  91. EBay and Google DO use Java! by Anonymous Coward · · Score: 1, Interesting

    Yeah, show me a website powered by Java and I'll show you one slow ass website. No big websites use Java. Yahoo, MSN, Google, Dell, eBay, CNN. Imagine Google trying to use Java....lol. -Nazz


    You have clearly been misinformed:

    eBay uses Java:
    http://www.sun.com/service/about/success/re cent/eb ay_5.html
    They actually dumped .NET in favour of Java

    Google uses Java:
    http://www.ccombs.net/weblog/2004/08/28/109 3666433 000.html
    They were even part of the JCP (Java Community Process):
    http://eyeonit.itmanagersjournal.com/ar ticle.pl?si d=04/11/19/1618217&tid=105

    Yahoo uses Java for their sitebuilder and chat, among other things. Don't know what they use for the main site but it wouldn't surprise me if Java was in the mix somewhere.

    MSN:
    Gimme a break!

    CNN does use java in a limited way:
    http://sportsillustrated.cnn.com/java/

    If you still think Java is slow pay a visit to EBay and check out the number of transactions they process in one hour.

  92. Re:"Commercial quality"? by LarsWestergren · · Score: 3, Informative

    Chapter 1: Confusing the user.

    That is the fault of the programmer, not the language.

    Chapter 2: Meanlingless error messages

    The application programmer decides the error messages. Uncaught exceptions might show to the end user, but if you don't understand these, show me a language with clearer error messages? "ArrayIndexOutOfBoundsException? FileNotFoundException? MidiUnavailableException? What does this mean, I do not understand any of this. Owie my brain hurts...."

    Oh, and it is spelled "meaningless". HTH.

    Chapter 3: Remaining slow no matter how fast the hardware is.
    Chapter 4: Losing data.

    And finally:

    Chapter 5: How to create the blue screen of death.


    Hmm...seems I just responded to a troll.

    --

    Being bitter is drinking poison and hoping someone else will die

  93. Re:"Commercial quality"? by LarsWestergren · · Score: 1

    Ahh, I see. My apologies.

    --

    Being bitter is drinking poison and hoping someone else will die

  94. Re:Applets and Servlets by oglueck · · Score: 1

    Servlets usually are little. They are only an adapter between HTTP and your application logic. So they are hardly ever longer than a few screens.

  95. Re:Java: I love it, but... by leomekenkamp · · Score: 1

    Please do not use forward or backward slashes; use java.io.File.separator in string concatenations or use new java.io.File(File parent, String child).getAbsoluteFile() (or .getAbsolutePath()) for 'path additions'.

    --
    Wenn ist das Nunstueck git und Slotermeyer? Ja! Beiherhund das Oder die Flipperwaldt gersput.
  96. Re:Java: I love it, but... by cerberusss · · Score: 2, Insightful
    Java's motto shouldn't be "Write once run anywhere" - it should be "Write once, test everywhere

    And for example C++, it should be "write once, port anywhere and then test anywhere"? At least with Java, you can skip one step.

    --
    8 of 13 people found this answer helpful. Did you?
  97. Re:Java has it's place but there are better soluti by Decaff · · Score: 1

    that is as OO as Java but creates native applications.

    This is completely losing one of the most important aspects of Java - the ability to choose the platform on which you deploy code after compilation. For example if I make a J2EE application, I can open a web interface to Tomcat, and deploy the application. I don't know or care what operating system Tomcat is running on. Why should I have to? Why should it be up to me to maintain compiled binaries for each operating system?

  98. Re:Run everywere, my ass. by FatherOfONe · · Score: 1

    1. Almost any program can be slow or fast depending on the coder. I suggest you take a look at some of the more modern Java programs and JVMs.

    2. Define insane. OpenOffice takes a ton more memory than say vi. Then again they do different things. Java can take more memory, however as I posted before, if the program is bigger than say a simple calculaor program that difference isn't huge.

    3. The look and feel can be set for all the major platforms. You will NOT be able the difference of a JAVA app (by look and feel) when done well for Windows or the Macintosh. Now Linux.... you have to be kidding me right???? I have apps written in plane old X, GNOME, and KDE running on my system. None look or feel the same.

    4. The JVM can be larger than 15MB. Yes this ONE TIME DOWNLOAD can be an issue. We agree that this can be an issue. Now I find it interesting that most people like you who bitch about this won't complain one bit about downloading a 600-2000MB file to play say a Doom3 demo. So I again say that if you want a cool office program and it is 600MB, but 50MB of it is a JVM then that isn't that big of a deal.

    My last comment on this... As far as speed and size in RAM goes - Your same arguments use to be made by people about C code vs machine code or assembler code. A program that was in assembler would be 50 to 100 bytes in size while a C program would be an enourmous 5k. I remember having a discussion with one of our coders much like you and I are having now 20 years ago. His comment was "This freaking C code is crap! It takes 5k to do what I can do in 54 bites! What a slow bloated piece of crap language it is."

    My how times have changed, yet the arguments try and stay the same :-) 15MB is almost considered a joke now, and will be in a few more years.

    --
    The more I learn about science, the more my faith in God increases.
  99. Re:linux powerbook by clard11 · · Score: 1

    See http://www-106.ibm.com/developerworks/java/jdk/lin ux/tested.html for a list of supported distros and architectures for the IBM JDKs. You'll see that IBM supports Linux on PPC both 32 and 64 bit.

    --
    catch (ModDownException mde) {post.modUp("Interesting")}
  100. Re:Java: I love it, but... by Tupper · · Score: 1
    I can't remember the last time I had issues with code because I changed platform, OS, or even JVM version. It's to the point where I don't think about it anymore.

    Lucky you. jdk1.4 bit our back end app in two ways I remember. First, the "assert" keyword broke our build. No big deal, but a pain. Second and much worse, classes in the default classpath became unusable. This made a third party piece unusable. Granted, the third party's code was in poor taste, but it 1) was just like Sun's examples 2) worked and 3) was (arguably) compliant with the spec.

    Sun broke their working code. We lost functionallity because of this.

    Nevermind the times the JDBC guys break their interfaces. They have even changed return types! You can't write code that implements the interface in both versions. Thanks guys, you should win an award for most fsck'ed.

    Different OSs, no problem. Different versions of the JDK, watch out.

  101. Write once, run everywhere is called GCJ by green+menace · · Score: 1

    gcj (gcc java compiler)
    SWT - Standard Widget Toolkit ( either from eclipse.org or libswt)

    Same difference, write in Java once, compile for each architecture with the appropriate SWT library. Compiles to native. (Azureus is an example that pops into my head.) If you like the other features of Java, but don't like the JRE and having your users have to setup java to install your program, this is a great solution. Java still may have its limitations, but write once run everywhere natively is not one of them.

    All of my classes are taught in Java, so granted I don't have in depth knowledge in C++, but it seems that most things can be accomplished with most languages. In other words, the real limits of most programming languages are less than the perceived limits. I will admit that I would like to learn C/C++ better for system programming.

    1. Re:Write once, run everywhere is called GCJ by green+menace · · Score: 1

      compile for each architecture with the appropriate SWT library

      I mispoke, I meant compile for windowing system (gtk, motif, or windows).

  102. APT by sadiklis · · Score: 1

    I wonder how Java's apt will mesh with Debian's one.

  103. Because after all... by game+kid · · Score: 1

    In Soviet Russia, lamerisms beat you!

    --
    You can hold down the "B" button for continuous firing.
  104. "I love fucking my girlfriend in the ass..." by game+kid · · Score: 1

    For some reason, I hope she didn't see that.

    --
    You can hold down the "B" button for continuous firing.
  105. Re:Java: I love it, but... by photon317 · · Score: 1

    I was there, thank you very much. But this server-side push with Java is still silly IMHO. More effort should have been put into making it the most viable client-side language, which it never became. Why on earth would anyone run their server-side inside a VM? The server side is the platform you control, the one where you can choose a single platform and don't have to worry so much about portability...

    I still blows my mind that Java has come as far as it has to date on the server side, and equally blows my mind that it didn't make better inroads as a platform for thin client GUIs.

    --
    11*43+456^2