从 java web start 应用程序返回一个值 [英] Returning a value from a java web start application

查看:24
本文介绍了从 java web start 应用程序返回一个值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

想知道是否有人知道是否有办法将某些内容从 java web start 应用程序返回"到网站上的代码中.例如,假设用户需要在 java 应用程序中选择一个位置.然后,这会将位置值传递回网页上的代码(即 php 和 javascript).我已经找到了如何将参数传递到程序中的方法,但到目前为止,在谷歌搜索之后还没有找到任何方法来将它们取出来.任何帮助将不胜感激,谢谢.

Wondering if anyone knows if there is a way to "return" something from a java web start application into the code on the website. For example say the user needed to select a location in the java application. This would then pass the location value back to the code on the webpage (which is php and javascript). I have figured out how to pass arguments into a program, but so far cannot figure out any way to get them out after much googling. Any help would be much appreciated, thanks.

推荐答案

您可以使用 URL 或套接字连接回同源"主机.您还可以使用 BasicService 在浏览器中打开一个网页,可能来自不同的服务器(尽管这不应该用于发回信息,因为它将是 GET 而不是 POST).

You can use URL or sockets to connect back to the "same-origin" host. You can also use BasicService to open a web page, possibly from a different server, in a browser (although this shouldn't be used to send information back, as it'll be a GET not a POST).

这篇关于从 java web start 应用程序返回一个值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆