[ 
http://issues.apache.org/jira/browse/NUTCH-82?page=comments#action_12332660 ] 

Matt Kangas commented on NUTCH-82:
----------------------------------

Another "pure Java" solution is to rewrite the "nutch" bash script in BeanShell 
(http://www.beanshell.org).

I just took a quick (~1 hr) stab at this. The syntax seems quite agreeable, 
with many builtin versions of standard unix commands (cd(), cat(), etc). 
However, I quickly hit two barriers:

1) Reading environment variables. System.getenv() works on 1.5, but is 
nonfunctional on Java 1.3 and The only workaround on 1.4 is what ant does: run 
a native command, read the
output, and set system properties.

2) Setting -Xmx et al. My sense is that it's simply not possible.

Other than these issues, it would be quite easy to rewrite all of the 
usage/command/path-building logic into a beanshell script. Then there could be 
two *small* scripts (bash & .bat) to handle the stuff that can't be done in 
Java, and one beanshell script for the rest. Does that seem useful? 

FYI, the core beanshell interpreter is ~143k.

> Nutch Commands should run on Windows without external tools
> -----------------------------------------------------------
>
>          Key: NUTCH-82
>          URL: http://issues.apache.org/jira/browse/NUTCH-82
>      Project: Nutch
>         Type: New Feature
>  Environment: Windows 2000
>     Reporter: AJ Banck
>  Attachments: nutch.bat, nutch.bat, nutch.pl
>
> Currently there is only a shellscript to run the Nutch commands. This should 
> be platform independant.
> Best would be Ant tools, or scripts generated by a template tool to avoid 
> replication.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to