Link to home
Start Free TrialLog in
Avatar of ellandrd
ellandrdFlag for Ireland

asked on

Error Reading File

up to a few days ago my application worked like a treat. ive spend the last fews days create .EXE .JNLP files, and writing README files for it.

Now today - just for one last clean and build before I package it, im getting this "cannot compile stylesheet" error.

I havnt changed anything to brake it but for some reason it isnt working anymore...

ive build a simple RSS feed based on swing components.

I have my XSL file in a folder called "etc"

here is a run  down of my structure:  

newsreader
     |----build
     |----docs
     |----dist
     |----etc
     |----src
     |----test

the actual error im getting is:

run:
ERROR:  'C:\newsreader\build\classes\etc\rss.xsl (The system cannot find the path specified)'
FATAL ERROR:  'Could not compile stylesheet'
BUILD SUCCESSFUL (total time: 4 seconds)


how i read my file in RSSContentPane.java:

try {
            File file = new File( "etc/rss.xsl" ) ;
            this.rssSource = new URL( this.selectedRSSFeed ) ;
            this.xslSource = file.toURL() ;
            this.writer = new StringWriter() ;
            this.rssTransformer = new RSSTransformer() ;
            this.rssTransformer.process( this.rssSource, this.xslSource, this.writer ) ;
            this.setText( this.writer.getBuffer().toString() ) ;
            this.html.setCaretPosition( 0 ) ;
        } catch( MalformedURLException e ) {
            JOptionPane.showMessageDialog( null, e.toString(), "News Reader (RSS)", JOptionPane.ERROR_MESSAGE ) ;
            System.exit( 0 ) ;
        } catch ( TransformerException e ) {
            JOptionPane.showMessageDialog( null, e.toString(), "News Reader (RSS)", JOptionPane.ERROR_MESSAGE ) ;
        } catch ( IOException e ) {
            JOptionPane.showMessageDialog( null, e.toString(), "News Reader (RSS)", JOptionPane.ERROR_MESSAGE ) ;
            System.exit( 0 ) ;
        }


transformer.java code:

public class RSSTransformer {
    private TransformerFactory factory;
   
    /** Creates a new instance of RSSTransformer */
    public RSSTransformer() {
        factory = TransformerFactory.newInstance();
    }
   
    public void process( URL url, URL xsl, Writer out ) throws TransformerException {
        try {
            Templates template = factory.newTemplates( new StreamSource( xsl.toExternalForm() ) );
            Transformer transformer = template.newTransformer();
            transformer.transform( new StreamSource( url.toExternalForm() ), new StreamResult( out ) );
        } catch ( TransformerConfigurationException e ) {
            JOptionPane.showMessageDialog( null, "Your RSS source was not valid" , "News Reader (RSS)", JOptionPane.ERROR_MESSAGE );
        } catch ( TransformerException e ) {
            JOptionPane.showMessageDialog( null, "Your RSS source was not valid" , "News Reader (RSS)", JOptionPane.ERROR_MESSAGE );
        }
    }
}


if you need more code please ask...

ps. this is urgent!



SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ellandrd

ASKER

so my path is wrong yes?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
cool ok...
see using Absolute path, where would i start it from? newsreader or my c:\?
how are you running it?
if you add your etc directory to your class path you can use the following:

this.xslSource = getClass().getResource("rss.xsl");

you then don't need to create that file instance at all
Standalone application - im planning of distributing it by webstart...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>>if you add your etc directory to your class path....

see when people do this, will this be for the whole of netbeans or just this project?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If using Webstart, option b. in my comment is best
>>then add the etc directory into your jar, and use:

not sure how i do this?

do i have to change my build.xml?  i have already customised this build.xml...
actually on saying that, the only thing ive changed since it has been all working is my build.xml file...

what to see it?
>>do i have to change my build.xml?  

Not sure, but if you have one, i'm surprised your resources are not already there. Please post output of

jar tf yourjar.jar
>>what to see it?

I assume you mean *want* to see it. Not yet ;-)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i get "jar" not recognised
objects

i want to load it from the jar... there will be no copying of files to users disk...  

it will be either an jar file wrapped in .exe or an jnlp file for webstart...
the build is using a base diretcory of:

C:\newsreader\build\classes\

it should be:

C:\newsreader
> i want to load it from the jar... there will be no copying of files to users disk...  

then do as I suggested above :)
the code you have currently won't work with the xsl in the jar, you need to change it
im not sure:

here is how is set up some properties in my build.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project name="NewsReader" default="run" basedir=".">
   
    <import file="nbproject/build-impl.xml"/>

    <!-- define some useful properties -->
    <property name="project.build" location="${basedir}/build/classes"/>
    <property name="project.source" location="${basedir}/src/"/>
    <property name="project.etc" location="${basedir}/etc/"/>
    <property name="project.documentation" location="${basedir}/doc/"/>
    <property name="project.main.class" value="u0207372.NRStandalone"/>
 
...


do you mean just have:

<property name="project.build" location="${basedir}/build "/>

?
moving the xsl into your jar will mean you don't need to change the build as you will no longer need the line that is giving you the error
this:

            File file = new File( "etc/rss.xsl" ) ;
            this.rssSource = new URL( this.selectedRSSFeed ) ;
            this.xslSource = file.toURL() ;

becomes just:

            this.rssSource = new URL( this.selectedRSSFeed ) ;
            this.xslSource = getClass().getResource("/etc/rss.xsl");
ok but im not too sure how i add te xsl file or this etc folder into the jar file?
add the directory to the file list in your jar build target
Please post the output of

jar tf yourjar.jar
>>Date: 03/23/2006 10:56AM GMT
Oh, OK. You need to add %JAVA_HOME%\bin to your path
(Creating the variable JAVA_HOME [the installation directory of your JDK] first if necessary)
theres no need to run jar :)
ok guys - the two of ye telling me to do different things isnt helping!

i want my application to run off a exe or jnlp - there will be no copying of files onto users disks.

CEHJ

i cant get jar to work...

Objects

>>add the directory to the file list in your jar build target

im stuck here with this...  i never added file list to jar so i dont know what im doing...

what ive got is:

<?xml version="1.0" encoding="UTF-8"?>
<project name="RSSReader" default="run" basedir=".">
   
    <import file="nbproject/build-impl.xml"/>

    <!-- define some useful properties -->
    <property name="project.build" location="${basedir}/build/classes"/>
    <property name="project.source" location="${basedir}/src/"/>
    <property name="project.etc" location="${basedir}/etc/"/>
    <property name="project.documentation" location="${basedir}/doc/"/>
    <property name="project.main.class" value="u0207372.NRStandalone"/>
 
    <!-- define a classpath and attach a reference to it -->
    <path id="project.classpath">
        <pathelement location="${project.build}"/>
    </path>
   
    <!-- compile the application -->
    <target name="build" description="--&gt; compile the application">
        <javac srcdir="${basedir}/src/" destdir="${project.build}" classpathref="project.classpath" debug="on">
        </javac>
    </target>
   
    <!-- run the application -->
    <target name="run" description="--&gt; run the application">
        <java classname="${project.main.class}" fork="true" classpath="project.classpath" dir="${basedir}/build/classes">
        </java>
    </target>
 ...
>>i cant get jar to work...

That should be done - a Java developer should always be able to run jar ;-)

>>>>add the directory to the file list in your jar build target

It's already added
xslSource = getResource("etc/rss.xsl" )  ;

Since it's already added, the above should work
Sorry

xslSource = getResource("/etc/rss.xsl" )  ;
method getResource not found?

in your case it would be something like:

<jar destfile="${basedir}/rssreader.jar">
    <fileset dir="${project.build}" />
    <fileset dir="${project.etc}"/>
</jar>

add that to your build target (or you can make it seperate if yuou want)
Sorry - not quite awake

getClass().getResource(................................
> method getResource not found?

see what I suggested earlier.

using the above build it would be:

            this.xslSource = getClass().getResource("rss.xsl");
like this

<!-- compile the application -->
    <target name="build" description="--&gt; compile the application">
        <jar destfile="${basedir}/dist/rssreader.jar">
            <fileset dir="${project.build}" />
            <fileset dir="${project.etc}"/>
        </jar>
        <javac srcdir="${basedir}/src/" destdir="${project.build}" classpathref="project.classpath" debug="on">
        </javac>
    </target>

?

also this:

this.xslSource = this.getClass().getResource( "/etc/rss.xsl" )  ;

gives me a null pointer...

i have tired too:

this.xslSource = this.getClass().getResource( "etc/rss.xsl" )  ;

still null pointer...
>>like this

No - you need to compile it before you jar it
see my comment above:

this.xslSource = this.getClass().getResource( "rss.xsl" )  ;

and move the builkding of jar, *after* the jjavac
still get null pointer!

<!-- compile the application -->
    <target name="build" description="--&gt; compile the application">
        <javac srcdir="${basedir}/src/" destdir="${project.build}" classpathref="project.classpath" debug="on">
        </javac>
        <jar destfile="${basedir}/rssreader.jar">
            <fileset dir="${project.build}" />
            <fileset dir="${project.etc}"/>
        </jar>
    </target>

in my RSSContentPane, ive got:

URL xslSource = getClass().getResource( "rss.xsl" )  ;
sorry, should have been:

URL xslSource = getClass().getResource( "/rss.xsl" )  ;
i'd love to say it working but im still getting this:

run:
Exception in thread "main" java.lang.NullPointerException
        at u0207372.gui.RSSContentPanel.updateRSSNews(RSSContentPanel.java:66)
        at u0207372.gui.RSSContentPanel.<init>(RSSContentPanel.java:52)
        at u0207372.NRStandalone.<init>(NRStandalone.java:27)
        at u0207372.NRStandalone.main(NRStandalone.java:46)
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)
see when i added these lines of code:

<!-- compile the application -->
    <target name="build" description="--&gt; compile the application">
        <javac srcdir="${basedir}/src/" destdir="${project.build}" classpathref="project.classpath" debug="on">
        </javac>
        <jar destfile="${basedir}/rssreader.jar">
            <fileset dir="${project.build}" />
            <fileset dir="${project.etc}"/>
        </jar>
    </target>

should this have created a rssreader.jar in the base dir?

because it dont!
forgot to change the run target :)
it needs to include the jar in the classpath instead of the classes onm disk

> should this have created a rssreader.jar in the base dir?

yes it should have, did u run the build target?
if so, what was the output?
       <java classname="${project.main.class}" fork="true" classpath="${basedir}/rssreader.jar" dir="${basedir}">
>><fileset dir="${project.etc}"/>

Rather than the above, you'd be better with

<fileset dir="${basedir}"/>
   <!-- keep logical separation intact and include what's necessary -->
    <include name="etc/**" />
</fileset>
>>yes it should have, did u run the build target?
>>if so, what was the output?

build:
Building jar: C:\rssreader\rssreader.jar
BUILD SUCCESSFUL (total time: 0 seconds)

but not jar file though!

>>it needs to include the jar in the classpath instead of the classes onm disk

in here:

<path id="project.classpath">
        <pathelement location="${project.build}"/>
    </path>


see my comment above
ok objects ive added that line you gave me in here:

<!-- run the application -->
    <target name="run" description="--&gt; run the application">
        <java classname="${project.main.class}" fork="true" classpath="${basedir}/rssreader.jar" dir="${basedir}">
        </java>
    </target>

im sorry after i refreshed my folder, the jar appeared... in the base dir
im still getting this null pointer...

dont know what ive got wrong?

URL xslSource = getClass().getResource( "/rss.xsl" )  ;


in my build.xml file i ahve this:

<?xml version="1.0" encoding="UTF-8"?>
<project name="RSSReader" default="run" basedir=".">
   
    <import file="nbproject/build-impl.xml"/>

    <!-- define some useful properties -->
    <property name="project.build" location="${basedir}/build/classes"/>
    <property name="project.source" location="${basedir}/src/"/>
    <property name="project.etc" location="${basedir}/etc/"/>
    <property name="project.documentation" location="${basedir}/doc/"/>
    <property name="project.main.class" value="u0207372.NRStandalone"/>
 
    <!-- define a classpath and attach a reference to it -->
    <path id="project.classpath">
        <pathelement location="${project.build}"/>
    </path>
   
    <!-- compile the application -->
    <target name="build" description="--&gt; compile the application">
        <javac srcdir="${basedir}/src/" destdir="${project.build}" classpathref="project.classpath" debug="on">
        </javac>
        <jar destfile="${basedir}/rssreader.jar">
            <fileset dir="${project.build}" />
            <fileset dir="${project.etc}" includes="**/*.xsl"/>
        </jar>
    </target>
   
    <!-- run the application -->
    <target name="run" description="--&gt; run the application">
        <java classname="${project.main.class}" fork="true" classpath="${basedir}/rssreader.jar" dir="${basedir}/build/classes" />
    </target>

.....
i hate when people dont reply ;-)
List the jar

jar tf rssreader.jar

, using the full path to jar.exe if necessary
the output is:

META-INF
u0207372
rss.xsl
so the rss.xsl is been added the the jar, but after that i dont know what im doing esp playing around with the build.xml...

There's no application in there! - Just two directories and your xsl file
what do you mean?

what is mean to be in there?
All your classes. Can you post the output of

dir build/classes /s/b
Sorry - that was meant to be

All your classes. Can you post the output of

dir build\classes /s/b
it contains all my .class files
Please post output
you still there? when you go offline tell me...
Yes
just so you know im getting nowhere!

ive just spend last 2 hours getting nowhere..

lets just get this working and no messing about - e.g 1 liner comments - ive never played about the build.xml before so therefore ive not got a clue what im doing!
Going off for few minutes
*You* must do what i ask then - so far you haven't ;-) Back soon
ok lets start from stratch.

here is my build.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project name="NewsReader" default="build" basedir=".">
   
    <import file="nbproject/build-impl.xml"/>

    <!-- define some useful properties -->
    <property name="project.build" location="${basedir}/build/classes"/>
    <property name="project.source" location="${basedir}/src/"/>
    <property name="project.etc" location="${basedir}/etc/"/>
    <property name="project.documentation" location="${basedir}/doc/"/>
    <property name="project.main.class" value="u0207372.NRStandalone"/>
 
    <path id="project.classpath">
        <!--pathelement location="${project.build}"/-->
        <pathelement location="${basedir}/dist/newsreader.jar"/>
    </path>

    <!-- build the application -->
    <target name="build" description="--&gt; compile the application">
        <javac srcdir="${basedir}/src" destdir="${project.build}" classpathref="project.classpath" debug="on">
        </javac>
        <jar destfile="${basedir}/dist/newsreader.jar" basedir="${project.build}" update="false">
            <fileset dir="${project.etc}"/>
            <manifest>
                <attribute name="Built-By" value="u0207372"/>
                <attribute name="Main-Class" value="${project.main.class}"/>
                <attribute name="Specification-Title" value="${ant.project.name}"/>
            </manifest>
        </jar>
    </target>

    <!-- run the application -->
    <target name="run" depends="build" description="--&gt; run the application">
        <java classname="${project.main.class}" classpathref="project.classpath" fork="true">
        </java>
        <jar destfile="${basedir}/dist/newsreader.jar" basedir="${project.build}" update="false">
            <fileset dir="${project.etc}"/>
            <manifest>
                <attribute name="Built-By" value="u0207372"/>
                <attribute name="Main-Class" value="${project.main.class}"/>
                <attribute name="Specification-Title" value="${ant.project.name}"/>
            </manifest>
        </jar>
    </target>
   
    <!-- clean the application -->
    <target name="clean" description="--&gt; clean">
        <delete>
            <fileset dir="${project.build}" includes="**.*"/>
        </delete>
    </target>

</project>

when i build i get the XSL file and build/classess put into the JAR file.

when i run i get:

build:
run:
Exception in thread "main" java.lang.NullPointerException
        at u0207372.RSSTransformer.process(RSSTransformer.java:30)
        at u0207372.gui.RSSContentPanel.updateRSSNews(RSSContentPanel.java:65)
        at u0207372.gui.RSSContentPanel.<init>(RSSContentPanel.java:52)
        at u0207372.NRStandalone.<init>(NRStandalone.java:27)
        at u0207372.NRStandalone.main(NRStandalone.java:46)
Java Result: 1
BUILD SUCCESSFUL (total time: 1 second)

Now i know the XSL file is in the JAR as when i extend my JAR i can see it along with my u0207372/build/classes.

the u0207372/build/classes contains:

gui/RSSContentPane.class
gui/RSSInput.class
gui/RSSList.class
NRStandalone.class
RSSTransformer.class

in my RSSContentPane.java I have this:

URL xslSource = this.getClass().getResource( "/rss.xsl" )  ;

if you need anything else - just ask
Is there a package specified in NRStandalone.java?
package u0207372 ;
is there a way we could copy all the etc folder into the jar file instead of just the rss.xsl?
OK. Can you please copy and paste (i include the prompt below) the output of

C:\whatever\build\classes>dir /s/b

?
>> is there a way we could copy all the etc folder into the jar file instead of just the rss.xsl?

Yes, i mentioned that earlier, but forget that for the moment - there seem to be more fundamental issues wrong
C:\newsreader\build\classes>dir /s/b
C:\newsreader\build\classes\u0207372
C:\newsreader\build\classes\u0207372\gui
C:\newsreader\build\classes\u0207372\NRStandalone.class
C:\newsreader\build\classes\u0207372\RSSTransformer.class
C:\newsreader\build\classes\u0207372\gui\RSSContentPanel.class
C:\newsreader\build\classes\u0207372\gui\RSSInput$1.class
C:\newsreader\build\classes\u0207372\gui\RSSInput.class
C:\newsreader\build\classes\u0207372\gui\RSSList$1.class
C:\newsreader\build\classes\u0207372\gui\RSSList.class
OK - not as bad as i thought. BACK THE ORIGINAL UP and try the following. You'll need to load the xsl file as i originally mentioned (after my self-correction)

<?xml version="1.0" encoding="UTF-8"?>
<project name="RSSReader" default="run" basedir=".">
   
    <import file="nbproject/build-impl.xml"/>

    <!-- define some useful properties -->
    <property name="project.build" location="${basedir}/build/classes"/>
    <property name="project.source" location="${basedir}/src/"/>
    <property name="project.etc" location="${basedir}/etc/"/>
    <property name="project.documentation" location="${basedir}/doc/"/>
    <property name="project.main.class" value="u0207372.NRStandalone"/>
 
    <!-- define a classpath and attach a reference to it -->
    <path id="project.classpath">
        <pathelement location="${project.build}"/>
    </path>
   
    <!-- compile the application -->
    <target name="build" description="--&gt; compile the application">
        <javac srcdir="${basedir}/src/" destdir="${project.build}" classpathref="project.classpath" debug="on">
        </javac>
       
        <jar basedir="${basedir}" destfile="${basedir}/rssreader.jar">
            <manifest>
                <attribute name="Main-Class" value="${project.main.class}"/>
            </manifest>    

            <fileset dir="${project.build}">
                  <include name="**/*.class" />
            </fileset>
          
          <fileset dir="${basedir}"/>
               <!-- keep logical separation intact and include what's necessary -->
                <include name="etc/**/*.xsl" />
          </fileset>

        </jar>
    </target>
   
    <!-- run the application -->
    <target name="run" description="--&gt; run the application">
        <java classname="${project.main.class}" fork="true" classpath="${basedir}/rssreader.jar" dir="${basedir}/build/classes" />
    </target>
The end of what i just posted is missing the closing </project> tag

Also, replace the java task with the following:

<java jar="rssreader.jar" fork="true" dir="${basedir}" />
>>You'll need to load the xsl file as i originally mentioned (after my self-correction)

as in: 03/23/2006 11:56AM GMT

>>Also, replace the java task with the following:
>><java jar="rssreader.jar" fork="true" dir="${basedir}" />

eh? lost
As in http:Q_21785541.html#16267974

See my last correction too
>>eh? lost

Use that instead of

  <java classname="${project.main.class}" fork="true" classpath="${basedir}/rssreader.jar" dir="${basedir}/build/classes" />
i get this:

build:
Building jar: C:\newsreader\dist\newsreader.jar
C:\newsreader\build.xml:23: A zip file cannot include itself
BUILD FAILED (total time: 1 second)


Now i have not added: <java jar="rssreader.jar" fork="true" dir="${basedir}" /> as i dont know where it goes...

>>as i dont know where it goes...

It goes where i said - in place of where the previous java task was
run:
java.lang.NoClassDefFoundError: u0207372/NRStandalone
Exception in thread "main"
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)
jar tf rssreader.jar

output please
newsreader
META-INF
build
dist
doc
etc
nbproject
src
test
NewsReader.jnlp
applet.policy
build.xml
manifest.mf
readme.html
run.bat
If that's really the jar listing again it's got nothing of interest in it. That doesn't look like it was produced with the build xml i've just given you. Better post the output of

type build.xml
C:\newsreader>type build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="RSSReader" default="run" basedir=".">

    <import file="nbproject/build-impl.xml"/>

    <!-- define some useful properties -->
    <property name="project.build" location="${basedir}/build/classes"/>
    <property name="project.source" location="${basedir}/src/"/>
    <property name="project.etc" location="${basedir}/etc/"/>
    <property name="project.documentation" location="${basedir}/doc/"/>
    <property name="project.main.class" value="u0207372.NRStandalone"/>

    <!-- define a classpath and attach a reference to it -->
    <path id="project.classpath">
        <pathelement location="${project.build}"/>
    </path>

    <!-- compile the application -->
    <target name="build" description="--&gt; compile the application">
        <javac srcdir="${basedir}/src/" destdir="${project.build}" classpathref=
"project.classpath" debug="on">
        </javac>

        <jar basedir="${basedir}" destfile="${basedir}/dist/newsreader.jar">
          <manifest>
              <attribute name="Main-Class" value="${project.main.class}"/>
          </manifest>

            <fileset dir="${project.build}">
                 <include name="**/*.class" />
            </fileset>

         <fileset dir="${basedir}">
              <include name="etc/**/*.xsl" />
         </fileset>

        </jar>
    </target>

    <!-- run the application -->
    <target name="run" description="--&gt; run the application">
        <java jar="${basedir}/dist/newsreader.jar" fork="true" dir="${basedir}/b
uild/classes" />

        <!--java classname="${project.main.class}" fork="true" classpath="${base
dir}/dist/newsreader.jar" dir="${basedir}/build/classes" /-->
    </target>
</project>
C:\newsreader>
OK - looks like the output file has now changed, can you post the output of

jar tf dist\newsreader.jar


it working!!!!! yes - can eat now - havnt eaten since 6.30 dismorning...
kinda need to pull myself from outta this chair now...
cheers for the help..

just wanna do one more test before accepting....
ok ive tried to add my package target and sign-jar target and im getting this:

jarsigner: unable to sign jar: java.util.zip.ZipException: duplicate entry: etc/rss.xsl
C:\newsreader\build.xml:57: The following error occurred while executing this line:
C:\newsreader\build.xml:72: exec returned: 1
BUILD FAILED (total time: 0 seconds)


maybe i have it done wrong - i trying to have the same as what you had for build...


here is my code:

<!-- package the application -->
    <target name="package" depends="build" description="--&gt; create distribution">
        <jar destfile="NewsReaderApp.jar" basedir="${basedir}" update="false">
            <fileset dir="${basedir}">
                <include name="etc/**" />
            </fileset>
            <manifest>
                <attribute name="Built-By" value="u0207372"/>
                <attribute name="Main-Class" value="${project.main.class}"/>
                <attribute name="Specification-Title" value="${ant.project.name}"/>
            </manifest>
        </jar>
        <!-- Signing is normally only required for extended permissions
        and integrity checks. If not, delete the next line and the associated target. -->
        <antcall target="sign-jar">
        </antcall>
    </target>
   
    <!-- sign the application -->
    <target name="sign-jar">
        <!-- check if a keystore file is required -->
        <condition property="keystore.missing">
            <not>
                <available file="${basedir}/etc/u0207372Store">
                </available>
            </not>
        </condition>
        <antcall target="generate-keystore">
        </antcall>
        <signjar jar="NewsReaderApp.jar" keystore="${basedir}/etc/u0207372Store" alias="u0207372Sign" signedjar="SignedNewsReaderApp.jar" storepass="lqv78" keypass="lqv78" verbose="true">
        </signjar>
    </target>
   
    <!-- Generating a new keystore file -->
    <target name="generate-keystore" if="keystore.missing">
        <echo>***** Generating a new keystore file. *****</echo>
        <genkey alias="u0207372Sign" storepass="lqv78" verbose="true" keystore="${basedir}/etc/u0207372Store" keypass="lqv78" dname="CN=u0207372, OU=u0207372, O=Aberdeen, C=UK">
        </genkey>
    </target>
With any luck you should be able to start that by double-clicking the jar
>>jar="NewsReaderApp.jar"

But that isn't the jar is it?
its ok i fixed it...
see if i build it and try try build it again it wont let me.

but if i build it, then clean it -cleaning it does nothing...

    <!-- clean the application -->
    <target name="clean" description="--&gt; clean">
        <delete>
            <fileset dir="${basedir}/build/classes" includes="**.*"/>
        </delete>
    </target>
I would normally do

<fileset dir="${basedir}/build/classes" includes="**/*.*"/>
:-)
Sorry had to get some sleep, can you explain the split please.
The question was about reading the xsl which I helped you with with.
Fxing your build was a seperate issue and really should have been a seperate question.

and his earlier comment that you accepted is wrong:

> xslSource = getResource("/etc/rss.xsl" )  ;



It isn't wrong ;-)
>>and his earlier comment that you accepted is wrong:
> xslSource = getResource("/etc/rss.xsl" )  ;

it worked.

I split the points as both of your comments had helped in the end - did you want me to award all points to you?  I split them as I though it wasnt fair to award CEHJ all 500 even though he spend hours helping me out, but so did you.  

Yes the question was about reading in my xsl file, but inorder to do so you suggested include it in the jar file so this lead to changing my build.xml file to include the xsl file... remember? (Date: 03/23/2006 10:50AM GMT) hence why the question lead more into changing my build.xml file.

Im sure you have been apart of many threads that have evolved off-topic while trying to solve the problem e.g the asker thinks its 1 thing, when it isnt and the thread changes course...

>>The question was about reading the xsl which I helped you with with.

And i award you some points for helping - i might have not selected the right comments but at least you got some credit for it... after all how many comments are in this thread?  it isnt easy to read back over them all and selected the best ones when you havent eaten in like 9 hours or have not moved from your chair...

in fact i lost a whole day work yesterday due to this issue and thanks to both of ye, I got it fixed, but at some expense.

ellandrd
p.s im not here to argue with people over some stupid points
> it worked.

it won't even compiled (as u yourself stated)
And the corrected version was copied from my previous comments.

> hence why the question lead more into changing my build.xml file.

which should have been a seperate question.
the solution to your problem required no change to your build script
as I \stated you just needed to include the xsl in your classpath

> Im sure you have been apart of many threads that have evolved off-topic while trying to solve the problem e.g the asker thinks its
> 1 thing, when it isnt and the thread changes course...

Yes, but I don't expect the points for it after someone else has alr3eaqdy answered the question.

> p.s im not here to argue with people over some stupid points

If you don't like the system then don't use it :)

I'll get the admins to have a look at it.
>>it won't even compiled (as u yourself stated)
>>And the corrected version was copied from my previous comments.

look at: Date: 03/23/2006 11:03AM GMT - this is the code i used and you got credit for your comments

>>which should have been a seperate question.
>>the solution to your problem required no change to your build script
>>as I \stated you just needed to include the xsl in your classpath

OK, fair point - but i didnt know how to do this, hence why i asked for help with it.

you could have said stop, this question is not related to changing build.xml so open new Q. but you didnt - you continued to provide comments to help me change my build.xml:

Date: 03/23/2006 10:50AM GMT
Date: 03/23/2006 11:36AM GMT
Date: 03/23/2006 11:55AM GMT

Yes - i'll take the blame for not seeing this (opening new thread), but i should have been corrected.

>>Yes, but I don't expect the points for it after someone else has alr3eaqdy answered the question.

Its called been fair - if i awarded CEHJ all the points you'd be giving out, saying you helped me - next thing i'd see is comment from mods and question reopened...

so to bypass this, i split the points.

>>I'll get the admins to have a look at it.

do what you want - i dont care - as far as i can see, the mods have looked at this question and have made there comments on it to you: https://www.experts-exchange.com/questions/21788228/Working-please-check.html

you are never happy with any decisions i make anyway so whats the point?

there is times when i open questions and you comment, and i think yes - objects just commented - he'll help me out... but then i think oh no - he's sooooo picky and will be on my back for a few days as the decisions/comments i make, he wont like...

this site is meant to be trying to hold onto members - not push them away and this is exactly what you doing!