View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide

How do you set the media path to mediasources?

To change the default directory that Picture.getMediaPath() or FileChooser.getMediaPath() uses do:

FileChooser.pickMediaPath(); // this will let you pick the directory that has the media

or

FileChooser.setMediaPath("c:/intro-prog-java/mediasources/");

in the interactions pane of DrJava.

Change the c:/intro-prog-java/mediasources/ to be the directory that holds your media. Be sure to include the / at the end. If you use backslashes you will need to double them

FileChooser.setMediaPath("c:\\intro-prog-java\\mediasources\\");

Link to this Page