Help needed!

Help
2003-02-12
2003-03-04
  • Alexandre Moulart

    Hi everyone,

    I'm an almost newbie in java (only worked with pdf javascript till now),
    and I want to correct some bugs in the qif.class:
    - it won't import my money 2002 generated qifs because of MS Money 2002 not following
      correctly the quicken standard.
    - Also a date format problem (dd/mm/yyyy <-> mm/dd/yyyy).
    The first bug is really tiny and can be easily fixed. I plan to fix the second but first I have
    to get eveything to work correctly.

    When I compile the original source without any code modification (I simply type
    ant -v >debug.txt), ant gives me no error (BUILD SUCCESSFUL message), but the resulting jar
    is a little bit different (not exactly the same size) and when I try to launch it, this is what I get:

        Java Virtual Machine Launcher Error window
        "Could not find the main class. Program will exit!"

    I get the same problem when I try to run the riginal source.
       
    Am I doing something completly wrong?

    My System:     Win XP Pro Eng.
            j2sdk1.4.1_01
            Ant 1.5

    Thanks for your precious help

    Alex

     
    • Alexandre Moulart

      If anyone have the same problem
      Apparently build.xml wouldn't generate a correct
      manifest file:

        Main-Class: net.sf.jmoney.Start
        Class-Path: C:/JavaWork/lib/jasperreports-0.4.0.jar C:/JavaWork/lib/kunststoff-2.0.1.jar

      instead of

        Main-Class: net.sf.jmoney.Start
        Class-Path: lib/jasperreports-0.4.0.jar lib/kunststoff-2.0.1.jar

      The instruction <map from="${project.dir}/" to=""/> in the build.xml
      is not doing its job correctly....To patch that simply add  the following
      line :
            <map from="${project.dir}\&quot; to=""/>
        
      Resulting code:

        <target name="jar" depends="compile">   
          <!-- generate manifest -->
          <dirname property="project.dir" file="build.xml"/>
          <pathconvert property="classpath.mf"
                       dirsep="/"
                       pathsep=" "
                       refid="classpath">
            <map from="${project.dir}/" to=""/>
            <map from="${project.dir}\&quot; to=""/>               <-------- Modification
          </pathconvert>
          <copy file="Manifest"
                tofile="Manifest.build"
                overwrite="yes">
            <filterset>
              <filter token="CLASSPATH" value="${classpath.mf}"/>
            </filterset>
          </copy>

          <jar jarfile="jmoney.jar" basedir="${build}" manifest="Manifest.build"/>
        </target>

      I don't know if I'm the only one getting this problem, hope this
      will help.

      Alex

       
      • Johann Gyger

        Johann Gyger - 2003-03-04

        This is, of course, a bug. I took your fix into CVS.

        Thanks,
        Johann

         

Log in to post a comment.