Greetings,
I'm a beginner in Java and also Javassist. It's a very great tool. 

I have a question. Currently I'm trying to learn Javassist by following the tutorial 
provided by Mr.Chiba and I encountered few problems.

1- The ClassPool failed to locate the proper class file unless I specify the full path 
of the class location, eg -> ./build/classes/com/org/solution/....
--------------------------------------------------------------------
Below is my code :
ClassPool pool = ClassPool.getDefault();

pool.insertClassPath("./build/classes/com/org/solution/javaAssist/test");

CtClass clas = pool.get("StringBuilder");
--------------------------------------------------------------------
Is there any other more convenient way? For example, to make the classLoader 
automatically refer to the path where I put my compiled classes.

2- When I call writeFile(), it will write the modified file into the root directory. 
Again, is there any other way besides explicitly put the destination where I want to 
put the newly modified file by calling writeFile(java.lang.String directoryName).

3- Pruning and Frozen. What does these 2 mean? I know frozen means you can no longer 
modify the class whereas pruning is you can no longer read or load it. Is my 
assumption correct?

Hope you guys can help. I've tried to read through the forum, but I really need help 
quite urgently for my project. 
Thanks in advance.


Cheers,
Alvin Lim 
* someone who has only 3 months working experience ;) *


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3851837#3851837

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3851837


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to