Results 1 to 12 of 12
  1. PreGame's Avatar
    Posts
    540 Posts
    Global Posts
    550 Global Posts
       #1  
    I know you run java files via javahy however i cannot seem to get the .jar palmipc.jar to run which is located in /usr/lib/luna/java.

    Any ideas? I was trying to run the classpath -classpath tests.TextIpcClien
    tTest.testSync
  2. #2  
    You may have to put an explicit pointer to the JAR in your classpath. Not a pointer to the directory, but a specific pointer to the actual JAR. If you execute from the parent package directory that contains tests.TextIpcClientTest.testSync, you can just substitute . for that classname...and pickup other dependent files that may be in that hierarchy...unless that bad boy is in the JAR. If it is in the JAR, then just reference that JAR.

    Note: the above is based on my knowledge of Java. I haven't looked under the hood of the Pre yet so I am not familiar with the classes and JARs that you are referencing
    Last edited by scuba_steve; 06/12/2009 at 11:30 AM.
    IIIx -> Tungsten T -> Treo 650 -> Treo 700p -> Launch day Pre
  3. PreGame's Avatar
    Posts
    540 Posts
    Global Posts
    550 Global Posts
       #3  
    Quote Originally Posted by scuba_steve View Post
    You may have to put an explicit pointer to the JAR in your classpath. Not a pointer to the directory, but a specific pointer to the actual JAR. If you execute from the parent package directory that contains tests.TextIpcClientTest.testSync, you can just substitute . for that classname...and pickup other dependent files that may be in that hierarchy...unless that bad boy is in the JAR. If it is in the JAR, then just reference that JAR.

    Note: the above is based on my knowledge of Java. I haven't looked under the hood of the Pre yet so I am not familiar with the classes and JARs that you are referencing
    Do you have an example?
  4. #4  
    Quote Originally Posted by PreGame View Post
    Do you have an example?


    java -classpath /usr/lib/luna/java/palmipc.jar <xxxxx>


    Where <xxxxx> is the fully packaged name of a class in that JAR that you wish to run.

    Caveat - that class needs a public static main method...and if it has other non-standard imports, then you will need to find those and add them to the classpath as well. If the java binary throws an error about something else not being found, that's the clue that you need to add more to the classpath.
    IIIx -> Tungsten T -> Treo 650 -> Treo 700p -> Launch day Pre
  5. PreGame's Avatar
    Posts
    540 Posts
    Global Posts
    550 Global Posts
       #5  
    Quote Originally Posted by scuba_steve View Post
    java -classpath /usr/lib/luna/java/palmipc.jar <xxxxx>


    Where <xxxxx> is the fully packaged name of a class in that JAR that you wish to run.

    Caveat - that class needs a public static main method...and if it has other non-standard imports, then you will need to find those and add them to the classpath as well. If the java binary throws an error about something else not being found, that's the clue that you need to add more to the classpath.
    Awesome thanks!!! I had the command backwards, I was using javahy -classpath tests.blah.blah palmipc.jar


    Anyways now I'm getting

    Code:
    @@@@ ClassLibrary initialize begins...
    Harmony interface GetInitArgs() not implemented
    @@@@ ClassLibrary initialized... elapsed=385 ms
    java.lang.ClassNotFoundException: com/palm/oasis/util/ServiceLogger
            at com.palm.luna.textipc.TextIpcClient.<init>(Unknown Source)
            at com.palm.luna.textipc.TextIpcClient.<init>(Unknown Source)
            at tests.TextIpcClientTest.<init>(Unknown Source)
            at tests.TextIpcClientTest.main(Unknown Source)
    Edit: the command i ran was

    javahy -cp palmipc.jar tests.TextIpcClientTest
  6. #6  
    Looks like the program wants to log...and is trying to use a logging utility class called ServiceLogger, which is in the package com.palm.oasis.util ...and which can't be found.

    I don't have my Palm in dev mode and haven't looked at the file structure so I can't be of much help to tell you where that ServiceLogger class is...but I suggest the following:


    1) See if you can find a directory called classes...and see if it has a com directory in it. If so, drill down and see if you can find the class. If you do find it, then the "classes" directory also needs to go in your classpath. i.e.,

    javahy -classpath /usr/lib/luna/java/palmipc.jar;/???/???/classes/ tests.TextIpcClientTest

    Basically, wherever that com directory is needs to be in your classpath...NOT the lower-level directory that contains the class.


    2) If you can't find that class anywhere, then it is most likely in a JAR file. JAR files are essentially zip files. You can copy them to your PC, change their extension to zip, and look inside them. If the class is in one of them, then you add that JAR to the classpath.



    My best guess - the class is in a JAR called oasis.jar (assuming such a JAR file exists). if that's the case...and if that JAR is in the same directory with the other JAR, the command looks like this:

    javahy -classpath /usr/lib/luna/java/palmipc.jar;/usr/lib/luna/java/oasis.jar tests.TextIpcClientTest


    Of course, as I said, I am guessing because I don't have access to that file system.
    Last edited by scuba_steve; 06/12/2009 at 12:10 PM.
    IIIx -> Tungsten T -> Treo 650 -> Treo 700p -> Launch day Pre
  7. PreGame's Avatar
    Posts
    540 Posts
    Global Posts
    550 Global Posts
       #7  
    Ok, I found it in the same directory in the Utils.jar file

    javahy -cp palmipc.jar;Utils.jar tests.TextIpcClientTest

    is what is used (i also used the /usr/....... path as well and same results)

    Here is what I get.

    Code:
    Utils.jar: line 1: PK: not found
    Utils.jar: line 2: bÂ:: not found
    Utils.jar: line 3: syntax error: ")" unexpected
  8. PreGame's Avatar
    Posts
    540 Posts
    Global Posts
    550 Global Posts
       #8  
    It also lists the syntax again like it as invalid syntax and also displays the above error. It seems it doesn't like the ;
  9. #9  
    Quote Originally Posted by PreGame View Post
    Ok, I found it in the same directory in the Utils.jar file

    javahy -cp palmipc.jar;Utils.jar tests.TextIpcClientTest

    is what is used (i also used the /usr/....... path as well and same results)

    Here is what I get.

    Code:
    Utils.jar: line 1: PK: not found
    Utils.jar: line 2: bÂ:: not found
    Utils.jar: line 3: syntax error: ")" unexpected
    My bad. Linux (bangs head). Replace the semicolon in the classpath with a colon.
    IIIx -> Tungsten T -> Treo 650 -> Treo 700p -> Launch day Pre
  10. #10  
    Quote Originally Posted by PreGame View Post
    It also lists the syntax again like it as invalid syntax and also displays the above error. It seems it doesn't like the ;
    Crosspost. You owe me a coke.
    IIIx -> Tungsten T -> Treo 650 -> Treo 700p -> Launch day Pre
  11. PreGame's Avatar
    Posts
    540 Posts
    Global Posts
    550 Global Posts
       #11  
    That did it! Now i am getting a connection error which is probably do to the service not running or something. I'll have to look into it.

    java.lang.Exception: Did not connect to server successfully.
    at tests.TextIpcClientTest.<init>(Unknown Source)
    at tests.TextIpcClientTest.main(Unknown Source)


    Now we are getting somewhere!!!

    Thanks!
  12. #12  
    Quote Originally Posted by PreGame View Post
    java.lang.Exception: Did not connect to server successfully.
    at tests.TextIpcClientTest.<init>(Unknown Source)
    at tests.TextIpcClientTest.main(Unknown Source)


    Now we are getting somewhere!!!

    Thanks!
    Now that's a good problem. Looks like it is now working, but that it just can't connect to the server. Too bad there wasn't more info, but given that they are using the logging class noted above, perhaps there is a text-based log file with more info somewhere on the device. If so, you might be able to determine (and verify) the IP address and port that it was trying to hit...or if it doesn't have that info (which would be a bigger problem).

    You might also be able to find a logging config file and drop the logging priority level down to DEBUG to get a better picture of what it is trying to do.

    Anyway, back to the day job for me. Good luck!
    IIIx -> Tungsten T -> Treo 650 -> Treo 700p -> Launch day Pre

Posting Permissions