- From: Romain Deltour <rdeltour@gmail.com>
- Date: Thu, 21 Jul 2011 08:55:09 +0200
- To: Geert Josten <geert.josten@daidalos.nl>, "XProc Dev (xproc-dev@w3.org)" <xproc-dev@w3.org>
- Message-Id: <01054768-B623-44D3-AA0C-026C3FE0E695@gmail.com>
From the Java command line launcher doc:
http://download.oracle.com/javase/1.5.0/docs/tooldocs/windows/java.html
-jar
(...)
When you use this option, the JAR file is the source of all user
classes, and other user class path settings are ignored.
Romain.
Le 21 juil. 11 à 08:49, Romain Deltour a écrit :
> You're right, it seems that your configuration is fine, but that the
> "only" issue is that the class cannot be found.
>
> Can you try:
>
> java -cp lib\grtjn-xproc-utils.jar:lib\calabash.jar -
> Dcom.xmlcalabash.phonehome=false -
> Djava.util.logging.config.file=logging.properties
> com.xmlcalabash.drivers.Main -c lib/configuration.xml -i source=
> %INPUTFILE% src\nl\grtjn\xproc\ebook\main.xpl
>
> I'm really not sure, but could it be that the Java "cp" option is
> not used when trying to execute a Jar (instead of a main class) ?
>
> Romain.
>
> Le 21 juil. 11 à 08:12, Geert Josten a écrit :
>
>> Hi Alex,
>>
>> Thanks for your time!
>>
>> You are right, I didn’t edit extension-library.xml within
>> calabash.jar, but I did declare the step in a library of my own
>> which I thought would suffice. Doesn’t it? It essentially comes
>> down to this:
>>
>> <p:library version="1.0"
>> xmlns:p="http://www.w3.org/ns/xproc"
>> xmlns:ut="http://grtjn.nl/ns/xproc/util">
>>
>> <p:declare-step type="ut:env">
>> <p:output port="result"/>
>> </p:declare-step>
>>
>> </p:library>
>>
>> I also didn’t edit the configuration.xml within calabash.jar, but
>> provided my own one on the command-line, containing this:
>>
>> <xproc-config xmlns="http://xmlcalabash.com/ns/configuration"
>> xmlns:p="http://www.w3.org/ns/xproc"
>> xmlns:ut="http://grtjn.nl/ns/xproc/util">
>>
>> <implementation type="ut:env"
>> class-
>> name="nl.grtjn.xproc.util.osutils.Env"/>
>>
>> </xproc-config>
>>
>> These two bits don’t seem to be the problem, though. I can use
>> <ut:env/> within my pipes, and it knows it should look for the
>> class nl.grtjn.xproc.util.osutils.Env. And I am certain it is added
>> properly to my own jar, as when I use the same jar command to add
>> it to calabash.jar it all works. It just doesn’t work when I have
>> the class in a separate jar and pass it to java as follows:
>>
>> java -cp lib\grtjn-xproc-utils.jar -
>> Dcom.xmlcalabash.phonehome=false -
>> Djava.util.logging.config.file=logging.properties -jar lib
>> \calabash.jar -D -c lib/configuration.xml -i source=%INPUTFILE% src
>> \nl\grtjn\xproc\ebook\main.xpl
>>
>> I would rather not rely on a patched or self-compiled calabash. I
>> would prefer just providing a separate jar and config to make it
>> work. Am I overlooking something obvious?
>>
>> Kind regards,
>> Geert
>>
>> Van: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org]
>> Namens Alex Muir
>> Verzonden: donderdag 21 juli 2011 1:24
>> Aan: Geert Josten
>> CC: XProc Dev (xproc-dev@w3.org)
>> Onderwerp: Re: Trouble configuring custom extension in xmlcalabash
>>
>> Well you didn't mention editing extension-library.xml
>>
>> Given a new step created I edited 2 files like follows
>>
>> 1. extension-library.xml
>>
>> <p:declare-step type="mh:StoreAsText" version="1.0">
>> <p:input port="source"/>
>> <p:output port="result" primary="false"/>
>> <p:option name="href" required="true" cx:type="xsd:anyURI"/>
>> <p:option name="version" select="'1.0'" cx:type="xsd:string"/>
>> </p:declare-step>
>>
>>
>> 2. configuration.xml
>>
>> <implementation type="mh:StoreAsText"
>> class-name="com.xmlcalabash.extensions.StoreAsText"/>
>>
>>
>> --
>> Alex Muir
>> Instructor | Program Organizer - University Technology Student Work
>> Experience Building
>> University of the Gambia
>> http://sites.utg.edu.gm/alex/
>>
>> Low budget software development benefiting development in the
>> Gambia, West Africa
>> Experience of a lifetime, come to Gambia and Join UTSWEB - http://sites.utg.edu.gm/utsweb/
>
Received on Thursday, 21 July 2011 06:55:55 UTC