Java Application Development on Linux 428
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.
I'll be the first to quote Bash... (Score:5, Funny)
Re:I'll be the first to quote Bash... (Score:2, Funny)
Re:I'll be the first to quote Bash... (Score:2)
Re:I'll be the first to quote Bash... (Score:5, Insightful)
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.
Re:I'll be the first to quote Bash... (Score:2)
Re:I'll be the first to quote Bash... (Score:2, Informative)
Re:I'll be the first to quote Bash... (Score:2)
Only because you can install multiple virtual machine revisions in parallel. Actually, this is cheating, as it increases the maintainance overhead.
Working on a java app now (Score:5, Interesting)
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.
Re:Working on a java app now (Score:2)
Re:Working on a java app now (Score:3, 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 AP
I hope the book has a section on porting.... (Score:3, Interesting)
Re:I hope the book has a section on porting.... (Score:4, Informative)
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
Re:I hope the book has a section on porting.... (Score:3, Informative)
Re:I hope the book has a section on porting.... (Score:3, Interesting)
Re:I hope the book has a section on porting.... (Score:2)
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.
Eclipse? (Score:4, Insightful)
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
Re:Eclipse? (Score:4, Informative)
IN Java not WITH Java (Score:2)
The IDE Issue... (Score:5, Insightful)
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.
Re:The IDE Issue... (Score:2)
Yea.
/me puts on flame-resistant suit
You should use EMACS, of course !!!
Re:The IDE Issue... (Score:3, Interesting)
Re:The IDE Issue... (Score:5, Informative)
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
Re:The IDE Issue... (Score:2)
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
Re:The IDE Issue... (Score:2)
-Zipwow
YMMV (Score:2)
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
Then in another window, or after exiting and running vi on the second file.
move to where you want the block of code
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
Re:The IDE Issue... (Score:3, Insightful)
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 devel
Re:The IDE Issue... (Score:2)
Re:The IDE Issue... (Score:2)
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.
Re:The IDE Issue... (Score:2, Insightful)
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 ...
Re:The IDE Issue... (Score:2)
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
Re:The IDE Issue... (Score:2)
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, i
Re:The IDE Issue... (Score:2)
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 a
Re:The IDE Issue... (Score:3, Informative)
The Java trap (Score:2, Interesting)
Re:The Java trap (Score:4, Insightful)
Re:The Java trap (Score:2)
Posting links to anything remotely related on GNU.org is an easy way to get modded up.
Re:The Java trap (Score:2)
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 no
Re:The Java trap (Score:2)
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 proprie
Re:The Java trap (Score:2)
Sounds pretty wide-ranging (Score:5, Insightful)
* 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.
Commercial quality apps? (Score:3, Insightful)
Re:Commercial quality apps? (Score:2)
"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
Re:Commercial quality apps? (Score:2)
Switched to apollon and never looked back.
Stick to FREE Java for your own protection (Score:2, Troll)
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.
Re:Stick to FREE Java for your own protection (Score:2)
As far as I know, mingw should be able to compile windows binaries.
Apache Gump is the nightly status of OSS (Score:2)
Look at http://brutus.apache.org/gump/kaffe/ [apache.org]
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...
success largely depends on expertise (Score:3, Informative)
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.
Re:success largely depends on expertise (Score:2)
Best java gui tk for linux (Score:3, Insightful)
Java-Gnome binds gtk with java. Very nice.
Java -- the abusive relationship (Score:5, Funny)
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
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.
I wonder (Score:2)
Java and Linux (Score:4, Interesting)
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
Credit where credit is due. (Score:3, Insightful)
I've recently worked on a J2EE project with nearly 1 million lines of code -- they're all needed, really
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.
Mod parent up! (Score:2)
What about make and emacs? (Score:2, Interesting)
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 ma
Re:What about make and emacs? (Score:2, Informative)
Ever try Maven [apache.org]?
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.
Re:What about make and emacs? (Score:2)
-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 a
Re:What about make and emacs? (Score:2)
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 i
Re:What about make and emacs? (Score:2)
You could've used exec and ran javac, which allows you to specify any worldly command line argument you wish.
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.
Re:What about make and emacs? (Score:3, Insightful)
Same tools on both (Score:2)
Java on Linux Topics That Really Need Covering (Score:5, 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 [rimuhosting.com].
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 [rimuhosting.com]
Re:Java: I love it, but... (Score:5, Informative)
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.
Re:Java: I love it, but... (Score:2)
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
Re:Java: I love it, but... (Score:2)
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 environm
Re:Java: I love it, but... (Score:2)
Re:Java: I love it, but... (Score:5, Insightful)
Re:Java: I love it, but... (Score:2)
Re:Java: I love it, but... (Score:2)
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-tim
Re:Java: I love it, but... (Score:2)
Re:Java: I love it, but... (Score:2, Flamebait)
Re:Java: I love it, but... (Score:3, Interesting)
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 c
Re:Java: I love it, but... (Score:2)
Re:Java: I love it, but... (Score:2)
Re:Java: I love it, but... (Score:2)
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
Re:Java: I love it, but... (Score:4, Informative)
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.
Re:Java: I love it, but... (Score:2)
Re:Java: I love it, but... (Score:3)
Re:Java: I love it, but... (Score:2)
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, an
Re:Java: I love it, but... (Score:4, Insightful)
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...
Re:Java: I love it, but... (Score:3, Insightful)
And for example C++, it should be "write once, port anywhere and then test anywhere"? At least with Java, you can skip one step.
Re:Java: I love it, but... (Score:5, Informative)
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.
Re:I'd rather have... (Score:2)
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.
Re:I still fail to see .. (Score:3, Funny)
What's wrong with
Re:I still fail to see .. (Score:2)
Re:I still fail to see .. (Score:3, Insightful)
(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
Wow... that's just troll-tastic! (Score:2, Insightful)
I congratulate you on providing one of the best examples of trolling [wikipedia.org]I've seen in a while from a non-anonymous post. Let's see if you've covered the basics:
Congratualations... you're a winner!
All sarcasm aside, if you don't like Java and don't develop software in Java, then a book
Re:I still fail to see .. (Score:2)
As a troll though, congrats I guess.
Re:I still fail to see .. (Score:2)
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
Binary Programs are not always appropriate (Score:2, Insightful)
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 pro
It ain't just the compiler, Luke. (Score:2, Informative)
Java comes with portable GUI libs.
Re:I still fail to see .. (Score:3, Informative)
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 obfus
Re:I still fail to see .. (Score:3, Interesting)
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
Re:Write once, run everywhere is called GCC (Score:3, Interesting)
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.
Re:Write once, run everywhere is called GCC (Score:2)
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.
Re:Run everywere, my ass. (Score:3, Informative)
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
Re:Run everywere, my ass. (Score:3, Informative)
Re:Run everywere, my ass. (Score:2)
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 bloat
Re:So...? What's the big deal? (Score:2)
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 Li
Re:"Commercial quality"? (Score:4, Informative)
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.