简体   繁体   中英

Java - Run Web Application with Swing GUI

We've developed a Java web application in Eclipse with a Swing GUI, all part of the same Eclipse web application project. We now want to be able to run the application outside an IDE, for example as a WAR or JAR file. We tried to deploy the application as a WAR using Tomcat and accessing it through the browser and the server is running but the GUI doesn't show up, naturally. Is there some way, preferably as simple and fast as possible, to be able to run the web application and at the same time have the GUI appear and be able to interact with it, the same way we did through Eclipse?

Thank you all for your help. I've solved the problem simply using embedded Tomcat (an example for using it can be found here( https://devcenter.heroku.com/articles/create-a-java-web-application-using-embedded-tomcat ). Instead of running Tomcat separately as a service, I ran it in embedded form within a Swing application to listen to HTTP GET/POST requests.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM