2

Now, this may be really stupid. But can we deploy a Java Swing Application (Desktop Application) on some application server like WAS (Websphere application server)? If yes why and when would we like to do this?

Sorry, new to all this.

Actually I am not trying to make it run on web. I am just asking that how a java swing client application can work with an application server. What can be the architecture and why one may need an application server at all with a java swing application, I mean what are the use cases. I just found this post, which is something what I am asking for; Java Server application architecture with Swing thin client

But all of the answers and comment in response to linked post are not helping much either

Community
  • 1
  • 1
Andy897
  • 6,915
  • 11
  • 51
  • 86

3 Answers3

3

You can use Java Webstart which actually doesn't need a real application server. Just needs a webserver ;)

If the client is a Java client, I don't see the point of using web services except of bootstraping.

For WebService-Client-APP-Interation (as you stated in the comments) you can use the middleware of your choice, e.g., RMI, CORBA, JMS, SOAP, WebServices, XML RPC ...

tuergeist
  • 9,171
  • 3
  • 37
  • 58
  • 1
    I was just about to add that as a comment on the question. +1 :) For the record, we use this where I work, and it's quite effective. – Brian Oct 08 '12 at 20:02
  • Sorry, but does not really answer my question. I am trying to know something as trivial as, if we can at all host a java swing application on an application server. Not sure if what I am asking even makes sense. – Andy897 Oct 08 '12 at 20:02
  • @Andy897 Swing cannot run remote via webbrowser. You can host it on an XServer and have a remote ssh connection with X tunneling. But the swing app is running and rendered on the host, the application runs on. – tuergeist Oct 08 '12 at 20:06
  • Your server would contain a `jnlp` file that contains references to all the hosted JAR files on your server and the main class (among other things), and then the client machine would download all the required JAR files from the server, put them on the class path, and execute the main class using the client's JVM. As @tuergeist says, Swing can't render without a rendering target like an XServer or an RDP session on the host JVM, so there are tricks to do this at the server level, but JWS is more common for this sort of thing. – Brian Oct 08 '12 at 20:07
  • 1
    @all, Actually I am not trying to make it run on web. I am just asking that how a java swing client application can work with an application server. What can be the architecture and why one may need an application server at all with a java swing application, I mean what are the use cases. I just found this .. which is something what I am asking for .. http://stackoverflow.com/questions/1089983/java-server-application-architecture-with-swing-thin-client .. But all of the answers and comment in response to linked post are not helping much either – Andy897 Oct 08 '12 at 20:12
  • This answer should be edited to avoid recommending Java Web Start since it has been deprecated in Java 9 and future releases (https://stackoverflow.com/questions/46904795/java-web-start-support-in-java-9-and-beyond) – ryvantage Jul 27 '18 at 02:58
1

You are likely deploying on that application server to enable some features provided by the app server, such as messaging, database connection pooling, security etc etc

Jordan Denison
  • 2,649
  • 14
  • 14
  • Thanks Jordan for replying. So this application server - Java swing client app. architecture will be something like a web app - web server architecture ? Where a web app is hosted on a web server .. – Andy897 Oct 08 '12 at 20:13
  • From what I understand, basically yes – Jordan Denison Oct 08 '12 at 20:17
-1

check out ajaxSwing http://www.creamtec.com/products/ajaxswing/ They seem to have done a lot of work on this