Stephen Murphy

Greenhorn
+ Follow
since Feb 26, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Stephen Murphy

Thanks for the reply. Turns out that argArray was null. It was the very last thing I checked. Apparently I screwed up the loop that build the argArray and it was just filling up with nulls.

Thanks for the reply.
17 years ago
Also, the API for the method class says that a NullPointerException is thrown if the object in the first argument is null. I have tested for this, and it is not null.
17 years ago
I am having a problem with reflection. I keep getting a NullPointerException and can't figure out why.
It is happening when I call this:


I can't figure out what the problem is. I had this reflection working, and then I made some changes to how the argument array was created. In the end, the argarray is the same.
Any ideas?
17 years ago
That was so amazingly obvious. Don't know how I missed a method that adds a collection.

Thanks.
18 years ago
Is there a way to append one vector to the end of another? I was hoping there was a method already in java to do this. Otherwise I'll have to write one myself.

Thanks,
Stephen
18 years ago
Thanks for the reply.
I have figured out my problem, and now have a new one.


When i get to the Class.forName() call, I get a class not found exception even though the class I am looking for exists and is in the same package.
Any idea why this would happen?

Thanks,
Stephen
18 years ago
Hello
I am learning to use reflection for the first time, and I am having some trouble understanding hte concept. What I need to do for the project I am working on, is take information about a class(name, method name, params) from an XML file, and the reflect the proper method. I understand how to instantiate a class, but it just gets fuzzy from there. THis is what I have so far:



componentName and the result of getComponentMethod() are both strings. getParams() returns an array of 2 strings.

The params may be anything though when I parse the XML file. Any number of parameters of any type in any order.

Thank you for your help.
18 years ago
Hello

I am trying to implement a application using the SAX Parser. I can do this just fine if the XML input is a file. Is there a way to do this passing that function a XML-formatted string?

If that doesn't make sense, I can try to explain better.

Thanks,
Stephen
18 years ago
Can anyone point me in the direction of good articles about GUI design and\or Java Swing? I am supposed to be reading an article a week for a class and am having trouble finding articles that are useful.

Thanks,
PM
18 years ago
I am creating a GUI for a bioinformatics application. I need to be able to allow the user to login\logout of the application. Is it necessary to use JAAS to keep the program secure, or should I just use JPassword field to build a login component? Anyone have advice on this?
18 years ago
I am designing a GUI for a project at my college. I have been told to look at security issues. As the project is not web-based, I don't really know what security issues there would be. The GUI will interface with databases using JDBC, so maybe that's where security will come into play. Advice anyone?
18 years ago
I am about to start a big project for my college senior exit. I am designing and implementing a GUI interface. I have been told that unless I can convice my sponsor to upgrade, I need to use 1.4. Is there anywhere that I can find a comparison of the pro's\con's of the two? If anyone can point me towards some resources, I would be grateful.

Thanks.
18 years ago
Thanks, I actually did exactly what you suggested: Math.pow() and check out which index was 0, just about 15 mins before I read your post. Great minds think alike I guess. Thanks for the help. Now I gotta figure out how to do the reverse.

Thanks again.
19 years ago

Originally posted by Kym Thompson:

Or are you just unsure how to turn a non-digit character into a numeric value?



I think that is my problem. I can convert base 8, 2, etc. but the ones that start using chars instead of digits confuse me in java. I was hopeing there was some type of inherent method in java for dealing with this.

It has been suggested that I could just use the int value of a char (corresponds to it's ASCII value) and the multiply that by 128 ^ (position in the string)




I was hopeing that would work if I enclosed it in a loop and accumulated the values received, but I'm not sure that it's what I'm looking for. I can't get it to work.

Stephen
19 years ago
I am looking for an algorithm to convert a base 128 number into a base 10 number.

Example:
Learn from the mista

should become
836223910068639560092299063760172789594721

I am having a hard time coming up with a conversion algorithm, b\c of the ASCII characters subbed in for digits after a point in base 128. I would appreciate any help you can give me.
Stephen
19 years ago