Java connection refused after starting openoffice service
世界只因有你
世界只因有你 2017-07-03 11:43:16
0
1
938

There is no problem with manual startup, but if I start the service with code, a connection refused error is reported

public static String soffice_host = "127.0.0.1"; public static String soffice_port = "8100"; public static Process pro = null; String commands = "cmd.exe /C C:\Program Files (x86)\OpenOffice4\program\startOpenoffice.bat"; System.out.println(commands); pro = Runtime.getRuntime().exec(commands); connection = new SocketOpenOfficeConnection(soffice_host,Integer.parseInt(soffice_port)); System.out.println("获得连接"+connection); connection.connect();

You can print out the content of the connection, but an error will be reported when connecting later

starOpenoffice.bat content:
soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard

Manual startup method:
cd C:\Program Files (x86)\OpenOffice4\program
soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard

世界只因有你
世界只因有你

reply all (1)
漂亮男人

The error message is sent

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!