Neroku <> writes:
> Alan Krueger ha escrito:
>> Neroku wrote:
>> > It compiles fine, but when I run the B main method I get the following
>> > error:
>> >
>> > IllegalAccessException: Class
>> > koala.dynamicjava.interpreter.EvaluationVisitor can not access a member
>> =================
>> > of class Bp.B with modifiers "public static"
>> > at sun.reflect.Reflection.ensureMemberAccess(Unknown Source)
>> > at java.lang.reflect.Method.invoke(Unknown Source)
>> >
>> > I do not acces any member of class Bp.B, Any ideas??
>>
>> The "B main method" is a public static member of class Bp.B, so yes,
>> you're trying to access a method on Bp.B.
> So, I can't run the main method because the B class is not public, and
> therefore the class that call the main method in B is unable to access
> to it because both clases are not in the same package.
> This explains the runtime error I get, right?
Of course not.
(debian-unstable)jtocancipa@golem:~/tmp$ javac Ap/A.java
(debian-unstable)jtocancipa@golem:~/tmp$ javac Bp/B.java
(debian-unstable)jtocancipa@golem:~/tmp$ java Bp/B
From A.foo()
--
-- Jhair
|