             o 'compareAndSetState(II)Z', (rs) -> rs.push 1 # always true
             o 'release(I)Z', (rs) -> rs.push 1 # always true
           ]
+      ResourceBundle: [
+        o 'getBundle(Ljava/lang/String;Ljava/util/Locale;Ljava/util/ResourceBundle$Control;)Ljava/util/ResourceBundle;', (rs) ->
+            # load in the right ResourceBundle based on the locale
+            args = rs.curr_frame().locals
+            base = rs.jvm2js_str(rs.get_obj(args[0]))
+            locale = rs.get_obj(args[1])
+            lang = rs.jvm2js_str(rs.get_obj(locale.fields.language))
+            classname = util.int_classname "#{base}_#{lang}"
+            rs.push (b_ref = rs.init_object classname)
+            rs.method_lookup({class: classname, sig: {name:'<init>',type:'()V'}}).run(rs)
+            rs.push b_ref
+      ]
     nio:
       charset:
         Charset$3: [

        debug "#{padding}stack: [#{pa cf.stack}], local: [#{pa cf.locals}]"
        annotation =
          util.lookup_handler(opcode_annotators, op, pc, rs.class_lookup(@class_name).constant_pool) or ""
        debug "#{padding}#{@name}:#{pc} => #{op.name}" + annotation
        op.execute rs
        rs.inc_pc(1 + op.byte_count)  # move to the next opcode
      catch e

      Unsafe: [
        o 'getUnsafe()L!/!/!;', (rs) -> # avoid reflection
            rs.static_get({'class':'sun/misc/Unsafe','sig':{'name':'theUnsafe'}})
      ]
    util:
      LocaleServiceProviderPool: [
        o 'getPool(Ljava/lang/Class;)Lsun/util/LocaleServiceProviderPool;', (rs) -> 
            # make a mock
            rs.push rs.init_object 'sun/util/LocaleServiceProviderPool'
        o 'hasProviders()Z', (rs) -> rs.push 0  # false, we can't provide anything
      ]
  
doPrivileged = (rs) ->
