Learning to hate Java


The project I'm working on has a java client that communicates with a JBOSS server. The client launches applications on the local host, communicates with them using XML and sends data from the applications back to the JBOSS server using JAX-RPC (via Axis, at the moment).  In order to manage those applications, the client needs to know things like process id, number of available processors, amount of memory available, type of network connection and so forth.

And Java doesn't provide any of that information.  So much for cross-platform goodness.  Not to mention yesterday's issue with using TCP half-close feature with the SAXParser.

Java is great if you're writing an application that uses a common UI and does lots of file or network I/O.  But if you need to make use of other basic OS services, especially those related to hardware information, you're screwed.  The only solution is to write jni, java native interface objects.  These are platform specific object modules that get loaded at run time by your Java application.  Sure, this solves the platform specific problem, except now you're build system has to be run on multiple systems in order to make sure you have an object module (.so for Unix, .dll for Windows, not sure for Mac) available for each platform you support. 

And that's exactly why you chose Java, right?  So you wouldn't have to do that, right?

Java sucks.

Nice OO language.  Doesn't solve the problem.  Might as well write native apps to begin with.