{"id":4646,"date":"2014-03-30T14:15:49","date_gmt":"2014-03-30T14:15:49","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/classpaths-and-reflection-collection-of-common-programming-errors\/"},"modified":"2014-03-30T14:15:49","modified_gmt":"2014-03-30T14:15:49","slug":"classpaths-and-reflection-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/30\/classpaths-and-reflection-collection-of-common-programming-errors\/","title":{"rendered":"Classpaths and reflection-Collection of common programming errors"},"content":{"rendered":"<p>You can use JavaAssist lib to include new classpaths or modify classes at runtime.<\/p>\n<p>Here is a brief tutorial<\/p>\n<blockquote>\n<p>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:<\/p>\n<\/blockquote>\n<pre><code>  ClassPool pool = ClassPool.getDefault();\n  pool.insertClassPath(\"\/usr\/local\/javalib\");\n<\/code><\/pre>\n<p>The search path that the users can add is not only a directory but also a URL:<\/p>\n<pre><code>  ClassPool pool = ClassPool.getDefault();\n  ClassPath cp = new URLClassPath(\"www.javassist.org\", 80, \"\/java\/\", \"org.javassist.\");\n  pool.insertClassPath(cp);\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>You can use JavaAssist lib to include new classpaths or modify classes at runtime. Here is a brief tutorial 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: ClassPool pool = ClassPool.getDefault(); pool.insertClassPath(&#8220;\/usr\/local\/javalib&#8221;); The search path that the users can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4646","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4646","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=4646"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/4646\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=4646"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=4646"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=4646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}