Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 java swing 在 Web 浏览器中打开一个链接,但出于安全原因,我不希望用户看到该链接。所以我希望隐藏地址栏或修改链接,以便用户不能以负面方式使用链接。我该怎么做?
我的代码:
URI uri = null; uri = new URI("my.original.link"); Desktop.getDesktop().browse(uri);
现在如何隐藏链接/地址栏或将原始链接修改为某个错误值,使其对用户无用?
您无法使用 Desktop.browse() 方法做到这一点。该 URL 将对用户可见。
之后您可以执行服务器端重定向,但用户至少会在短时间内看到原始 URL。