Mercurial > hg > Members > nobuyasu > tightVNCProxy
changeset 33:e44ffe36c514
update CreteHostFile
author | e085711 |
---|---|
date | Wed, 27 Apr 2011 06:12:13 +0900 |
parents | 015d43bb2b62 |
children | 8d8e63b3bd83 |
files | src/myVncProxy/CreateHtmlFile.java |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/myVncProxy/CreateHtmlFile.java Wed Apr 27 05:43:22 2011 +0900 +++ b/src/myVncProxy/CreateHtmlFile.java Wed Apr 27 06:12:13 2011 +0900 @@ -4,6 +4,7 @@ import java.io.File; import java.io.FileWriter; import java.io.PrintWriter; +import java.net.InetAddress; public class CreateHtmlFile { @@ -37,10 +38,12 @@ file = new File(html_file); PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter(file))); + InetAddress addr = InetAddress.getLocalHost(); + String contents = "<APPLET CODE=\"VncViwer.class\" ARCHIVE=\"VncViewer.jar\"\n " + "WIDTH=\""+width+"\" HEIGHT=\""+height+"\">\n"; contents = contents+"<PARAM NAME=\"PORT\" VALUE=\""+port+"\">\n"; - contents = contents+"<PARAM NAME=\"HOST\" VALUE=\""+host+"\">\n"; + contents = contents+"<PARAM NAME=\"HOST\" VALUE=\""+addr.getHostAddress()+"\">\n"; pw.println(header+contents+footer); pw.close();