Setting Up VisualCafe the First Time

Getting Started

On the SIMS lab machines you can find VisualCafe Expert Edition under
Start > Programs > Software Development > VisualCafe 4.5

Once you have things set up correctly, the system is relatively easy to use. However, there are certain things that, if not properly set up, can mess things up. The main way to keep things simple is to not use any of the VisualCafe-specific java code, virtual machines, and so on, but rather to stick with the standard Java jdk 1.3. I show you how to do this below.

There are two places where we have to worry about making sure things are set up correctly. One is a global setting, that applies every time you use the system, independly of what project you are working on. This should already be set up properly for you, but you should double-check that it is correct, using the instructions below, and be careful to not change the settings for this. The other is specific to each VisualCafe Project you set up.

About VisualCafe Projects

VisualCafe allows you to define what they call Projects. When you create a Project, you first select a project type, and then you associate java files with the projects. The project types include just a plain empty project, an applet type project, and several others. (I've only used plain and applet so far.) A project can contain code from one or more java packages. It is a way of telling VisualCafe which set of files you want it to know about so that you can jump from one file to another easily.

When you create a project, VisualCafe makes a set of special files that it associates with the project, that aren't a standard part of java. These have to be stored somewhere. Your java source files and class files also have to be stored somewhere. This is the second thing I tell you how to set below.

How to Set Up Your Directories

Through my use of this system, I've found it is best to keep all of your source files under one hierarchical directory. For now, you should keep this in your home directory, but we might change this to allow students to work together.

There is a java package standard developing in which you make the directory structure look like internet DNS names. (I'm using Unix-style pathnames here; the equivalent in windows machines converts the / to \ and converts "/home" to H:, also known as \\herald\homes .) For example, java code for ecommerce written by sun might be stored in a directory called

com/sun/ecommerce

and software written by the LINDI project within my research group (which is called BAILANDO) might be stored under

edu/berkeley/bailando/lindi/

You need a top-level root directory above all this as well. I suggest you make directories something like this in your home directory:

/home/yourlogin/is255/projects
/home/yourlogin/is255/src

The idea is for you to put your java and your class files in the src directory, and put the special project files that VisualCafe makes in the projects directory. If you end up using some code from elsewhere, you can put it under the src directory too. So to do an assignment that uses code that you copied over from my research group you might create these directories and files:

/home/yourlogin/is255/src/assignment1/coolcode.java
/home/yourlogin/is255/src/assignment1/coolcode.class
/home/yourlogin/is255/src/edu/berkeley/bailando/lindi/helpfulcode.java
/home/yourlogin/is255/src/edu/berkeley/bailando/lindi/helpfulcode.class

You can create a project called Assignment1 in VisualCafe that uses these two java files. It would be stored in

/home/yourlogin/is255/projects/Assignment1.vep

First Time Use, Step by Step

The first time you startup VisualCafe, you may see this dialog box -- it grabs the focus, so you can't miss it. Notice that it is trying to get you to include some special VisualCafe directories in the Virtual Machine (VM). We don't want these, so you should delete them. You do this by selecting each one in turn and clicking on the red delete button as shown in the next three screens. Do this until they are all deleted. You don't need to worry about directories to exclude.

Hopefully, after you use this the first time you won't need to do it again.

Now check to be sure you have the right virtual machine. The next two images show how to see the VM: go to Tools > Environment Options and select the Virtual Machines tab. It should be set to java1.3.0b as shown. Note that if you set things up this way you don't need to specify a classpath in your overall Windows environment.

If you have the correct VM, then skip the steps between the horizontal lines below.



Next we need to look at what happens when you create a new Project.

Go to File > New Project and select Empty Project, as shown in the next three images.

Once you have a new active (although untitled) project, you should be able to access the Project menu. You'll spend a lot of time in this menu -- it is used for compiling, debugging, and running your java programs. For some reason, they've made the Options tab hard to get too, even though it is rather important. It's at the bottom of the menu, as shown.

When you first create a new project, it is very important that you set one set of things thing up correctly. These are found under the Directories tab, as shown.

First, select Input Class Files. This takes care of setting up the classpath for you (and this is why it is convenient to have all your source files in one main directory -- you just set one top-level directory here, and things should just work). Set this to be the top of your source directory. From the discussion of directories above, you would set this to:

/home/yourlogin/is255/src/

Keep the two checkboxes set, as they are be default.

Next, select Output Files. Set this to also be the top of your source directory, since we'll be storing class files in the same directories as their corresponding source files.

Notice that VisualCafe tries to put them in a local directory on the C drive. We don't want this! If you don't set this to point somewhere in your home directory, the next time you start VisualCafe on another machine, you won't be able to find your class files! And other people will be able to see yours.

Your actual directories will be different than the samples shown in the screenshots; see Setting Up Your Directories above.

The last thing we have to do is tell VC where to put the project files. You have to do this in a different menu. To do this, go to
File > Save All

This saves the project and any files you might have made. Give the project a name and save it in the projects directory discussed in Setting Up Your Directories above.

This is all you need to worry about for setting things up. Once you have a project set up, you shouldn't need to change any of these settings again. However, whenever you define a new project, you have to change the directory settings.

MAH -- last modified 9/3/01