Re: [JXTA discuss] [ext.config] JXTA_HOME trouble
James Todd <[email protected]> Tue, 21 Feb 2006 09:59:20 -0800
| Newsgroups | gmane.comp.java.jxta.general |
|---|---|
| Message-ID | <[email protected]> |
Hi -
This change has been applied to the ext:config main branch a couple of
weeks back.
hth,
- james
--
James Todd :: blogs.sun.com/gonzo | weblogs.java.net/blog/gonzo
MyJXTA :: use it - learn it - do it
Java == platform independence
XML == application independence
JXTA == network independence
Secure End-to-End Computing
Gabriel Vasile wrote:
>Hello,
>I would also add that in 2.3.6 in Configurator class in "private void
>process(Profile profile, boolean overlay)"
>at somepoint there is an
> URI u = getJxtaHome();
>
> if (u != null) {
> String cs = u.toString() + File.separator +
>Env.CONFIG_PROPERTIES;
> boolean isValid = false;
>
> try {
> cp.load(new URI(cs).toURL().openStream());
>
> isValid = true;
> } catch (URISyntaxException use) {
>
>So if Jxta home is set (I had to, otherwise it would look in the home
>directory, see the mail from Michele Amoretti) the result is that
>Configurator is going to try to obtain config.properties. However the path
>to the config.properties (cs variable) is not well formed
>on Windows platforms as File.separator is \
>So basically cs will be something like: file://path/.jaxta\config.properties
>
>So the constructor for URI object is going to fail on windows platforms.
>
>So my suggestion is to replace the value of File.separator with "/" as you
>are constructing a URI.
>
>Gabriel Vasile
>
>----- Original Message -----
>From: "Michele Amoretti" <[email protected]>
>To: <[email protected]>
>Sent: Tuesday, February 21, 2006 2:38 PM
>Subject: [JXTA discuss] [ext.config] JXTA_HOME trouble
>
>
>
>
>>Hello,
>>
>>I am trying to use the auto-conf with jxta 2.3.6. I have a problem, since
>>
>>
>I
>
>
>>want to create several folders, each one with its .jxta/config.properties.
>>I have to pass the "/path/to/.jxta" to the Configurator constructor, i.e.
>>
>>.........
>>
>>URI jh = null;
>>
>>try {
>> jh = new URI("file:///path/to/.jxta");
>>}
>>catch (URISyntaxException use) {
>> use.printStackTrace();
>>}
>>
>> c = new Configurator(jh, peerProfile);
>>
>>........
>>
>>Now, how can tell the URI that .jxta is in the local folder (i.e., in .)?
>>
>>I tried with jh = new URI("file:///./.jxta"); and so on, but nothing seems
>>
>>
>to
>
>
>>work. And I do not want to set an absolute path...
>>
>>
>>p.s. if I do not declare the path to .jxta, the platform uses by default
>>~/.jxta, which is absolutely ugly! I do not understand why, with 2.3.6
>>release, the default behaviour did changed...
>>
>>
>>Thank you
>>
>>--
>>Michele Amoretti, Ph.D. Student
>>Distributed Systems Group
>>Dip. di Ingegneria dell'Informazione, Università degli Studi di Parma
>>Parco Area delle Scienze, 181A I-43100 Parma Italy
>>Phone: +39-(0521)-906147 Fax: +39-(0521)-905723
>>
>>Home page:
>>http://dsg.ce.unipr.it/People/amoretti/Amoretti.html
>>
>>
>>
>>---------------------------------------------------------------------
>>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]
>
>
>