Search Tools Links Login

Create a zero-byte file


Visual Basic 6, or VB Classic

During the installation of Visual Studio 6 on Windows 7, 8 or 10, it is necessary to create a zero-byte file called MSJAVA.DLL in the Windows directory. The mere presence of a file with this name will allow installation to proceed. Without it, installation dies.

I've been getting quite a few questions from folks lately, asking "Just exactly how do I create a zero-byte file?" There are several ways to do it. Read on to find out how to do it at the command prompt.

But first, why do we need to create this file? One of the requirements of Visual Studio 6 is the installation of a "recent" version of Java, particularly of the Microsoft variety. The installation program for Visual Studio is kludged, so it simply checks for the existence of a file with the name MSJava.DLL in the C:\Windows directory. If this file does not exist, the setup program will force you to install it.

Further, it forces a reboot of the operating system in order for the changes to take effect. Now, we don't want some moldy old Java from over a decade ago cluttering up our shiny Windows 7 machine, so to bypass this funky requirement, we will create a zero-byte file with the proper name and in the proper location by following these steps:

Method 1

  1. Open an elevated command prompt (run as administrator).
  2. Type the following lines in the command prompt: CD\Windows
    COPY CON MSJAVA.DLL
  3. After hitting enter, you'll just a blinking cursor. Just press F6 and enter, and your zero-byte file will be created.

Method 2

This one is a little bit more arcane, using FSUTIL. Be careful with FSUTIL, because you can really mess things up with it. Here's how to create a zero byte file:

fsutil file createnew c:\windows\msjava.dll 0

Note that you have to run an Administrator command prompt, since it is writing directly to the Windows directory.

Summary

There, mission accomplished. You can now run setup for Visual Studio 6, and you won't be forced to install stale Java.

About this post

Posted: 2011-12-31
By: dwirch
Viewed: 79,993 times

Categories

Software Hack/Tweak

Windows

Visual Basic 6

Attachments

No attachments for this post


Loading Comments ...

Comments

loussar posted this comment on 2012-01-13:

Or open a .txt file using wordpad and save it without typing anything into it.

dwirch posted this comment on 2012-01-13:

I'm sure there are about 400,000 methods for creating a zero byte file.... Thanks for the contribution.

Artistram3d1 posted this comment on 2012-03-22:

I'm not very tech savvy. I've created a 0 byte file in C:Windows. So is that all I have to do to run setup successfully? Are there any other steps? I really want to learn programming. I've taken a VB6 book from the library and am also going to purchase a VB6 book from Amazon. Any pointers would be greatly appreciated.
Thank you!

You must be logged in to make a comment.