RJB - getting NoClassDefFoundError on import of JAVA class

Discussion in 'Ruby' started by Anukul Singhal, Sep 12, 2010.

  1. Hi,

    I am using rjb gem, and trying to import a JAVA class. The JAVA API
    documentation is located at:

    http://www.jarvana.com/jarvana/view...r!/com/jayway/android/robotium/solo/Solo.html

    I have installed jdk, and installed the relevant jar files, and using
    the following code:

    require 'rjb'

    c =
    "c:/robotium/robotium-solo-1.7.1.jar;c:/robotium/robotium-solo-1.7.1-javadoc.jar"
    Rjb::load(classpath = c, jvmargs=[])
    @rapi = Rjb::import('com.jayway.android.robotium.solo.Solo')
    puts "robotium_class=#{@rapi.inspect}"

    But, it fails to import this class, and throws the following error:

    >ruby test_robotium.rb

    test_robotium.rb:11:in `import': android/view/View
    (NoClassDefFoundError)
    from test_robotium.rb:11
    >Exit code: 1


    Any help on this would be appreciated. To download the relevant jar
    files, goto http://code.google.com/p/robotium/downloads/list

    Thanks,
    Anukul
    --
    Posted via http://www.ruby-forum.com/.
     
    Anukul Singhal, Sep 12, 2010
    #1
    1. Advertising

  2. Anukul Singhal

    arton Guest

    Hi

    I believe your path string need to escape the path separator.
    eg)
    c =
    "c://robotium//robotium-solo-1.7.1.jar;c://robotium//robotium-solo-1.7.1-javadoc.jar"

    Please try above setting.

    --
    arton <>

    --------------------------------------
    GyaO! - Anime, Dramas, Movies, and Music videos [FREE]
    http://pr.mail.yahoo.co.jp/gyao/
     
    arton, Sep 12, 2010
    #2
    1. Advertising

  3. arton wrote:
    > Hi
    >
    > I believe your path string need to escape the path separator.
    > eg)
    > c =
    > "c://robotium//robotium-solo-1.7.1.jar;c://robotium//robotium-solo-1.7.1-javadoc.jar"
    >
    > Please try above setting.
    >
    > --
    > arton <>


    Hi Arton,

    Thanks for the response. But I get the same error.

    I believe the escape sequence would be required if I use "\" (back
    slash), for "/" (forward slash), dont think we need to provide an extra
    "/".

    Let me know if there is any other setting I am missing.

    Thanks,
    Anukul
    --
    Posted via http://www.ruby-forum.com/.
     
    Anukul Singhal, Sep 12, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    2,179
    Irmen de Jong
    Jun 22, 2004
  2. Adam Keys

    rjb and Java 1.5

    Adam Keys, Mar 10, 2006, in forum: Ruby
    Replies:
    0
    Views:
    109
    Adam Keys
    Mar 10, 2006
  3. raf
    Replies:
    0
    Views:
    121
  4. Wes Gamble
    Replies:
    1
    Views:
    147
    MenTaLguY
    Mar 7, 2007
  5. Anukul Singhal
    Replies:
    0
    Views:
    164
    Anukul Singhal
    Mar 9, 2010
Loading...

Share This Page