Deployment Options

I got a new idea for a computer program I want to write. First I need to walk the thing all the way through to completion. I need users to be able to run this program on their own machines. I am thinking about using Java for the coding, but want to ensure a smooth user experience.

To run the Java bytecode on their machines, the users will need the Java Runtime Environment. What if they do not have it on their machine? Or what if they have the wrong version? I need my software to work the very first time, and every time after that.

I did some research on the subject. I can package up my files as a jar. However this still requires the JRE to be installed. Or I could go the web way and use Java Web Start. That would require me to set up a web server to host the apps. Then they will get downloaded to the user machine. That might require too much infrastructure for me.

I could also distribute the program as an applet. Then the whole thing runs in the browser. This also requires some infrastructure. But it will just be a web page. I do not have a lot of experience with applets using Java. That is a consideration.

Finally there are some compilers that produce executables that run directly on the user's native machine. This is the next best thing to developing with a language like C++ and compiling a version for the target machine. I need to play with ohe of these programs that produces a stand alone Java executable before I make a final decision.

Back to Java

I have been spending time learning JavaScript over the past year or so. However now it is time to return to Java. Later this year I plan to take an advanced Java class in school. However for now I am writing some small utlities in Java.

I was surprised at how rusty I got. You need to use your skills to keep them current. I coded a simple switch statement. Being a good developer, I tried to use some constants in the labels of the switch statement. They did not work. Ooops. I forgot to make those constants "final".

There was something that surprised me a bit. I put together a switch statement that initialized a variable. I included a default label in the switch clause. So all paths through would get the variable initialized. However the compiler still gave me a warning that the variable might not be initialized.

It was a small thing. But I don't want any warnings in my code. So I had to blatantly initiallize my variable. Not so clean.

Java Micro Edition

Oracle seems to be standing behind Java Micro Edition (Java ME). The mobile market relies heavy on Java. It is good for developers too since Java lends itself to cross platform development.

There are three layers to Java ME: (1) configuration, (2) profile, and (3) packages. The configurations are further divided into two flavors. You have connected and connected limited configs. The difference is how powerful the target device is.

Java ME supports "over the air provisioning", or OTAP. This allows you to install Java apps over the wireless network. Java ME also provides things such as security, UIs, and offline support.

JavaScript Forms

I am working on development a web app game. It is being written in JavaScript. I had learned how to do forms, so I made the game use a form. The majority of the screen is a big select area. I was going crazy because my JavaScript code was generating errors. The browser kept complaining that document.forms[0].mySelect was either NULL or not an object.

This was troubling because I had coded successful projects that used this technique. Googling the web also showed many examples of this working. To get by I hacked some getElementById calls instead. It still troubled my. I was running Internet Explorer 8. This stuff should have been working.

Near the end of my game development cycle I had to add more items to the form such as a status message. That is when I found the root cause of the problem. The select element was not within the form tags in the HTML. Ouch. No wonder JavaScript could not access the select object. It was just not part of the form. Now I got an action item to go back and use the familiar technique to access the form data in JavaScript code.

Java Enterprise Edition is Dead

I am reading an opinion piece on Java EE. It states that that there were two winners for application servers. There was WebLogic which was best. And there was JBoss that was free. However web services and REST seemed to take away their steam.

Do you actually need an app server? Maybe you can just get by with plain old JDBC. Here is the killer stat which might prove Java EE is a dead end. Nobody implements Java EE 6. There is only open source GlassFish. Ouch.

Java is not dead. But Java Enterprise Edition may very well be. I am glad I did not spend too much time with Java EE.

Oracle Positioning Java for the Enterprise

I read a couple articles stating the Oracle is positioning Java for the enterprise market. Specifically they intend for it to be used mainly for enterprise middleware. Thus Java will be poised to run on the server side.

Oracle has the trademark to Java. They plan to use this influence to direct the future of Java. Their latest plans are in stark contrast to Sun Microsystems, who had a more broad perspective on the application of Java.

Personally I don't care what Oracle plans. Right now I am writing a program to run on my workstation (client). And it is being written in Java. The developers will truly shape how Java is going to be used. Don't worry where Oracle wants to take Java. They will come around.

Oracle in Charge

I needed to compile an applet I wrote a year or two ago. However I have this new laptop at home. No problem. I decided to download and install the latest Java Development Kit from Sun. Ooops. They are not Sun Microsystems any more. Oracle bought them out.

It was clearly evident from the new install program. The JDK install prominently displayed Oracle Corporation on the screen. They are the new master now. It remains to be seen whether this is a good thing or not. I do know one fact. Oracle is not going anywhere in the near future. They got profits from their databases and other offerings.

Maybe Oracle can take Java to the next level.