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
- Questions last edited on 30 January 2006 at 1:29 pm by user-11216ng.dsl.mindspring.com