Question: I'm having an issue where I can see the fields of a Java class/object, but I can't actually access them. I can see the fields in two ways. Using this following code.

```
=>(require '[clojure.reflect :as r])    
=>(use '[clojure.pprint :only [print-table]])    
=>(print-table (sort-by :name (:members (r/reflect  myClass))))

```

And also, by creating an instance of the object. Let's say the fields are an int denoted a, a string denoted word , and a String ArrayList denoted mylist.

```
=>myObj
#<myClass 1 hello [world]>

```

In both cases, I can see that these fields exist. However, when I run the following code, I get the following error.

```
=>(. myObj mylist)
IllegalArgumentException No matching field found: mylist for class myClass clojure.lang.Reflector.getInstanceField (Reflector.java:271)

```

Does anyone have any idea what is going on?

---

In response to Nicolas Modrzyk's answer, I run (.-myFieild myObject) and get 
 IllegalArgumentException No matching field found: myField for class myClass clojure.lang.Reflector.invokeNoArgInstanceMember (Reflector.java:308)

Additionally, these fields are not private. I have the Java source code in front of me.

Answer: 
The correct notation for [accessing java fields](http://clojure.org/java_interop) is slightly different:

```
   (.-fieldName instance)

```

Here is a full example with the java class *File* and its private field *path*:

```
    (require '[clojure.reflect :as r])   
    (use '[clojure.pprint :only [print-table]])    

    (import '[java.io File])
    (def f (File. "test.txt"))

    ; access a public static field
    (. File separator)
    ; "/"

    (print-table 
      (sort-by :name (:members (r/reflect  File))))

    (.-path f)
    ; java.lang.IllegalArgumentException: 
    ; No matching field found: path for class java.io.File

    (def field (.getDeclaredField File "path"))
    ; you need the below if the field is private
    (.setAccessible field true)

    ; get the value
    (.get field f)
    ; "test.txt"

```
Thumbnail's comment was correct. I wasn't aware of Java's default access being package. I have since accessed the fields through reflection. Thank you everyone for your help.