I have Java swing application. I want to convert to web base application. What is easiest way? Is there any tool available, preferably open source code?
For a Java programmer the Vaadin framework is very similar to Java Swing.
Architecturally, Vaadin and Swing applications are of course quite different (web vs desktop), but because the UI logic in Vaadin applications is run on the server side (in a JVM), all the Java classes and application logic from Swing applications is typically fully reusable. You can see in the hello-world sample how similar the event-diven programming model is to Swing.
Furthermore, Vaadin effectively hides all the web specific details (html, css, rpc,...) from Java application programmers, making it a familiar and effective tool to convert old Swing applications to modern HTML5 web applications.
For the current visitors, Jetbrains has a new open source projector called Projector which can be used to render swing applications in web and they are using this to render their Intellij IDE also.
Below is the excerpt from their github
Projector is a way to run Swing applications without any windowing system and accessing them either locally or remotely.
JetBrains Projector
This project is still in incubator stage. But I have tried using it with their IDE and its working great.
As Vinod mentioned Java Web Start is the easiest way. Another alternative is to convert the application to an Applet that you can run from a web page.