Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 6508b452f7992bb985c1125ca0b57022 > files > 16

bcel-manual-5.2-11.fc17.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<!--
Copyright 1999-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->


<!-- Content Stylesheet for Site -->

        
<!-- start the processing -->
    <!-- ====================================================================== -->
    <!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
    <!-- Main Page Section -->
    <!-- ====================================================================== -->
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

                        
           
                                    
                        
            <title>BCEL - BCEL FAQ</title>
        </head>

        <body bgcolor="#ffffff" text="#000000" link="#525D76">        
            <table border="0" width="100%" cellspacing="0">
                <!-- TOP IMAGE -->
                <tr>
                    <td align="left">
<a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" border="0"/></a>
</td>
<td align="right">
<a href="http://jakarta.apache.org/bcel"><img src="./images/bcel-logo.gif" alt="BCEL" border="0"/></a>
</td>
                </tr>
            </table>
            <table border="0" width="100%" cellspacing="4">
                <tr><td colspan="2">
                    <hr noshade="" size="1"/>
                </td></tr>
                
                <tr>
                    <!-- LEFT SIDE NAVIGATION -->
                    <td width="20%" valign="top" nowrap="true">
                    
    <!-- ============================================================ -->

                <p><strong>BCEL</strong></p>
        <ul>
                    <li>    <a href="./index.html">Front Page</a>
</li>
                    <li>    <a href="./news.html">News & Status</a>
</li>
                </ul>
            <p><strong>Documentation</strong></p>
        <ul>
                    <li>    <a href="./manual.html">Manual</a>
</li>
                    <li>    <a href="./faq.html">FAQ</a>
</li>
                    <li>    <a href="./api/index.html">API</a>
</li>
                </ul>
            <p><strong>Download</strong></p>
        <ul>
                    <li>    <a href="http://jakarta.apache.org/site/binindex.html">Binaries</a>
</li>
                    <li>    <a href="http://jakarta.apache.org/site/sourceindex.html">Source Code</a>
</li>
                </ul>
            <p><strong>Get Involved</strong></p>
        <ul>
                    <li>    <a href="http://svn.apache.org/viewcvs.cgi/jakarta/bcel/">SVN Repository</a>
</li>
                    <li>    <a href="http://jakarta.apache.org/site/mail.html">Mailing Lists</a>
</li>
                    <li>    <a href="http://jakarta.apache.org/site/bugs.html">Issue Tracking</a>
</li>
                    <li>    <a href="./contributors.html">Contributors</a>
</li>
                    <li>    <a href="./license.html">License</a>
</li>
                    <li>    <a href="./projects.html">Projects</a>
</li>
                </ul>
            <p><strong>Translated (Web)</strong></p>
        <ul>
                    <li>    <a href="http://www.terra-intl.com/jakarta/bcel/">Japanese</a>
</li>
                </ul>
                        </td>
                    <td width="80%" align="left" valign="top">
                                                                    <table border="0" cellspacing="0" cellpadding="2" width="100%">
      <tr><td bgcolor="#525D76">
        <font color="#ffffff" face="arial,helvetica,sanserif">
          <a name="FAQ"><strong>FAQ</strong></a>
        </font>
      </td></tr>
      <tr><td>
        <p>
        <blockquote>
                                    <p>
      <b>Q: </b>How can I ... with BCEL?
      <br />
      <b>A: </b>Take a look at
      <tt>org.apache.bcel.util.BCELifier</tt>, it takes a given class
      and converts it to a BCEL program (in Java, of course). It will
      show you how certain code is generated using BCEL.
    </p>
                                                <p>
      <b>Q: </b> Is the BCEL thread-safe?
      <br />
      <b>A: </b>BCEL was (deliberately) not designed for thread
      safety. See <a href="http://java.sun.com/docs/books/cp/">
      "Concurrent Programming in Java"</a>, by Doug Lea,
      for an excellent reference on how to build thread-safe wrappers.
    </p>
                                                <p>
      <b>Q: </b> Can I use BCEL in a commercial product?
      <br />
      <b>A: </b> Yes, this is covered by the <a href="license.html">Apache License</a>, if you add a note about the original
      author and where to find the sources, i.e., 
      <a href="http://jakarta.apache.org/bcel/">http://jakarta.apace.org/bcel/</a>
    </p>
                                                <p>
      <b>Q: </b> (Typically for users of Xalan (XSLTC)) I'm getting
      <pre>
      ClassGenException: Branch target offset too large for short
      </pre>
      when compiling large files.
      <br />

      <b>A: </b> The answer lies in internal limitations of the JVM,
      branch instruction like goto can not address offsets larger than
      a short integer, i.e. offsets &gt;= 32767.<br />
      The solution is to split the branch into in intermediate hops,
      which the XSLTC obviously doesn't take care off.
      (In fact you could replace gotos with the goto_w instruction,
      but this wouldn't help in the other cases).
    </p>
                                                <p>
      <b>Q:</b> Can I create or modify classes dynamically with BCEL?
      <br />
      <b>A:</b> BCEL contains useful classes in the
      <tt>util</tt> package, namely <tt>ClassLoader</tt> and
       <tt>JavaWrapper</tt>. Take a look at the <tt> ProxyCreator</tt> example.
    </p>
                                                <p>
      <b>Q:</b> I get a verification error, what can I do?
      <br />
      <b>A:</b> Use the JustIce verifier that comes together with BCEL
      to get more detailed information:
       <pre>
       java org.apache.bcel.verifier.Verifier &lt;your class&gt;</pre>
    </p>
                            </blockquote>
        </p>
      </td></tr>
      <tr><td><br/></td></tr>
    </table>
                                        </td>
                </tr>

                <!-- FOOTER -->
                <tr><td colspan="2">
                    <hr noshade="" size="1"/>
                </td></tr>
                <tr><td colspan="2">
                    <div align="center"><font color="#525D76" size="-1"><em>
                    Copyright &#169; 1999-2005, The Apache Software Foundation
                    </em></font></div>
                </td></tr>
            </table>
        </body>
    </html>
<!-- end the processing -->