Michael Szul

Ranch Hand
+ Follow
since Sep 18, 2001
Merit badge: grant badges
For More
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 Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Michael Szul

Everybody is bringing up interesting points, but I'm still not coming across the answer I'd hope for.
What I need is somebody to explain to me briefy the memory allocation of a PropertyResourceBundle.
It seems to be a Collection of String objects, which would mean that a file with 110 key / value pairs would create an object containing 110 String objects, when the PropertyResourceBundle is initialized.
To me this seems less efficient than a simple string when we talk in concepts of my original example.
Does anyone know the answer?
21 years ago
We do use some stored procedures, but that's not the issue. I was just giving a general example. We select from other things as well, using our own defined classes (which extend HashMap, etc).
I'm just interested in the comparison of speed and memory between the use of property files in this way as opposed to a simple string.

21 years ago
My company is developing a Java Servlet based program. I came in about halfway through the initial bare-bones development, so some things were already in place.
I'm a little at odds with my technical lead over the issue of property files.
She doesn't want me to hardcode SQL Select statements in my code (exp: String query = "SELECT * FROM WHATEVER_FILE").
Instead she wants me to write the statement in an external properties file and do this:
PropertyResourceBundle prp = (PropertyResourceBundle) PropertyResourceBundle.getBundle("resources.whatever");
String query = prp.getString("WHATEVER_STATMENT");
I am under the impression that a PropertyResourceBundle creates a collection of Strings. Our properties file has over 110 key / value pairs.
Am I right in thinking that using a property file in this manner is creating a large chunk of objects that are memory-intensive, and it would be more efficient to just use a String in the code?
... and in actuality the properties file isn't even used in a dynamic manner. It's just her way of keeping all the select statements in one place.
21 years ago
And I must say that it was the hardest exam I have ever had to take in my life (and I went through several Advanced Placement classes in High School that gave college credits).
I expected to fail after the first ten questions, and was severly frustrated after half of the exam; however, the second half of the exam seemed to be easier and contained a lot of the information that I was familiar with.
There are a decent amount of IO questions on the exam, and this was something that I was weak in; however, the questions for this section are more or less common sense if you have a mediocre understanding of the subject.
I used Sybex's Complete Java 2 Certification Study Guide, and I must say that it was a great book to use and had a lot of questions, but don't expect the exam to be similar when it comes to wording or question construction. The exam deals much more with code examples and having you determine what's wrong, then with language theory.
I'm just glad I got through it. I had to dance circles around my car when I saw the score
22 years ago
I just passed the Java 2 Programmer Certification on Friday. I used Sybex's Complete Java 2 Certification Study Guide (which covers programmer and developer).
I was wondering if there are any good books out there to help study for the Web Component Certification.
Are there any study guides for the certification, or do you basically have to pull on your own knowledge and field experience?
thank you,
The JavaHelp API uses url base hyperlinks, I believe. The only difference is that they point to the local file system instead of the internet.
Your best bet would be to construct a url using getClass().getResource("your_file.html").
22 years ago
If there is a connection, I believe it is probably only minor.
22 years ago
The Web Start application would only download anything new if there were something new on the server.
In addition, this would only occur if you specified in the JNLP file to check for newer versions.
The last time I developed an applet, I'm pretty sure it had to be downloaded from the server every time you came to the page. I don't know if the API or technology has changed since then.
22 years ago
When you write a JNLP application, you make a few small changes to it, though nothing as dramatic as converting an application to an applet.
You then create a JNLP file that (assuming JNLP is registered in your browser) is linked to on an HTML page, and when clicked on, passes control to Web Start.
Web Start reads this file and finds out where to download the application and all other variables.
The application is a standalone application. Web Start is just used to distribute it and launch it.
As far as I know, the only striking similarities between an applet and a Web Start program is the sandbox rule when it comes to security.
22 years ago
You would just have to pass the value to the other program:
public class Demo {
String value = "";
public class Listener {
public void getThisText(String value) {
Is something like this what you are referring to? You post wasn't very specific.
This is just one of several ways that you can pass information back and forth between classes.
22 years ago
You could always extend JToolBar and override the addSeparator() method to display whatever you want it too.
22 years ago
I don't quite get what your trying to say.
As long as you have the Linux version of the SDK you can compile and run the Java like you normally would on the command line with javac and java.
Or for jar packages you would say java -jar *.jar as long as Main-Class is specified in the jar manifest.
22 years ago
Textpad works great on my machine at work (Win NT 4).
At home I actually use Forte on my Linux box, sure it eats up resources, but you can configure it so that it doesn't load every module. If you want the full effects of an ide, you'll have to go to one of these bulky ones.
Emacs is also a good choice for both windows and unix-based systems. You can get a whole lot of different plugins for it.
22 years ago
What do you mean by "menu-driven"?
If you're looking for open source projects, why don't you check out http://www.sourceforge.net and search for the type of Java program you are looking for.
For text editors, you can go to http://www.jext.org or http://www.jedit.org
22 years ago
Take a look at the Java Media Framework at http://java.sun.com/products/java-media/jmf/index.html
I don't thing it'll launch WinAmp or RealPlayer though. I think this is for creating your own solutions.
To launch other programs like that, I recommend following the example of the post before this one.
22 years ago