don't use backslashes to specify class package names.

you should be able to use package syntax

prova.Prova

or

internal format syntax

prova/Prova


----- Original Message ----- From: <[EMAIL PROTECTED]>
To: "BCEL Users List" <[email protected]>
Sent: Thursday, February 23, 2006 12:53 PM
Subject: problems with the Repository


Hello.
I have same problems with the Repository of bcel.
I would like to load a class received by command line
to change its bytecode.
Actually my project load correctly the class files if
they are in the same directory of my program, but I
got a NullPointerException if I try to load a class in
another directory.

My source code is the following:
...
if(!new File(classFileName+".class").isFile()) System.out.println("The file doesn't exists");
else {
 JavaClass clazz =
Repository.lookupClass(classFileName);
 Method[] methods = clazz.getMethods();
...

If, for example, classFileName == prova\Prova, I'm
sure that the file exists for the if clause, but the
command lookupClass fail the load and return null.

Someone can help me?

Thanks.


---------------------------------
Debendetti Emanuele
sanremo.too.it






___________________________________ Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB http://mail.yahoo.it

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to