Use the java graphical user interface to implement the file browsing function (the package needs to be imported) import org. eclipse. swt. SWT; import org. eclipse. swt. widgets. display; import org. eclipse. swt. widgets. fileDialog; import org. eclipse. swt. widgets. messageBox; import org. eclipse. swt. widgets. shell; import org. eclipse. swt. widgets. label; import org. eclipse. swt. widgets. text; import org. eclipse. swt. widgets. button; import org. eclipse. swt. events. selectionAdapter; import org. eclipse. swt. events. SelectionEvent; import org. eclipse. swt. widgets. group; import org. eclipse. wb. swt. SWTResourceManager; public class TestShell {protected Shell; private Text text_file; public static void main (String [] args) {try {TestShell window = new TestShell (); window. open ();} catch (Exception e) {e. printStackTrace () ;}/ *** Open the window. */public void open () {Display display = Display. getDefault (); createConte ETS (); shell. open (); shell. layout (); while (! Shell. isDisposed () {if (! Display. readAndDispatch () {display. sleep () ;}}/ *** Create contents of the window. */protected void createContents () {shell = new Shell (); shell. setSize (500,200); shell. setText ("parse WSDL"); text_file = new Text (shell, SWT. BORDER); text_file.setBounds (80, 33,290, 24); // implement the file browsing function. Button browseButton = new Button (shell, SWT. PUSH); browseButton. setText ("Browse... "); browseButton. setFont (SWTResourceManager. getFont (" Tahoma ", 12, SWT. NORMAL); browseButton. setBounds (383, 33, 80, 24); browseButton. addSelectionListener (new SelectionAdapter () {/* (non-Javadoc) * @ see org. eclipse. swt. events. selectionAdapter # widgetSelected (org. eclipse. swt. events. selectionEvent) */public void widgetSelected (SelectionEvent e) {FileDialog dialog = new FileDialog (shell, SWT. OPEN); dialog. setText ("Source Folder Selection"); dialog. setFilterExt Ensions (new String [] {"*. txt", "*. jpg", "*. *"}); String filePath = dialog. open (); if (dialog! = Null) {text_file.setText (filePath) ;}}); Button button_exe = new Button (shell, SWT. NONE); button_exe.addSelectionListener (new SelectionAdapter () {@ Overridepublic void widgetSelected (SelectionEvent e) {MessageBox msgbox = new MessageBox (shell, SWT. ICON_QUESTION | SWT. OK); msgbox. setText ("prompt"); String file = ""; file = text_file.getText (); if (file. equals ("") | file = null) {msgbox. setMessage ("the WSDL file cannot be blank "); Msgbox. open (); return;} else {msgbox. setMessage ("file retrieved !!! "); System. out. println (file); msgbox. open () ;}}); button_exe.setFont (SWTResourceManager. getFont ("Tahoma", 12, SWT. NORMAL); button_exe.setBounds (214,133, 87, 23); button_exe.setText ("\ u6267 \ u884C"); Group group Group = new Group (shell, SWT. NONE); group. setBounds (10, 10,472,117); Label label = new Label (group, SWT. NONE); label. setBounds (10, 23,105, 24); label. setFont (SWTResourceManager. getFont ("Tahoma", 12, SWT. NORMAL); label. setText ("source file :");}