Hi there list,
I want to use JRuby to learn Java.
Why?
I want to use a popular Java API I found on the net to do … stuff.
I want to learn enough Java to get productive with this API I found.
But obviously I want to get better at JRuby also.
I’m at the very early stages of this effort.
I have learned that I can do a Java import like this:
include_class java.lang.System
And I deal with a class-name-clash like this:
include_class(java.lang.Math) { |package,name| “J#{name}”}
So, that is a small amount of progress.
Now I am looking at this java command:
package TestJavaClient;
When I wander around the net looking at .java files I frequently see
package declarations.
A web search reveals that this command helps me “package” a bunch of
.java files into group.
To do this in Ruby I guess I’d physically put all the .rb files in the
same directory.
Also, I would put a module declaration in each file so the code in
them would be grouped together at run-time.
Here is my question,
How do I call
package TestJavaClient;
in JRuby ?
And, would I ever want to call
package TestJavaClient;
in JRuby ?
Perhaps it makes sense to ignore the package declaration?
Obviously it makes sense to use this declaration if I am writing a
bunch of .java files.
But I’m not, I’m writing .rb files.
Let me know if you have any thoughts on this.
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email