|bea.com | products | dev2dev | support | askBEA|
|e-docs > WebLogic Server > WebLogic Server Frequently Asked Questions > FAQs: Java|
WebLogic Server Frequently Asked Questions
Q. Can you help me debug my program?
A. If the problem you are having is not directly related to our software, we suggest that you use a Java development tool that helps you with debugging, and that you invest in some books or training to help you learn Java. There are many ways to build debugging into your program, and getting good training in Java programming is a good start to understanding how to do this.
Q. Where can I get help learning Java?
A. There are a lot of books and online references to Java. A good starting place is at the JavaSoft website documentation index, which has links to white papers and the Java Tutorial. You can find books on Java at any of the major online book shopping sites.
Q. Where do I get the JDK?
A. WebLogic 6.1 bundles JDK131. See our Platform support page for information about specific JDKs that we have tested and certified for use with WebLogic software.
Once you determine which version of the JDK you will be using, go to the JavaSoft website. Many platform vendors provide an optimized version of the JDK for their computers.
Q. How do I set up my CLASSPATH?
A. Setting up your CLASSPATH correctly depends on what you are trying to do. The most common tasks are described below:
Q. Why won't the examples work?
A. Usually problems with examples are related to your environment. Here are some troubleshooting hints:
If the example is an applet, check the CODE and CODEBASE, and make sure WebLogic Server is running.
Q. Where can I get help with Java error messages?
A. Many questions we receive at BEA are related to generic Java error messages and are not specific to WebLogic Server. Here are some links that contain helpful information about Java error messages.
Q. Why did a client-server message generate a StackOverflowException?
A. If you are sending a particularly large data structure using java.io.Serialization, you may exceed the per-thread size limit for either the Java or native stack. You can increase the stack size by using the following command line options:
where Stacksize is expressed as an integer followed by "k" or "m" for kbytes or mbytes. For example,
$java -ss156k (native)
$java -oss600k (Java)
The default native stack size is 128k, with a minimum value of 1000 bytes. The default java stack size is 400k, with a minimum value of 1000 bytes.
Q. Will a JIT make my Java application run faster?
A. A Just-In-Time compiler will make some Java applications run faster. A JIT works by storing generated machine code in memory and reusing it when possible. For example, if you execute the same operation 1000 times in a loop, a JIT will improve performance of this operation since the code will only be generated once. Applications with a lot of native methods will not see as much performance improvement as pure-Java applications.
If you use a JIT, you may want to turn off the JIT during debugging to facilitate stacktracing. If you are doing performance testing with a JIT, make sure that you execute the same test several times in the same invocation and then throw away the first result to get an idea of how long the transaction will take when your application is running in a steady state. The first time the code is executed, your test will take longer (the "code generation hit").
Q. Can I redistribute the JDK that is bundled with WebLogic Server?
A. BEA Systems has the non-exclusive right to grant a third party, such as an independent software vendor (ISV), the right to redistribute the JDK that is bundled with WebLogic Server without any modifications of any kind. The following are caveats to this general statement:
Assume that BEA ships WebLogic Server 6.0 with JDK 1.3 only, that BEA ships WebLogic Server 5.1 with JDK 1.1 only, and that an ISV wants to ship JDK 1.1 with WebLogic Server 6.0 in an integrated product offered by that ISV. Unless BEA, for BEA business reasons, elects to make WebLogic Server 6.0 with JDK 1.1 generally available, the ISV couldn't ship JDK 1.1 with WebLogic Server 6.0 in an integrated product offered by that ISV under BEA's agreement with that ISV or under BEA's agreement with Sun. The ISV could, however, obtain its own binary distribution agreement for the JDK from Sun and under that agreement bundle JDK 1.1 with its value added software solution consisting of the ISV applications and WebLogic Server 6.0 integrated.