Jenkins build :: compileDebugKotlin FAILED

Dear All,
I have one kotlin class KotlinClassB.kt which access Java class JavaClassA.java private field through getter method. In kotlin, we usually access java getter method like javaClassAObj.name where name is the private field in JavaClassA and I wrote getter for that like public String getName() {return name;}

Now, I after triggering jenkins build job its always failing and giving error like
Cannot access ‘name’: it is private in ‘JavaClassA’.

So, can you please help me in this regard.