[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: ANN: rjava

Mark Wilson

10/20/2003 6:31:00 AM


On Sunday, October 19, 2003, at 09:20 PM, James Britt wrote:

> Hans Jörg Hessmann wrote:
>
>> RJava enables you to use Java classes from ruby using ruby-like
>> syntax. For example:
>> require "java"
>> include JAVA
>> JVM.start_tcp().import("java.lang.System").out.println("Hello
>> World!")
>
>
> Sounds sweet (though I've noticed it is currently only for
> non-Windows).
>
> One request, though: I noticed that there is a file simply named
> 'java.rb' that is installed in the root of site_ruby/1.8. Since this
> is a pretty generic file name, and others may write Java-related Ruby
> libs, the file should either be renamed or placed in its own
> subdirectory to avoid any possible conflicts.

This presents an opportunity for me to propose that things installed in
site-ruby/1.8 be placed in a subdirectory with either a registered name
(probably registered at ruby-lang.org) or a name guaranteed to be
unique. Mac OS X uses URI's as names guaranteed to be unique and avoids
collisions with programs that might confuse the name with an actual URI
by reversing the URI (i.e, apple.com becomes com.apple). Those without
their own domains might use permanent e-mail addresses (i.e.,
net.isp@username) or, if the RubyForge people, as an example, implement
it, RubyForge usernames (i.e, org.rubyforge.username), or something
similar. This could avoid massive problems in the not too distant
future.

Regards,

Mark