cannot ./run_j2se.sh

Help
2009-03-26
2013-05-02
  • Frieder Ferlemann

    Hi,

    I just did a fresh svn checkout and apparently I'm stuck:

    README.txt suggests to launch the script run_j2se.sh  . Which is unlikely to work because its executable flag is not set. Working around by either "chmod ugo+x ./run_j2se.sh" or "sh run_j2se.sh" this gets me to:

    "Unable to access jarfile ./dist/BT747_j2se.jar
    ./run_j2se.sh: line 28: [: =: unary operator expected
    Unable to access jarfile ./dist/BT747_j2se.jar".

    I might be missing something obvious but the INSTALLATION section of README.txt doesn't get me going. And there is neither an INSTALL.txt, a Makefile or ./configure .  I did dive into the ./doc and the ./doc/Development directory but couldn't find something related. What am I doing wrong?

    Greetings,
    Frieder

    (openSUSE 11.0)

     
    • Mario De Weerd

      Mario De Weerd - 2009-03-26

      Hi Frieder
      To set a context: I develop on windows using Eclipse as my main tool.

      I also have cygwin where the run_j2se.sh has the executeable flags set, but I guess that svn on windows does not translate that to a good setting in the svn synchronisation.

      The svn database does not have the built binaries (which is logical) and hence you need to build or get a build.

      The build script is an 'ant' script named 'build.xml'.  The minimum is to build the 'dist.j2se' target here.  It should be possible to run that independently of eclipse (I can do it in netbeans too for example).  I did not look into that specifically.

      To build everything, use 'all'. (I use 'all.package' which calls a local script 'package.bat'  to zip and upload the build).

      Finally, I do my work in my 'branch' which I release from time to time to the trunk.  I just made a new release so that you can refer to the current run_j2se.sh.
      For more efficient run_j2se.sh debugging, you need to set the first line of the script to:
      #/bin/sh -vx

      I am willing to help out in getting you to build this, I'ld like you to document what has to be done.  Where needed, I'll update build scripts, etc., or even add new scripts (like a build script outside eclipse).

      In principle, one would open this as a project in eclipse or netbeans and build it from there.

       
      • Frieder Ferlemann

        Hi Mario,

        thanks for the quick answer! And to my context: I'm a complete java noop... so the best I can expect is that I might succeed:)

        > I'ld like you to document what has to be done.

        Fine - as I didn't have a java development environment I started with installing "ant - A Java-Based Build Tool" (a search in the software installation tool turned it up) which got me to:

        "
        fe@lake:~/bt747/BT747> ant build.xml
        Unable to locate tools.jar. Expected to find it in
        /usr/lib/jvm/java-1.6.0-sun-1.6.0/lib/tools.jar
        Buildfile: build.xml

        BUILD FAILED
        Target "build.xml" does not exist in the project "BT747".

        Total time: 0 seconds
        "

        then I installed "java-1_6_0-sun-devel - Java(TM) 6 SDK, Standard Edition" and used a slightly more useful command:

        "
        fe@lake:~/bt747/BT747> ant dist.j2se
        Buildfile: build.xml

        build.j2seapp:

        dist.libj2se:

        rxtxbuild:
           [delete] Deleting directory /home/fe/bt747/BT747/build/rxtxbuild
            [mkdir] Created dir: /home/fe/bt747/BT747/build/rxtxbuild
            [mkdir] Created dir: /home/fe/bt747/BT747/build/rxtxbuild/rxtxsrc

        BUILD FAILED
        /home/fe/bt747/BT747/build.xml:267: The following error occurred while executing this line:
        /home/fe/bt747/BT747/build.xml:592: The following error occurred while executing this line:
        /home/fe/bt747/BT747/build.xml:149: The following error occurred while executing this line:
        /home/fe/bt747/BT747/build.xml:839: Problem: failed to create task or type echoproperties
        Cause: the class org.apache.tools.ant.taskdefs.optional.EchoProperties was not found.
                This looks like one of Ant's optional components.
        Action: Check that the appropriate optional JAR exists in
                -/usr/share/ant/lib
                -/home/fe/.ant/lib
                -a directory added on the command line with the -lib argument

        Do not panic, this is a common problem.
        The commonest cause is a missing JAR.

        This is not a bug; it is a configuration problem

        Total time: 3 seconds
        "

        so maybe my problem is now where to get those EchoProperties.
        The package manager on my system did turn up a few hits for "ant" or "apache" but none for EchoProperties (also when "RPM provides" is enabled) and I didn't want to install them all just to try to satisfy that dependency. A google search turned up the site: "http://api.dpml.net/ant/1.6.5/org/apache/tools/ant/taskdefs/optional/EchoProperties.html" but this leaves me clueless about which package to install...

        Greetings,
        Frieder

         
        • Frieder Ferlemann

          sorry for posting again this quick, installed "ant-nodeps - Optional tasks for ant" which gets me a little further:

          "
          fe@lake:~/bt747/BT747> ant dist.j2se
          Buildfile: build.xml

          build.j2seapp:

          dist.libj2se:

          rxtxbuild:
             [delete] Deleting directory /home/fe/bt747/BT747/build/rxtxbuild
              [mkdir] Created dir: /home/fe/bt747/BT747/build/rxtxbuild
              [mkdir] Created dir: /home/fe/bt747/BT747/build/rxtxbuild/rxtxsrc
          [echoproperties] #Ant properties
          [echoproperties] #Thu Mar 26 23:53:51 CET 2009
          [echoproperties] no.waba=yes
               [echo]
               [echo]                 Project: BT747 (/home/fe/bt747/BT747)
               [echo]                 Build file: /home/fe/bt747/BT747/build.xml
               [echo]                 Java: 1.6.0_12 Sun Microsystems Inc.
               [echo]                 OS: Linux 2.6.25.20-0.1-pae i386
               [echo]                 ${ant.version} (Java: 1.6)
               [echo]                 SVN: BT747.1110
               [echo]                 Time: 26.03.2009 23:53:51
               [echo]
             [delete] Deleting directory /home/fe/bt747/BT747/build/rxtxbuild/rxtxsrc
               [copy] Copying 207 files to /home/fe/bt747/BT747/build/rxtxbuild/rxtxsrc
            [replace] Replaced 1 occurrences in 0 files.
               [echo] src_waba/bt747/waba_view/AppController.java
            [replace] Replaced 26 occurrences in 0 files.
          [echoproperties] #Ant properties
          [echoproperties] #Thu Mar 26 23:53:52 CET 2009
          [echoproperties] exclude.waba=true
          [echoproperties] #Ant properties
          [echoproperties] #Thu Mar 26 23:53:52 CET 2009
          [echoproperties] is.j2se=true
          [echoproperties] is.lib=true
              [javac] Compiling 86 source files to /home/fe/bt747/BT747/build/rxtxbuild

          BUILD FAILED
          /home/fe/bt747/BT747/build.xml:267: The following error occurred while executing this line:
          /home/fe/bt747/BT747/build.xml:592: The following error occurred while executing this line:
          /home/fe/bt747/BT747/build.xml:149: The following error occurred while executing this line:
          /home/fe/bt747/BT747/build.xml:891: Unable to find a javac compiler;
          com.sun.tools.javac.Main is not on the classpath.
          Perhaps JAVA_HOME does not point to the JDK.
          It is currently set to "/usr/lib/jvm/java-1.6.0-sun-1.6.0/jre"

          Total time: 2 seconds
          "

          The message "Unable to find a javac compiler" looks strange because:
          > which javac
          /usr/bin/javac
          tells that it is in the path and where it can reasonably be expected. (probably still the java development environment is not properly set up... )

          Greetings,
          Frieder

           
          • Frieder Ferlemann

            I promise not to post again for the next few hours!

            logged out and logged in again, so the environment variable JAVA_HOME is now at JAVA_HOME=/usr/lib/jvm/java so some files get compiled.
            It's now stuck at file which has "c:" in its path:

            "
            fe@lake:~/bt747/BT747> ant dist.j2se
            Buildfile: build.xml

            build.j2seapp:

            dist.libj2se:

            rxtxbuild:
               [delete] Deleting directory /home/fe/bt747/BT747/build/rxtxbuild
                [mkdir] Created dir: /home/fe/bt747/BT747/build/rxtxbuild
                [mkdir] Created dir: /home/fe/bt747/BT747/build/rxtxbuild/rxtxsrc
            [echoproperties] #Ant properties
            [echoproperties] #Fri Mar 27 00:08:31 CET 2009
            [echoproperties] no.waba=yes
                 [echo]
                 [echo]                 Project: BT747 (/home/fe/bt747/BT747)
                 [echo]                 Build file: /home/fe/bt747/BT747/build.xml
                 [echo]                 Java: 1.6.0_12 Sun Microsystems Inc.
                 [echo]                 OS: Linux 2.6.25.20-0.1-pae i386
                 [echo]                 ${ant.version} (Java: 1.6)
                 [echo]                 SVN: BT747.1110
                 [echo]                 Time: 27.03.2009 00:08:31
                 [echo]
               [delete] Deleting directory /home/fe/bt747/BT747/build/rxtxbuild/rxtxsrc
                 [copy] Copying 207 files to /home/fe/bt747/BT747/build/rxtxbuild/rxtxsrc
              [replace] Replaced 1 occurrences in 0 files.
                 [echo] src_waba/bt747/waba_view/AppController.java
              [replace] Replaced 26 occurrences in 0 files.
            [echoproperties] #Ant properties
            [echoproperties] #Fri Mar 27 00:08:32 CET 2009
            [echoproperties] exclude.waba=true
            [echoproperties] #Ant properties
            [echoproperties] #Fri Mar 27 00:08:32 CET 2009
            [echoproperties] is.j2se=true
            [echoproperties] is.lib=true
                [javac] Compiling 86 source files to /home/fe/bt747/BT747/build/rxtxbuild
                 [copy] Copying 1 file to /home/fe/bt747/BT747/build/rxtxbuild
                 [copy] Copied 2 empty directories to 1 empty directory under /home/fe/bt747/BT747/build/rxtxbuild

            rxtxjar:
               [delete] Deleting: /home/fe/bt747/BT747/MANIFEST.MF
                  [jar] Building jar: /home/fe/bt747/BT747/build/rxtxbuild/BT747_j2se_libtmp.jar
                 [copy] Copying 1 file to /home/fe/bt747/BT747/build/rxtxbuild

            proguard.rxtx_task:
                 [move] Moving 1 file to /home/fe/bt747/BT747/build/rxtxbuild
            [proguard] ProGuard, version 4.3
            [proguard] Reading input...
            [proguard] Reading program jar [/home/fe/bt747/BT747/build/rxtxbuild/BT747_j2se_libtmp_unopt.jar]
            [proguard] Reading library jar [/usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/lib/rt.jar]
            [proguard] Reading library jar [/home/fe/bt747/BT747/lib/collections-superwaba.jar]
            [proguard] Reading library jar [/home/fe/bt747/BT747/lib/swingx.jar]
            [proguard] Reading library jar [/home/fe/bt747/BT747/lib/swingx-ws.jar]
            [proguard] Reading library jar [/home/fe/bt747/BT747/lib/rxtx-2.1-7-bins-r2/RXTXcomm.jar]
            [proguard] Reading library jar [/home/fe/bt747/BT747/c:/SuperWabaSDK/lib/SuperWaba.jar]

            BUILD FAILED
            /home/fe/bt747/BT747/build.xml:267: The following error occurred while executing this line:
            /home/fe/bt747/BT747/build.xml:592: The following error occurred while executing this line:
            /home/fe/bt747/BT747/build.xml:149: The following error occurred while executing this line:
            /home/fe/bt747/BT747/build.xml:679: Can't read [/home/fe/bt747/BT747/c:/SuperWabaSDK/lib/SuperWaba.jar] (No such file or directory)

            Total time: 11 seconds
            "

            Greetings,
            Frieder

             
            • Mario De Weerd

              Mario De Weerd - 2009-03-26

              I was working on my tax declaration which requires all my attention so I did not notice all your messages here.
              It seems that you got forward quite well.

              You are now at a point where you should create a file called 'local.properties' where you can override settings in 'default.properties'.

              I use the Superwaba SDK, but that is not really needed to just build J2SE, so I changed the build.xml to refer to the Waba_only.jar that is in the project 'lib' path which is good enough for all builds anyway.  It should help to get further - I updated the SVN version in the trunk.  I am still building, but the J2SE build part works (currently building the PDA version using the changed build.xml).

              My local.properties looks like this, but you should not set all that (just to give an idea):
              user.email = m.deweerd@ieee.org
              user.name = Mario De Weerd
              do.upload = true
              do.package = true
              keytool.keystore=../myKeystore
              keytool.passwd = mypassword
              keytool.alias = myself
              keytool.sign = true
              #build.current.version=trial
              #build.current.revision=trial
              svnversion=c:\\cygwin\\bin\\svnversion
              svn=c:\\cygwin\\bin\\svn

              #superwaba_root=c:\\noSuperWaba
              #skip.proguard=true
              #proguard.java.rt.lib= ${java.home}/lib/rt.jar
              #obfuscate=false

              #skip.proguard=true
              proguard.activateoptimization=true
              proguard.obfuscate=${proguard.activateoptimization}
              proguard.accessmodification=${proguard.activateoptimization}
              proguard.shrink=${proguard.activateoptimization}
              proguard.optimize=${proguard.activateoptimization}
              proguard.overload=${proguard.activateoptimization}
              proguard.flatten=${proguard.activateoptimization}
              proguard.repackage=${proguard.activateoptimization}
              proguard.optimizationpasses=4

              #java.optimize=false
              #java.debug=true

              #wabalang.uptodate=

               
              • Mario De Weerd

                Mario De Weerd - 2009-03-27

                I had an issue in the PDA build following the changes, but I fixed that - no impact for you there (update SVN trunk with updated build.xml).
                Result: referencing the project's Waba_only.jar in most places, except when I really need the SDK jar.

                 
                • Frieder Ferlemann

                  Hi and thanks!

                  I can confirm that "ant dist.j2se"  builds fine with Revision 1139 :)
                  And the application starts both with "sh ./run_j2se.sh" and "java -jar dist/BT747_j2se.jar".

                  Not having a logger yet I cannot test much more. Except maybe trying to build "ant all", which mostly seems to build:)
                  The build fails after about a minute with the first message being:

                  "
                  warp:
                       [java] Exception in thread "main" java.lang.NoClassDefFoundError: superwaba/tools/Warp
                       [java] Caused by: java.lang.ClassNotFoundException: superwaba.tools.Warp
                       [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
                       [java]     at java.security.AccessController.doPrivileged(Native Method)
                       [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
                       [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
                       [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
                       [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
                       [java]     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
                       [java] Could not find the main class: superwaba.tools.Warp.  Program will exit.
                       [java] Java Result: 1
                  "
                  skipping some similar superwaba messages for exegen, exegen-exe and exegen-cab "[java] Could not find the main class: superwaba.tools.Exegen.  Program will exit."

                  the last message then is:
                  "
                  all-warp:

                  BUILD FAILED
                  /home/fe/bt747/BT747/build.xml:1326: Warning: Could not find file /home/fe/bt747/BT747/build/BT747.pdb to copy

                  Total time: 1 minute 14 seconds
                  "

                  Greetings and thanks again,
                  Frieder

                   
                  • Mario De Weerd

                    Mario De Weerd - 2009-03-27

                    If you want to do the full build, you need to get the SuperWabaSDK.

                    You can probably build 'dist.rxtx' which enables you to run the PDA-like version on a desktop.

                    For the rest this is good news because building is now easier to set up.

                    Can you create a BUILD document with instructions on what to install to build and how to build?  I'll add it to the distribution.

                     
                    • Frieder Ferlemann

                      > You can probably build 'dist.rxtx' which enables you to run the PDA-like version on a desktop.

                      "ant dist.rxtx" says "BUILD SUCCESSFUL" but there were some notes:
                      [proguard] Note: the configuration refers to the unknown class 'gps.log.in.GPSLogConvert'
                      [proguard] Note: the configuration refers to the unknown class 'net.sf.bt747.j2se.system.J2SEGeneric'
                      [proguard] Note: the configuration refers to the unknown class 'bt747.j2se_view.BT747'

                      > If you want to do the full build, you need to get the SuperWabaSDK.

                      I'm not sure whether I'm looking at the right places,
                      http://www.superwaba.org directs me to a site where I'd have to register and sourceforge:
                      https://sourceforge.net/project/showfiles.php?group_id=16623&package_id=20503&release_id=653461
                      offers (while claiming to be Platform-Independent) a file "GPL_SuperWabaSDK.exe", which is obviously not what I'm looking for:

                      fe@lake:/tmp> file GPL_SuperWabaSDK.exe
                      GPL_SuperWabaSDK.exe: MS-DOS executable PE  for MS Windows (GUI) Intel 80386 32-bit

                      > Can you create a BUILD document
                      I'll try to.

                      Greetings,
                      Frieder

                       
    • Frieder Ferlemann

      have an i-Blue 747 now so could do some real tests with run_rxtx.sh  (built from Revision 1146).

      Application starts up nicely and I can connect to the device via USB  but there seem to be filename quirks left:

      File names/directories in the file panel have prepended a character which shows as an empty rectangle. These can be removed by editing the filenames but each "Apply & Set the above values" prepends the LogFile with another empty rectangle. Unfortunately I cannot reproduce it now but with 1139 I was once able to get a log file by creating a directory 000F (000F might be the empty rectangle character).

      With 1146 and using strace I see messages like:
      19959 open("/home/fe/BT747", O_RDWR|O_CREAT|O_LARGEFILE, 0666) = -1 EISDIR (Is a directory)
      when trying to get a log. (Presumably the full filename is truncated).

      Please let me know if I can provide further info.

      Greetings,
      Frieder

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks