Tuesday, October 2, 2012

Very Busy Writing Java Swing Again

I managed to get the Java RMI sample working.  I am still trying to figure out why I can't start the server side from MyEclipse, but I can start the server from the command shell, and the client from MyEclipse.  Oddly enough, MyEclipse lets me set breakpoints in both the client and server code, and have it stop in both, even though the server is starting elsewhere.  I haven't spent anytime trying to understand while the breakpoints in the server are working; perhaps I should.

At this point, I have been coding Java Swing for the first time in many years, trying to create something elegant to produce the client-side facilities that are currently being handled very inelegantly by a really ugly combination of a browser, JSP, Struts, jQuery and a partridge in a pear tree.  I have forgotten how much more pleasant it is to write this stuff in a real language instead of this platypus of programming.

UPDATE: It turns out that I just needed to move the server and the client into separate Java projects.  The arguments, environment variables, etc. are associated with the project, so the settings that work for the server aren't going to work for the client.  Once I separated them, everything works as it should--and I am getting pretty ga-ga over this prospect! 

Unfortunately, the desktop that I use at work is suffering some sort of odd behavior that causes it to reboot about five minutes after I login.  I suspect some piece of malware is involved.  It's not hardware; our operations crew imaged the contents of my hard disk on to a different and much faster desktop, and the behavior is unchanged.  The failure shows up as blue screen with a complaint about a memory pool.  (Can't remember it off the top of my head, but our operations crew had no idea what it meant.)

1 comment:

karrde said...

RE: Eclipse and processes.

Eclipse has plug-ins which can connect to the Server. Likely only usable if the server is running in a Development mode that exposes hooks for debugging.

But there's probably a script/environment option that Eclipse doesn't have set right. Or a permission level that your shell instance has, but Eclipse doesn't have/keep. Either one will keep Eclipse from starting the server instance properly.

(I know, *nix permissions can get complicated. So can embedded scripts triggered from inside a running app. Don't know if you want to figure it out now, or live with the workaround.)

The big thing to worry about is whether the server instance behaves the same on your debugger as it does on the real server...but getting a smooth start up process for the test environment can make development much easier.