From 134ee70a9fd4959cbf6b9b6f3b9d1498247ec1e5 Mon Sep 17 00:00:00 2001 From: chiba Date: Sat, 5 Jun 2004 16:05:18 +0000 Subject: Changed subclasses of javassist.expr.Expr so that $_ is always initialized. git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@109 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- tutorial/tutorial.html | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'tutorial/tutorial.html') diff --git a/tutorial/tutorial.html b/tutorial/tutorial.html index ce0a40cf..6c260011 100644 --- a/tutorial/tutorial.html +++ b/tutorial/tutorial.html @@ -106,7 +106,27 @@ byte[] b = cc.toBytecode();

The default ClassPool returned by a static method ClassPool.getDefault() searches the same path that the underlying JVM (Java virtual machine) has. -The users can expand this class search path if needed. +If a program is running on a web application server such as JBoss and Tomcat, +the ClassPool object may not be able to find user classes +since such a web application server uses multiple class loaders as well as +the system class loader. In that case, an additional class path must be +registered to the ClassPool. Suppose that pool +refers to a ClassPool object: + +

+ +

+This statement registers the class path that was used for loading +the class of the object that this referes to. +You can use any Class object as an argument instead of +this.getClass(). The class path used for loading the +class represented by that Class object is registered. + + +

+You can register a directory name as the class search path. For example, the following code adds a directory /usr/local/javalib to the search path: -- cgit v1.2.3