# Unable to access non final static variables?

**URL:** <https://www.ruby-forum.com/t/unable-to-access-non-final-static-variables/194742>\
**Category:** JRuby\
**Created:** [September 9, 2010, 8:02pm UTC](https://www.ruby-forum.com/t/unable-to-access-non-final-static-variables/194742 "2010-09-09T20:02:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [September 9, 2010, 8:02pm UTC](https://www.ruby-forum.com/t/unable-to-access-non-final-static-variables/194742/1 "2010-09-09T20:02:24Z")

</div>

Hi all.  
Noticed this:  
load\_em.rb:47: uninitialized constant  
Java::OrgFamilysearchDigitalarchiveTapeingestreader::TapeIngestConstants::CONFIG\_FILE\_PATH  
(NameError)

the string attempted to be accessed in question looks like this:

public class TapeIngestConstants {  
static String CONFIG\_FILE\_PATH = “/etc/opt/das/tapeingestreader.cfg”;  
}

Is this expected? (I had to make it final or it was no longer accessible  
in Ruby-- non-final static variables don’t seem to work).

Thanks!  
-r

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [September 9, 2010, 8:37pm UTC](https://www.ruby-forum.com/t/unable-to-access-non-final-static-variables/194742/2 "2010-09-09T20:37:45Z")

</div>

And another oddity:

With this method:

public class DasServiceClientImpl2 {

private ApiConnection setupCopyOfConnectionForThreadSafety() {  
}  
}

I’m able to see it _and call it_ from within jruby with no warnings.  
Shouldn’t it be invisible, or be listed as a private method instead, or  
what not?  
-r
