This week's book giveaway is in the XML and Related Technologies forum.
We're giving away four copies of Java XML & JSON and have Jeff Friesen on-line!
See this thread for details.
Win a copy of Java XML & JSON this week in the XML and Related Technologies forum!

Les Morgan

+ Follow
since Sep 29, 2015
Les likes ...
C++ Java MySQL Database Netbeans IDE Oracle Tomcat Server
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Les Morgan

I know first hand what you are saying there: we used to run Oracle 10i on twin SunFire boxes.  One box was production, 4x2.8GH CPU, the other development, 2x2.8GH CPU.  The licensing alone, for our 4 users since they only license by CPU, was astronomic--my boss made the comment: "That is more than my house costs."  And in 5 years of supported development on that platform, Oracle failed miserably to provide a solution for any of the "speed bumps" that came up.  After we moved into phase 2 we bought a huge quad core Intel based machine and licensed up with that Bellevue company--all for less than the cost of the worthless maintenance contract on the software each year.

Anyway, I can see retirement's light down the road now, so I think I might just be grumpy about all the paradigm shift going on in the Oracle Java world.

Tim Holloway wrote:Oracle had cemented its reputation as an Evil Empire long before they bought Sun/Java. Their business model comes from the mainframe world, where developers could be well-paid, a software product could cost $64,000 up front and $5000/month for support and nobody cared because it was all dwarfed by the million-dollar hardware expense of the mainframe. And when software vendors sold unique products and basically could hold IT managers hostage by simple vendor lock-in, but that was OK, because when you needed support, you didn't get a "please stay on the line. Your call is very important to us!" and an unintelligible monkey-with-a-script, you got an actual rep or even a team of them to show up on-site and fix things. And in Oracle's case, a lot of early revenue was from government contracts, where you can charge absurd amounts of money and only the taxpayer bats a eye.

And on top of that, Larry Ellison's biggest ambition all his life has to become richer than Bill Gates (or anyone else).

It was never a case of if Oracle would start to squeeze money out of their acquisitions, merely when and how. They didn't have a working model from Sun, or Sun wouldn't have ended up in a position to be bought by Oracle.

It had to be done carefully, though. Their spin of Red Hat Linux attracted no adoring mobs - most people preferred Red Hat itself unless they wanted an Oracle OS to run their Oracle databases. Their attempt to monetize Sun's OpenOffice was such a dismal failure that they ended up donating it to the Apache Foundation - too late, since the Oracle-independent Libre Office fork had already won over the open-source world. Likewise, probably more people run the MariaDB spinoff of MySQL than actually run MySQL itself.

The old idea of paying for software from a proprietary vendor is fading. Red Hat demonstrated that not only could you repackage free software and become a dominant technology vendor, you could even develop your own software and give it away too. And they don't have to send in license-enforcement stormtroopers like the BSA to do it.

It remains to be seen whether people will start migrating wholesale to open-source Java. Java is a very complex environment, and even after years of work, the open-source version has problems. But people are no longer impressed by heavy-handed tactics from hardware or software vendors. And they're not interested in paying large sums of money in an era when everything is supposed to be as cheap as possible. Especially when it's them that are among the things that aren't allowed to cost much.

1 week ago
You're looking at 4 separate JVM instances so what goes off in my mind instantly is Socket communication.

I am a develop it myself kind of guy, and that is what my employers look for too, so I'd program the client and server, and also the logic for the needed tasks.  I generalize it so I have an easier time reusing the product.
Just a curiosity:

1-What does everyone think of the 6mo and you get a new Java release that Oracle has scheduled?

2-On another side of things... Charging monthly for JDK use?

1 - Personally, I believe the Evil Empire based in Bellevue WA has basically become the design pattern for Oracle to follow with Java... Not a good thing in my opinion... So now, do you want Evil Empire #1 or Evil Empire #2 to shape your enterprise?

2 - I and many of you, I suspect, got into Java back in the day when LAMP was forthcoming and became the cry from the non MS camp to rally.  I just have to feel that no matter how small of charge, which adds up across your enterprise, it really flys in the face of a big part of what made Java development popular. I know I look at it now and say: We have product from Evil Empire 1 out of Bellevue and our development seats come with our present licensing for their product.  It is kind of difficult to push a Java based solution and continued effort when we are faced with an Evil Empire #2 charging for each install of the JDK across our enterprise. I am somewhat placated with the fact that I, my self, am not a big enough concern that I have to pay for my private Java development efforts.

Anyway, just been kicking this around in my head for a while and just wanted to see what other's views are.
1 week ago
I like the analogy!

I recently got carried away writing a SQL Script, about 600+ lines later I needed to debug it. It was all basically code that I had writen before.  Low and behold we had upgraded our version of SQL and our debugger didn't work. I was left with the task of manual debugging 600+ lines of SQL Script. I barely retained my sanity over the day and a half it took to debug.

7 months ago
Back in the day it was a Radio Shack Color Computer, the old gray case with the black square buttons for keys, it had an RF modulator on the output so you could plug it into your TV or you could bypass it and use a composite monitor. 16K (I piggy backed another 16 so mine had 32K) was the whopping amount of ram and it ran on MS DOS precursor and BASIC all ROM based. It was a 6809E CPU from Motorola running at 0.89 MHz.

I soon found that it was so mind numbingly slow that I took up assembler, and programmed in assembler and basic until I want off to college.

I derived 3 years of college in my spare time using that little machine, so when I got to college all I had to do was learn the names of most of the methods that I had derived at home in my spare time.
8 months ago
In general, Java is faster because of the JIT Compiler.
10 months ago

As already stated it is impossible to comment on your code when you do not include it.

Here is a general rule of thumb that I use when doing graphics:

Draw your background image to your graphics context, this clears your screen; then draw your objects into the graphics context, that makes it appear that your objects can float over your background; use double buffering to keep the flicker down.
11 months ago

Paul brings up a very valid point, but to answer your question:

Most programming problems are born out of 3 things: scope, visibility, and life. In order to use the methods and properties of an object, you have to get a reference to that object.  To get a reference to an object you have to have visibility of that object. To have visibility of an object it has to be in the scope you are coding.  In order for it, or a reference, to be in the scope you are coding, the object has to be live.

So basically, you get a reference to the object, then you can use any of its appropriately methods or properties that are appropriately visible to you.
11 months ago

There are 4 instances that I can think of where I use static:

1 -- Factories: I don't want to have to instantiate a factory just to use it.
2 -- Class Variables: they are like wormholes, they are the same throughout the universe. If you don't know what that means, then don't use them.
3 -- Interfaces: you can add static and default methods to an interface and not have to recompile the project--static and default are not the same thing.
4 -- constants: static final--they are what they are and you cannot change them anywhere.

There are probably more, but the very best thing I can say is: as a general rule of thumb, don't use them. So unless you know you really want them, what they do for the instance you want, and specifically what the side effects are in using them.
11 months ago
Could you give us a little more to go on? Are you looking to store in a DB or just "trick your admins"?
Using NetBeans it is very easy to make a JAR:

On the menu choose "Run" / "Clean and Build Project"

once it is done, the JAR can be found in the "dist" (distribution) folder of your project director.

1 year ago
the -cp option is a commandline option that can be used to set the classpath, path, that your OS uses to search for your Java support files.

I was surprised at your statement about google not having any references... so here is a google search parameter list that should get you tons of answers for your subject: "java classpath environment variable"

BTW: when I tried googling class path and java classpath -cp and all combinations thereof, I received many, many hits... more than I cared to follow.
1 year ago
I look at the code you posted and reviewed your question, the quandary that I am left with is: "This is not your code." The next thing that comes to mind is that it looks a lot like a homework problem from HS or an entry level comp sci class, either being the case, then I'll assume you are taking it to get a grade. The next quandary that comes to mind is: "How are you going to give me credit for your course for doing your homework?"

So... Do you have a specific question, other than, please do my homework for me, like: I don't understand what a binary tree does... tons of examples on google there, or how do I decide if it's a left node or right node--also tons of examples there on google.

If you have a specific question, please ask.  while this is not a homework service, there are many experienced programmers waiting to help you understand, but no do the work for you.

1 year ago
You have "before" and "after" that you can use it's very simple:

return myCalendar.before(newCalendar): // returns true if the date is before myCalendar;

return myClaendar.after(newCalendar); // returns true if new Calendar is after myCalendar;
1 year ago
I see, and a very good point indeed. I think then that I would randomly generate a point, and do an area search for the highest probability in that area, probably using the grid overlay idea on too of the area.

So lay the grid out, I like the 2X2, and take a random shot, then search say 2 or 3, or even a random number, grids in each direction from the random shot, and choose the highest probability in the area.
1 year ago