The Borland C++ 5.0 Java Add-On FAQ

Part of the information below was originally compiled by Kent Reisdorph

When I run the debugger I get an error in the status bar that says, "Unable to find class." I can see that the class files are there, what's going on?

You probably don't have a TCP/IP stack. Borland's Java debugger uses Sun's debug kernel which uses TCP/IP to talk to the Java virtual machine. If you have a static IP address specified, Windows 95 or Windows NT will create a TCP/IP stack upon start up. If you connect to the Web via a dial-up Internet service provider (ISP), your computer probably obtains it's IP address dynamically, that is, your computer gets it's IP address from your ISP. Usually, if you get your IP address dynamically you do not have a static IP address specified, consequently Windows will not create a TCP/IP stack at start up. You will need to specify a static IP address in order to run the debugger. Adding a static IP address will not keep your computer from obtaining a dynamic IP address from your ISP.

Instructions for Configuring Windows to Work With the Borland Java Debugger (setting up a static IP address, and thus a TCP/IP stack)

The goal here is to provide information about common debugging problems regarding TCP/IP connections in Windows 95 or in Windows NT. The steps given for setting up or modifying your system with TCP/IP are designed with the most flexibility in mind. You should need to use them only once. The information provided here explains how to:

Running the Sun and the Borland Java debuggers requires a TCP/IP connection to a remote or a local host. Your system connects to your host (your Internet service provider; CompuServe, America OnLine, etc.) automatically based on how the your network properties are set. Your PC can also act as a host (a local host.)

If the debugger is having difficulty, the symptoms would appear as errors such as java.net.UnknownHostException in a DOS box if you are using the Sun debugger. If you are using the Borland debugger, the same kind of error would appear in a DOS box as well as the "Could not find class.." message in the IDE status bar.

Windows 95 & Windows NT 4.0

Here are the most common situations and solutions to debugging in Windows 95 or Windows NT 4.0:

  1. You're a new user and have no network or modem devices or drivers installed.
  2. Install a Dial-Up adapter and a TCP/IP network component. You do not need to install the actual hardware (modem or network card) to make this work.

At this point, you may be asked to supply your Windows 95 media. Follow the instructions until you return to the Configuration pane of the Network dialog box. Now you will see a number of components that were installed. If you wish, you can remove all but the Dial-Up Adapter.

You will be asked if you want to re-boot now. Once re-booted, you're ready to debug.

2. You have a Dial-Up installed but can't debug unless you are connected to your provider. You have TCP/IP installed, but can't work off-line.

Create a static IP address by configuring your TCP/IP protocol manually. Do this in the Network option of Control Panel.

You will be asked if you want to re-boot now. Once re-booted, you're ready to debug.

If you get a pop-up dialog box because your system is still trying to connect, click Cancel. Then you can work off-line.

Windows NT 3.51

If the debugger is not working because of an UnknownHostException message displayed in the View | Messages window, most likely: NT Networking and Remote Access Service is not installed because a network card or a modem does not exist.

Instructions to install NT Networking and RAS without a network card and a modem present.

Once re-booted, you're ready to debug.

Why do I get "Out of memory" errors when I compile my project or run the Applet Viewer?

Your swap file is probably located on a hard disk that is full, leaving the swap file no room to grow as needed. There are a few things you can do to address this problem. You can allow the swap file to grow by (1) freeing up some disk space, or (2) moving the swap file to a disk that has more space. You can change your swap file settings in Control Panel | System | Performance | Virtual Memory. Another thing you can do is buy more memory.

I am trying to compile a C++ program that calls Java native methods, and I keep getting errors like this:

Error: typedefs_md.h(37,24):, expected

Error: typedefs_md.h(38,34):Multiple declaration for '__int64'

Error: typedefs_md.h(37,34):Earlier declaration of '__int64'

Error: typedefs_md.h(67,15):Bad define directive syntax

Error: typedefs_md.h(72,17):Declaration syntax error

Error: typedefs_md.h(91,27):'int64_t' cannot start a parameter declaration

Error: typedefs.h(39,14):Declaration missing ;

Error: oobj.h(64,35):'int64_t' cannot start a parameter declaration

You are using different header files than those supplied with BC5. The .h files that come with Sun's JDK will not work with the BC5 compiler.

I want to run the BC5 Java compiler from the CD, can I do this?

No, if you wish to use the Java compiler you must install BC5 to the hard disk. If you are only going to be doing Java development you can install the bare minimum of BC5 needed to create Java projects; the IDE under Visual Tools, plus the Java Add on.

Can I call C and C++ functions and methods from Java?

Yes. See the examples\native\native.ide project for a small example

Can I install the new JDK I got from Sun to replace the one in BC5?

No.

I get a message that bcwjava.dll can't be found when I compile or run the Applet viewer.

You have the version of BC5 that doesn't ship with AppAccelerator, Borland's JITC (Just in Time Compiler). The JITC can be found in the Developer and C/S versions of BC5. The message is informational, and does not indicate an error in compilation.

I have installed a newer JDK that I got from Sun, and BC5 appears to be calling that Java virtual machines instead of it's own. Why doesn't BC5 call the JVM supplied?

You are using BC 5.0 or BC 5.0A, which had just that problem. download the patches to BC 5.0B or BC 5.01 and you should be fine.

To upgrade:

U.S. owners can contact Borland to receive a copy of BC5.02 Developement Suite CD for $15.00. This CD will contain all of the fixes from the first two patches, and other fixes as well. Call 1-800-331-0877. Have your BC5.0 CD ready as proof of purchase.

Registered Canadian Borland C++ 5.0 customers can receive the Borland C++ 5.01 update, for a shipping and handling fee of $15.00. Please contact Borland Canada customer service at 1-800-461-3327.

Outside the U.S., please contact your nearest Borland office for pricing and availability.

You can also download the patches via the Web. Go to the Patches Page.

I just applied patch 2, and now I get a problem with bcwjava.dll when I load the IDE.

Be certain that you apply patch 2 from the \BC5 directory, otherwise the patch may not be applied to the proper sub-directories. Last Modified