Well if I'm not completely mistaken you only need to modify the path to
the jre used by openoffice don't you?

I have no sed commando available at the moment but because I'm better in
perl here's a one liner (this is even cross-platform as it's perl :-)
:

----------------8<----------------
perl -e '{local $/ = undef; open(IN,"$ARGV[0]");$c=<IN>;close(IN);}$c =~
s/<location>.+<\/location>/<location>$ARGV[1]<\/location>/;open(OUT,">$ARGV[0]");print
OUT $c;close(OUT);' $path_to_javasettings_Linux_x86.xml $new_jre%
----------------8<----------------

for example:

----------------8<----------------
perl -e '{local $/ = undef; open(IN,"$ARGV[0]");$c=<IN>;close(IN);}$c =~
s/<location>.+<\/location>/<location>$ARGV[1]<\/location>/;open(OUT,">$ARGV[0]");print
OUT $c;close(OUT);' javasettings_Linux_x86.xml file:///usr/java5/jre
----------------8<----------------

As already mentionned if you have to check if this changes within
releases but it should work for the current ones.

Tom

Tobias Krais schrieb:
> Hi Peter,
> 
>> http://en.wikipedia.org/wiki/Sed
> 
> I know this littel program, but I don't know how sed can change the JRE
> for OOo...
> 
> Greetings, Tobias
> 
>>>> Well if you are on linux a simple "sed" command could change the used
>>>> JDK or am I missing something. This could surely done also on win32 but
>>>> I have no idea on win32-scripting. The information is stored on my
>>>> system in:
>>>>
>>>> [EMAIL PROTECTED]:~tom/.openoffice/user/config/javasettings_Linux_x86.xml
>>> tell me more! I know this file. But what do you mean with the "sed
>>> command"? How is it used?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to