Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!

Paul Clapham

Sheriff
+ Follow
since Oct 14, 2005
Paul likes ...
Eclipse IDE Firefox Browser MySQL Database
Vancouver, Canada
Cows and Likes
Cows
Total received
47
In last 30 days
1
Total given
92
Likes
Total received
2338
Received in last 30 days
1
Total given
491
Given in last 30 days
2
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Paul Clapham

If your JSF project needs more memory, it probably isn't going to help to give Eclipse more memory. The two run in different JVM's. So I'd look into how to give JSF more memory when Eclipse runs it.
3 weeks ago
It's pretty hard to write Java code for that; the reason is that what you have there specifies what the output looks like but there's nothing which specifies what your input looks like. The Java code you want would convert your input into that output format, right?

Anyway let me just throw this out: that spec numbers the bits in a byte in such a way that bit 8 is the most significant bit and bit 1 is the least significant bit. But when Java programmers are talking about bit-fiddling, they usually say that the most significant bit is bit 0 and the least significant bit is bit 7. Now you might think this is trivial, it doesn't matter what we call the bits just so long as we put the right things in the right bits. Which is true. But it's possible that your customer is expecting the bits in the opposite order from which you're sending them.

Have a look at the Wikipedia article Bit numbering and in particular the paragraph headed "Most Significant Bit First vs Least Significant Bit First".

On the other hand it might just be that you made a small error in one place. No feedback from the customer about what's wrong?

Zach Rode wrote:Take an imaginary cow because I don't have any real ones to give.



I gave one to Tim on your behalf. I gave you one too.
3 weeks ago
So Croatia just beat Argentina! It looks to me like Argentina has a fair chance of not getting out of the first round now.

(Disclosure: I'm not watching any of the games, just looking at the results from time to time.)
3 weeks ago

yas sine wrote:yeep, the class Tax_en_US is meant to be the resource bundle, however, I don't see what is wrong with the class name



You didn't call the class "Tax_en_US". Look again at what you did call it.
Also Java already has a little-known tool for loading user-specified classes; it's called java.util.ServiceLoader (check it out in the API). Although it looks like it's designed more for professionals designing something like an XML parser, and you might not want to impose it on your users.
3 weeks ago
Well, since the code written by the users is (or can be) put into the classpath, loading classes from it is basically trivial:



So the part which is still missing is for your interpreter to be able to find the classes which implement your API. You could achieve this by requiring the user to create, say, a text file with a predetermined name. The text file would contain a list of the FQN's of their classes and it would be put into the classpath, and you could access it as a resource.

Is that on the right track?
3 weeks ago
The full path to the class? No, that's not how it works. First step (given your sample code) is to ensure that the class is in the classpath -- probably you've done that already by putting it in the executable jar. But to load a class you need its fully qualified name, which is the same name you'd use in an import statement if you were going to import it.
3 weeks ago
Was your class "Taxt_en_US" meant to be the resource bundle for "Tax"? The spelling of that name explains why it can't be found.
Well, normally when the database server tells you there's an error in your SQL, you would look at the SQL, right? So is your software not designed to show you the SQL with the error? I'd work on fixing that if it doesn't.
3 weeks ago
You can certainly upload (not "update") a file to a web server, provided that the server provides a page which supports that. When you say it "can accept binary content" it sounds to me like there is a page which supports uploads.

You can write your own Java code for doing file uploads, but you have to learn a whole lot of boring details about the HTTP specifications. But it's really better to use Apache's HttpClient package -- you don't have to learn the boring specs and it works already.

Kat Cur wrote:The one line of code I needed instead of an if/else statement...



You certainly didn't need if/else to do the thing you wanted to do. If you'd mentioned that you had that idea, anybody here would have told you that.
3 weeks ago
Typically a Java application loads a class the first time it is referred to by code which is running. And note, it's classes which are loaded, not libraries. It would be terribly wasteful, both of time and memory, for a Java application to load all of the classes in a library as soon as only one of them is required.

I have no reason to believe that JBoss works differently than any other Java application in terms of class loading; I would be thoroughly amazed if it loaded classes before they were needed.
3 weeks ago
Well, actually there's a third method for the "other class" to access an object of the Dictionary class, and that's for it to create one itself.
4 weeks ago