Loading ...
Sorry, an error occurred while loading the content.

Trying to run .jar files from i386 on unslung

Expand Messages
  • Drew Gibson
    I am trying to run a java application from a 3rd party on my slug (Firmware Version: V2.3R63-uNSLUng-6.8-beta). The app runs fine on an i386 machine but on
    Message 1 of 2 , Apr 2, 2009
    • 0 Attachment
      I am trying to run a java application from a 3rd party on my slug
      (Firmware Version: V2.3R63-uNSLUng-6.8-beta).

      The app runs fine on an i386 machine but on the slug I get errors.

      Both jamvm and cvm (from the phoneme-advanced package) as per the wiki

      jamvm produces the error:-

      Exception in thread "main" java.lang.NoClassDefFoundError:
      com/grandstream/cmd/TextEncoder
      <<No stacktrace available>>
      Caused by: java.lang.ClassNotFoundException:
      com.grandstream.cmd.TextEncoder not found in
      java.lang.ClassLoader$1{urls=[], parent=null}
      at java.net.URLClassLoader.findClass(URLClassLoader.java:529)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:341)
      at java.lang.ClassLoader$1.loadClass(ClassLoader.java:1112)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:293)

      The .jar is in the classpath for sure.


      I tried cvm, which seems to go further but also gives errors:

      java.lang.NoClassDefFoundError: javax.crypto.spec.IvParameterSpec
      at
      com.grandstream.util.oOoOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.super(Unknown
      Source)
      at
      com.grandstream.oOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.super(Unknown
      Source)
      at com.grandstream.cmd.TextEncoder.main(Unknown Source)
      at sun.misc.CVM.runMain(Unknown Source)


      When I try to list the contents of the .jar file with unzip on the slug,
      there is an error:

      slug:/opt/var/ast/phones/temp# unzip -l gapslite.jar
      Archive: gapslite.jar
      Length Date Time Name
      -------- ---- ---- ----
      unzip: Invlaide zip magic

      If I copy the file back to an i386 system and try the same trick, unzip
      is successful to a point but the contents cannot be extracted as the
      .jar has been "obfuscated" with something called yGuard (that's where
      all the "O"s come from, I presume).


      It looks to me like jamvm is just unable to deal with the .jar file
      format (endian-ness?) but that cvm can read the .jar and is able to get
      further but chokes on the decryption of the "obfuscation". Or perhaps
      the same issue is just handled differently by each vm.

      I would very much appreciate input from someone who knows a little more
      than I do about java and the NSLU2 as to my next step.

      regards,

      Drew
    • David Powell
      When executing programs directly from a JAR file, the environment classpath is ignored. The classpath has to be in the JAR s manifest file. There should be a
      Message 2 of 2 , Apr 3, 2009
      • 0 Attachment
        When executing programs directly from a JAR file, the environment classpath is ignored.  The classpath has to be in the JAR's manifest file. There should be a line in there like:

        Class-Path: dir1 dir2 otherjar.jar somefile.zip

        Note that the entries are separated by a single space.  There's a line length maximum too, somewhere around 70 or so characters.  If your classpath is longer than that, resume it indented on the next line.

        This was one of the hardest things to figure out the first time I ran into it.

        David
        -- 
        . 
        ------------------------------ 
        Random Quote of the Day:  
        Borg? Where? I don't see any {~~fds{{ NO CARRIER
        ------------------------------ 
        
      Your message has been successfully submitted and would be delivered to recipients shortly.