Java Mailing List Archive

Apache Ant Archive

» Ant Users List
» Ant Developers List
Ant and the Windows Registry

Ant and the Windows Registry

2006-10-13       - By Steve Loughran
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Peter Reilly wrote:
> On 10/13/06, Robert Pepersack <RPepersack@(protected)> wrote:
>> Hi all,
>> I would like to read and alter a Windows registry key with Ant.  You
>> may ask why would I want to change the Windows registry??!!  I want to
>> change the registry because I want to change my J2EE server's (Sybase
>> EAServer) classpath from Ant.  My fellow developers and I could change
>> our servers' classpathes manually by opening regedit, but this would be
>> prone to point-and-click screw-ups.  I think that changing the registry
>> from Java would be more reliable and less error-prone.
>> I Googled on the subject and found that there is a Java Preferences API
>> and Orangevolt Ant Tasks.  Has anyone used these, or know of something
>> better?
> The orangevolt ant tasks look pretty nice. They include a jni dll
> that accesses the win reg (why oh why did sun not support jdirect?)
> On initial load, the tasks  copy the dll into $JAVA_HOME/jre/bin.
> The tasks can then read and write reg entries.

Now, one thing to think about is that although the Java preferences API
is limited to part of the registry, and it messes up strings you put
down, there must be, underneath, the binding between Java and and the
registry. If the raw API calls are exposed in Java, you could work out
what the existing jni bindings are and use them direct.

just a thought...

To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 - Jax Systems, LLC, U.S.A.