我如何修复java.lang.RuntimeException?

时间:2011-04-20 09:13:46

标签: java languagetool

我正在尝试使用LanguageTool。  这是在使用信息中:

> Using LanguageTool from other
> applications:    Start the stand-alone
> application and configure it to listen
> on a port that is not used yet (the
> default port, 8081, should often be
> okay). This way LanguageTool will run
> in server mode until you stop it. The
> client that wants to use LanguageTool
> can now just send its text to this
> URL:
> http://localhost:8081/?language=xx&text=my+text

我正在尝试使用我的IP http://<IP HERE>:8081/?language=xx&text=my+text,但我一直在

  

错误:java.lang.RuntimeException:错误:从(IP地址)拒绝访问

我做错了什么,我该如何解决?

1 个答案:

答案 0 :(得分:1)

仅接受来自本地网络地址(即环回设备)的连接的限制是硬编码的:LanguageToolHttpHandler

如果您想更改它,则必须更改来源。