Giter VIP home page Giter VIP logo

Comments (5)

savelandr avatar savelandr commented on July 22, 2024

Actually, a simpler demonstration that doesn't require launching the JVM with JMX available:

test.rb:

require 'jmx'

Java::Sun
puts JMX::MBeans.parent_for "sun.something.SomethingElse"

JRuby 1.7:

$ rbenv global jruby-1.7.14 
$ ruby test.rb 
JMX::MBeans::Sun::Something
SomethingElse

JRuby 9000:

$ rbenv global jruby-9.0.3.0 
$ ruby test.rb 
ArgumentError: Java package `sun' does not have a method `const_set'
       method_missing at uri:classloader:/jruby/java/java_package_module_template.rb:13
  block in parent_for at /home/saveland/.rbenv/versions/jruby-9.0.3.0/lib/ruby/gems/shared/gems/jmx-0.9/lib/jmx/mbeans.rb:20
                 each at org/jruby/RubyArray.java:1560
               inject at org/jruby/RubyEnumerable.java:895
           parent_for at /home/saveland/.rbenv/versions/jruby-9.0.3.0/lib/ruby/gems/shared/gems/jmx-0.9/lib/jmx/mbeans.rb:12
                <top> at test.rb:4

from jmx.

tobias avatar tobias commented on July 22, 2024

I'm not sure if it's the same issue, but #16 may fix this as well.

from jmx.

enebo avatar enebo commented on July 22, 2024

@tobias @savelandr sure seems like the same issue you had.

from jmx.

savelandr avatar savelandr commented on July 22, 2024

@tobias @enebo

Yup, this does fix it. I tried the simple example as well as running Ruby with JMX enabled so the test connects to itself. Thanks!

from jmx.

enebo avatar enebo commented on July 22, 2024

@savelandr thanks for checking!

from jmx.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.