Microsoft Visual J++ 1.1 Release Notes Home

© 1996-1997 Microsoft Corporation

These release notes contain supplemental information to the Microsoft® Visual J++&trade 1.1 documentation in Help, books, and on CD. For additional information, check the Microsoft Visual J++ Web site at http://www.microsoft.com/visualj/. Many of the issues outlined in this document will be corrected in upcoming releases.

Contents

Setup Issues

Microsoft® Visual Studio™ 97 Users

Visual J++ Users

English version of Internet Explorer 3.01 may overwrite localized version

Changing default installation path not recommended

File conflicts during installation

Use Microsoft Knowledge Base articles to solve setup and operating problems

DLL files hidden on Windows 95

Installing/Uninstalling on a dual-boot machine

Access permission for installation directory


Documentation Issues

Using Java™ and DCOM

OLEControls sample program must have MSOUTL32.OCX installed to function properly

Learn Java Now: Chapter 16 Applet Wizard Code

Using your own Help files for F1 help in a source file


Wizard and UI Issues

Wizard Bar: Class name may not be fully viewable at some monitor resolutions

Java Resource Wizard: Controls may not display properly when generated dialog class is used in applications

ActiveX™ Wizard for Java: Error MIDL2270:duplicate UUID

Database Wizard for Java: File data source not supported

Java Resource Wizard: Combo Boxes cannot be populated

Image Editor: Bilevel GIF file format not supported

Database Wizard for Java: Incorrect status message may be displayed when attempting to save, delete or add records under RDO


Compiler Issues

Runtime error "java.lang.ClassFormatError" may occur when using Automation

JVC error J0016 may occur when compiling try block

Class loading may not be successful when non-public classes are called from outside of package

Compiler error J0068 thrown in valid assignment

Compiler fails to yield on optimized endless loop


Debugging Issues

Source code synchronization problems occur while stepping through source code in the debugger

Debugging session times out/does not start/breakpoints not hit


Build System Issues
Generating class files in package directories


Setup Issues

Visual Studio 97 Users

Installation of Visual J++ from the Visual Studio CDs requires protected-mode CD-ROM drivers. DOS-compatible or real-mode CD-ROM drivers will prevent the installation of Visual J++ from the product CDs. You can contact Microsoft Technical Support for Visual J++ at (206) 635-7011 for a fulfillment CD which will allow you to install Visual J++ on machines with real-mode DOS-compatible CD-ROM drivers.

Visual J++ Users

Users who purchased the Visual J++ product individually and not as a part of Visual Studio 97 will be able to successfully install on systems using DOS-compatible or real-mode CD-ROM drivers. These drivers may prevent access of files with long file names which may be left on the CD if you do anything other than a complete installation. It is suggested that you select a Custom install in setup and select ALL components to be installed onto your hard drive if you are using real-mode CD-ROM drivers. Setup will display an informational dialog if you are using real-mode CD-ROM drivers.

English version of Internet Explorer 3.01 may overwrite localized version

Visual J++ includes Internet Explorer version 3.01 which may overwrite any localized version of Internet Explorer already installed on a machine. This problem will occur if the English version (3.01) is newer than the localized version. There is no warning given to the user.

Changing default installation path not recommended

You may encounter some problems with your installation path if another Visual Studio product is already installed and you change or modify your default installation path. It is not recommended you change the default.

File conflicts during installation

While installing new or updated versions of software on Windows 95 or Windows NT, you may encounter situations where the setup program identifies two files using the same name, and asks which file you wish to have installed. When asked, always select the newest version of the file.

Use the Microsoft Knowledge Base articles to solve setup and operating problems

You can use the Knowledge Base articles in the MSDN documentation to resolve known installation and operating problems. Select the Search command from the Help menu and search for error messages or related keywords to find a problem description and resolution.

DLL files hidden on Windows 95

By default, the Windows 95 Explorer sets DLLs as a hidden file type. If you want to see DLLs listed in File Open dialogs you can do one of two things:

Installing/Uninstalling on a dual-boot machine

To install Visual J++ on a dual-boot machine, run Setup once for each operating system. For example, boot the machine into Windows NT (version 4.0 or later) and run Setup. This will copy all the required files into the installation root directory and into the Windows NT \SYSTEM32 subdirectory. It will also set up a program group for Visual J++ and make the required registry entries. Next, reboot the machine into Windows 95 and run Setup again. You can choose the same installation directory. This will save disk space and installation time since Setup copies only those files that need replacement or updating. As a result, only system files will be copied to the system directory. Setup will also create a program group for Visual J++ and make the required registry entries for Windows 95. When you have finished the installations, you can use Visual J++ with either operating system. Because the operating systems do not share the same registry, Visual J++ will have to be configured separately for each one.

Note If you wish to uninstall Visual J++ from a dual-boot system, you will need to run the uninstall application from the operating system on which Visual J++ was originally installed. Therefore, if you originally installed Visual J++ using Windows 95, you will need to run the uninstall application from Windows 95. The Visual J++ registry entries will not be removed on the other operating system and will need to be removed manually.

Access permission for installation directory

The Setup program requires that you have access permission for the root directory of the drive where you are installing Visual J++. Setup will fail if you do not have access rights. Under these circumstances, your system administrator must give you temporary access rights to the root directory for you to complete setup.

Documentation Issues

Using Java and DCOM

For more information about using DCOM with Java, see the Microsoft Knowledge Base article Q162164. This article can be found by visiting the Microsoft Knowlege Base Web site at http://www.microsoft.com/kb/. Once connected, select "Visual J++" as the product, then query on article "Q162164."

OLEControls sample program must have MSOUTL32.OCX installed to function properly

The OLEControls sample relies on the MSOUTL32.OCX custom control from Microsoft Visual Basic®. To correctly install MSOUTL32.OCX, you must have Microsoft Visual Basic version 4.0 or later installed on the machine. The sample can be built and run without this control, but functionality will be limited.

Learn Java Now: Chapter 16 Applet Wizard code

In Chapter 16, "Animating Images," the discussion of animation presents segments of code generated by Applet Wizard. This discussion and the code depicted were accurate when the chapter was finalized for the print book. Subsequent changes to Applet Wizard could not be specifically reflected in the discussion, although those changes do parallel the approach suggested in the second application, AnimationMT, which uses Media Tracker to load and monitor the status of media objects.

Using your own Help files for F1 help in a source file

You can customize Microsoft Developer Studio to get F1 help on keywords documented in a private or third-party help file. Once this feature is set up, Developer Studio adds a command to the Help menu allowing you to toggle the feature on or off. When the command is active, all source-file F1 help requests are passed to a specified external file or files rather than to Visual J++ Books Online. WinHelp 4.0 displays the topic. For more information about this feature open the help file EXTHELP.HLP, located in the Devstudio\SharedIDE\help directory of your product installation.

Wizard and UI Issues

Wizard Bar: Class name may not be fully viewable at some monitor resolutions

At some monitor resolutions the class name drop-down control on the Wizard Bar may not be wide enough to display the entire qualified Java class name. The Wizard Bar is customizable however. For more information about changing the width of this control, see the topic "Customizing a Toolbar" in the Developer Studio Environment User's Guide.

Database Wizard for Java: Generated code may not run against Oracle® databases containing lowercase table or column names

Code generated by Database Wizard for Java will cause an exception if column or table names in an Oracle database contain any lowercase alphabetic characters. We are currently researching this problem and will post any new information on the Visual J++ Web site.

Java Resource Wizard: Controls may not display properly when generated dialog class is used in applications

After generating class source code from a dialog resource class, any controls contained on the source dialog may not display properly if the project is run as an application. To solve this problem, move the resize() method call from the top of main() to the last line. For example:

 
public static void main(String args[])
    {
	// Create Toplevel Window to contain applet test1
	//----------------------------------------------------------------------
	test1Frame frame = new test1Frame("test1");

	// Must show Frame before we size it so insets() will return valid values
	//----------------------------------------------------------------------
	frame.show();
	frame.hide();
	// The following code starts the applet running within the frame window.
	// It also calls GetParameters() to retrieve parameter values from the
	// command line, and sets m_fStandAlone to true to prevent init() from
	// trying to get them from the HTML page.
	//----------------------------------------------------------------------
	test1 applet_test1 = new test1();

	frame.add("Center", applet_test1);
	applet_test1.m_fStandAlone = true;
	applet_test1.init();
	applet_test1.start();
	frame.show();
	frame.resize(frame.insets().left + frame.insets().right  + 320,
	             frame.insets().top  + frame.insets().bottom + 240);
    }
 

ActiveX Wizard for Java: Error MIDL2270:duplicate UUID

Users of Microsoft® Windows NT® systems with network configurations will see this error if ActiveX™ Wizard for Java is run after the network card is removed. The network card is required to generate random UUIDs. If the card has been removed, the wizard will generate UUIDs which are identical. The suggested fix is to re-install the network card. If this is not possible, the resulting invalid IDL file can be edited as a temporary fix until the network card can be re-installed. Change the UUIDs to make them unique, run the wizard again, and in step 1, provide the corrected IDL file.

Database Wizard for Java: File data source not supported

Database Wizard for Java will not recognize file data sources. To work around this problem, create a machine data source which matches the file data source. This allows Database Wizard for Java to properly recognize the file. Later you can substitute the appropriate connect string in your applet to get your applet to run with the file DSN. See the ODBC Programmer's Guide (Chapter 6) for details on the required connect string format for use with file data sources.

Java Resource Wizard: Combo boxes cannot be populated

After adding a combo box to a dialog in the resource editor, you are allowed to populate the control with strings. While the resource editor allows this, the strings will not be displayed in the list box when your program is run.

Image Editor: Bilevel GIF file format not supported

Bilevel (1-bit) GIF files may not display correctly when loaded into the image editor. Some other GIF file formats remain untested. If you encounter problems displaying or updating GIF files within the image editor, use another picture editor that supports a wider variety of GIF file formats to perform your updates.

Database Wizard for Java: Incorrect status message may be displayed when attempting to save, delete or add records under RDO

Attempting to save, add or delete records when there is no current record may lead to an incorrect status message when using RDO. No current record is indicated with a status message saying that you have attempted to scroll after the last record or before the beginning of the resultset (via the Next or Prev buttons.) If you subsequently attempt to save, add or delete a record then a misleading error status will be displayed. The status text may say "Error retrieving field value for (name of first column.)" One workaround is not attempting to modify records when not on a record. Another workaround would be to add MoveNext/MovePrev to the Next and Prev button handlers. Consider the following code example for the Prev button handler:
...
else if (evt.target == buttonPrev)
   {
      m_lResultset.MovePrevious();
      
      if (m_lResultset.getBOF())
      {
         buttonPrev.enable(false);
         labelStatus.setText("Beginning...");
         m_lResultset.MoveNext();  // Added line
      }
      else
         UpdateUI();
      
      return true;
   }
... 

Compiler Issues

Runtime error "java.lang.ClassFormatError" may occur when using Automation

TLB files created from Visual C++ MFC ClassWizard generated ODL code may cause JavaTLB to generate class files that give the following error when loading:

ERROR:java.lang.ClassFormatError 
This problem occurs when adding automation methods (via ClassWizard) that take parameters of type PTR.

To work around this problem, modify the generated ODL file by adding [in, out] attributes to the methods which pass PTR parameters:

//   NOTE - ClassWizard will maintain method information here.
//   Use extreme caution when editing this section.
//{{AFX_ODL_METHOD(PtrTest)
[id(1)] void pStrTest( [in, out] BSTR* arg1);
[id(2)] void pLongTest( [in, out] long* arg1);
//}}AFX_ODL_METHOD
 

JVC error J0016 may occur when compiling try block

The JVC compiler will correctly display an error when compiling the following code:

try funct( );
catch (Exception e) { }  
Compiling the code sample above results in the following output error message:
error J0016: Expected '{' 
According to the Java Language Specification, try blocks must be fully enclosed by brackets. Although the syntax shown above is incorrect, some versions of the Sun Javac compiler will build this code successfully.

Class loading may not be successful when non-public classes are called from outside of package

In some cases, when compiling packages, JVC will not issue an error on code that makes an improper call to a non-public class in the another package. Internet Explorer, JView and other browsers will catch this error during run-time and disallow the call. This may cause the class to appear to hang or cause class loading errors. To correct this problem, either remove the call to the non-public class, or make the class public.

Consider the following example:

import hello.*;  // save this as file sayhello.java
public class sayhello extends talk {
   public static void main(String args[]) {
      sayhello me = new sayhello();
      me.m_voice.sayhi();
   }
}

package hello;  // save this as file hello\talk.java
public class talk {
      public voice m_voice = new voice();
}

package hello; // save this as file hello\voice.java
/* public */ class voice {  //  this class is not declared public; talk.java can be compiled because
                            //  talk.java is in the same package but sayhello will not run because sayhello
                            //  is not in the same package and cannot access it in the class
   public void sayhi() {
      System.out.println("Hi");
   }
} 

Compiler error J0068 thrown in valid assignment

The follow sample throws J0068 - "cannot implicitly convert int to short" when compiled with JVC:

class Simple {
   void method1() {
      short s1 = 1, s2 = 2, s3 = 3;
      s1 /= s2 * s3;  //  problem occurs here
   }
} 

To correct this problem, replace the expression shown above with the following line:

s1 /= (short) (s2 * s3); 

Note that the behavior shown is not an error. Rather, it is in full compliance with the Java Language Specification.

Compiler fails to yield on optimized endless loops

The JVC compiler may not yield control back to the user when attempting to compile code marked for optimization with the /O compiler switch. This problem occurs when using for or while loop constructs set to iterate endlessly.

Consider the following example:

public class Simple {
   void method1( ) {
      for ( ; ; );      
   }
} 

To work around this problem, compile the code without optimization.

Debugging Issues

Source code synchronization problems occur while stepping through source code in the debugger

In some circumstances when stepping into class files in the directories beneath \java\classes located in your Windows directory, the line indicator arrow may sometimes appear on an invalid line. To correct this problem, obtain updated classes and sources from http://www.microsoft.com/java/classd.exe and install these files into the \java\classes directory. Run the classd.exe program to install the classes. You can use the javasrc.exe tool to extract the sources. You may also recompile the .class file from its corresponding .java source file to correct the invalid line problem.

Remember, Internet technology is changing rapidly. As such, make it a point to routinely check the Web site shown above for newer versions of the developer class files. (Once downloaded, use javasrc.exe to extract the source files.)

Debugging session times out/does not start/breakpoints not hit

Debugging sessions may sometimes appear to time out, or you may experience other symptoms such as not hitting breakpoints while debugging which indicate that Visual J++ did not load the specified class or did not successfully debug the class. The most likely cause of these symptoms is is an incorrect alphabetic case specification of the name of the class being debugged. The Java language is inherently case-sensitive and the user must correctly specify the name of the class to be debugged. Make sure the class name specified in the Project.Settings dialog on the Debug tab is an exact match — including uppercase and lowercase — for the class you wish to debug. Attempting to debug class "Demo" but incorrectly identifying the class as "demo" or even "Demo.class" would cause these symptoms. Also, be sure to check the Settings For selection to make sure you have changed both the Debug or Release as is appropriate.

Build System Issues

Generating class files in package directories

By default the build system creates package directories when a package statement is encountered within a .java file. However, the corresponding .class output file will not be generated in this newly created package directory. To ensure the output .class file is generated within the appropriate package directory, peform the following steps:
  1. Select Settings from the Build menu.
  2. Type a period (.) in the Output Directory box of the General tab.
Performing the steps shown above tells the build system to place the corresponding output .class files into the newly created package directories.