How can one bring java library to the internet?
How do you take a java library for the desktop or applet and make it so that you can use its functions for a web page? I know not all things are for the web, but can you name a "regular" Java class in the apache / tomcat setup server and it "works"? Do you need to do something to make it work with your webpage?
I was interested in jgrapht for the web, but it looks like an entire desktop or applet, and I don't know what could be done to return its graphics to the browser, but maybe its libraries and generated .pngs presented by the browser.
While there is discussion about whether applets are alive or dead, I am not interested in using them at the moment as it appears to be dead, albeit with a new possible life in the latest 6u10 update. I don't know that I also want to invest in JavaFX.
source to share
Or you could emit the graph structure as JSON with a simple graph traversal and interpret it on the fly in the browser using Javascript.
It is difficult to answer the question in general because it depends a lot on how you want to use it.
source to share
Yes, it is possible to use a java file or a jar file in a web application, but it also depends on what you want to do with it.
For example, if a library is for math and you want to return results to users in a web application, this is definitely possible. There are many other examples I can give, but they are all the same.
As far as displaying charts, I have successfully used JFreeChart in a web application using Apache Wicket (which rolls the cue ball).
So, to answer your question, you don't need to "port" the library, you just need to use it and display it on a web page instead of a Java GUI.
Of course, these can be libraries specially designed for the Java GUI like Swing or AWT. But for the most part, there is no difference in using the Java library in a J2EE or J2SE environment.
source to share
There is no answer to the closed form of what you suggest: bringing the Java library to the browser environment and using its features.
If you are interested in graphical views, here are a few things you can try:
Open Flash Chart - a scripted flash application that will create charts
Bluff is a Javascript library that generates graphics
processing.js - A port of the excellent processing library for Javascript
When it comes to accessing Java-based functions in a browser, there are several approaches for this. One is to use a toolbox like GWT that matches java in an HTML / Javascript / Java application. Another is to use AJAX based technology like Direct Web Remoting . It really depends on what you are trying to accomplish.
source to share