CS46A/B Virtual Machine



A virtual machine with



Download http://www.cs.sjsu.edu/faculty/horstman/LubuntuSpring2014.zip (Windows; warning: huge file, 2355055213 bytes) or http://www.cs.sjsu.edu/faculty/horstman/LubuntuSpring2014.tar.gz (Mac OS X or Linux; warning: huge file, 2355055641 bytes). Uncompress, yielding a file LubuntuSpring2014.vdi with 4874829824 bytes. Move into your sjsu directory. You can discard the zip file afterwards.

You would think that downloading and unzipping a file is a straightforward process, but unfortunately some operating syatems make this surprisingly complex. In Windows, when you click on a zip file, the file is not automatically unzipped. Instead, you get a “virtual folder” that shows you what is in the zip file, without revealing the contents to applications. In order to unzip the file in a useful way, pay attention to two details.
  1. In the browser, be sure to save the link target. Do not left-click. Instead, right-click on the link and select an option labeled “Save target” or similar.
  2. After you have saved the file, use the Explorer (on Windows) or the Finder (on the Mac) to navigate to the Download directory and locate the icon for the file you have just downloaded. Do not left-click on the icon. Instead, right-click and select an option labeled “Extract” or similar.

After having downladed and extracted the virtual machine image, follow these steps:

Your virtual machine is configured. Click on the "Start" button on the VirtualBox toolbar to start it.


I can’t access the host through the shared folder.

Check that your user account is in the vboxsf group. Click on the bird icon, select Users and Groups → Manage Groups → vboxsf → Properties. Your user account should have a checkmark next to it. Check it if it is unchecked. When prompted for a password, enter secret.

I can’t copy and paste between the host and guest OS.

Right-click on the VM tab in the VirtualBox opening screen. Settings → General → Advanced. Make sure the Shared Clipboard is set to Bidirectional.


Q: Why can’t I see the start menu?

A: Maybe your screen is too small? The image runs in 1024x768. Either use the scroll bars or select the full screen option.

Q: Why Lubuntu?

A: It’s just like Ubuntu, but it’s faster and has a more familiar user interface

Q: How do I see files from my host operating system?

A: Look inside the /media folder. It has a folder that points to the shared directory that you set up during installation.

Q: Can I run the virtual machine off a flash drive?

A: Only if you reformat the Flash drive to use a file system other than FAT32 (whose maximum file size is 4GB).

Q: What if I run Windows XP?

A: It might work, but it’s not supported. You are completely on your own.

Q: Can I run Cygwin instead?

A: It might work, but it’s not supported. You are completely on your own.

Q: I tried unzipping the zip file on the Mac, and it didn’t work. Now what?

A: Some versions of Mac OS don’t know how to unzip files > 4GB. Use the .tar.gz file instead.

Q: How can I make such a VM myself?

A: Follow these steps:

  1. Download the 32 bit (x86) disk image from the Lubuntu site.
  2. Start VirtualBox. New -> Next -> Name: Lubuntu, then follow the wizard with all defaults
  3. Settings -> Storage -> Click on the first + at IDE controller (with tooltip Add CD/DVD drive) -> Choose disk -> Choose the downloaded ISO file -> Ok
  4. Start your new VM
  5. Install Lubuntu. Accept all defaults, except (a) Your name: user (b) Password: secret (c) Log in automatically
  6. Restart when installation is complete.
  7. Open a terminal (Ctrl+Alt+T). Type these commands:
    sudo apt-get update (password is secret)
    sudo apt-get upgrade
    sudo apt-get install virtualbox-guest-dkms emacs git gitk
    sudo shutdown -r now
  8. After the restart, install the JDK from Oracle (not the Ubuntu repos). Download the Linux x86 (not x64) version of the JDK (not the JRE). Choose .tar.gz (not .rpm). After download, open a terminal and type
    tar xvfz Downloads/jdk-*-linux-i586.tar.gz
    ls -d jdk*          
    emacs .bashrc
    Note the . in .bashrc!
    While you are at it, select Options -> C/x C/c C/v Cut and Paste (CUA) and Options -> Save Options.
    Then add the following line to the bottom of the .bashrc file:
    export PATH=~/jdk1.7.0_51/bin:$PATH
    Here, the jdk1.7.0_51 matches the output of ls -d jdk* above. If you have a different version of Java, match it. Save the file. Close Emacs. Close the terminal.
  9. If you want NetBeans, download the Java SE version. Open a terminal and run
    sh Downloads/netbeans*.sh
  10. If you want BlueJ, download the version for all other systems, not the Debian/Ubuntu version. Open a terminal and run
    java -jar Downloads/bluej*.jar
    Later, to run BlueJ, open a terminal window and type
    If you also installed NetBeans, you can easily make a clickable launcher for BlueJ. Copy Desktop/netbeans.desktop to Desktop/bluej.desktop and edit it. The Exec path is /home/user/bluej/bluej, and there is an icon in /home/user/bluej/icons/bluej-84-toned.jpg.
  11. If you want Alice, download the universal installer (and not the Linux installer). Unzip:
    jar xvf Downloads/Alice3*.zip
    Also download the Netbeans Plugin. In Netbeans, select Tools -> Plugins -> Downloaded -> Add Plugins -> Select the .nbm file in the Downloads directory -> Open -> Install -> Close.
  • Q: Why would I want to build my own VM?
  • A: That way, you only need to download a 700K ISO file instead of a huge VM image. And you'll gain confidence installing a Linux system, which will come in handy sooner than you think.