I have finished writing my applications, and would like to deploy it as a Java applet.
How can I start this ?
Additionally, how would you deploy it on html page, and pass an argument to the Java applet ?
Here is a tutorial on how to create an applet in eclipse. http://www.roseindia.net/eclipse/applet-eclipse.shtml
If you merely wish to deploy an app. from a web site, look into Java Web Start. JWS can launch a standard frame (or applet) direct from a link on a web page, and has much fewer hassles, while providing many benefits.
Related
I have created a JavaFX app, but it seems that servers do not support UI applications. What is the easiest way to develop Java apps for servers? (In other words, what solution does IntelliJ IDEA have? I don't want to rewrite a lot of code)
JavaFX is a technology for creating desktop (client) application on Java. These application are run on a local computer, that computer the user is currently interacting with.
There is Java WebStart technology. It lets us place the application .jar (java executable) on the server and call it via a link from a web page or direct URL. In this case the application will still be running on user's local computer. At the same time, application deployment can be easily managed, since the application executable is sitting on a single location on the server.
JavaFX works with WebStart, you will need to create a JNLP file. It is a descriptor of the application. Here is some info: Java WebStart
I hope this helps.
Java Web App? if I understand you, get my small advice.
You will have to rewrite all controllers, and change UI fxml forms to web pages (html + thymeleaf, jps, jsf and so on).
If you have bad project architecture, for example: you connect with database and retrieve data into controller classes, methods, it's so bad, and you will rewrite a lot of code.
But if it don't
You should just create web controllers, inject needed services, facades and call needed methods there.
Good luck)
I have a standard java project working local made by another person i know.
It's about data retrieving.
I need to develop a web app supposed to do the same thing but accessible by anyone via browser.
I CAN'T edit the code for that purpose, at least some implementation details. A kind of black box.
Can you suggest me the best approach to make a webapp based on a local executable app through JSP & servlet ecc?
Maybe you can try something like webswing.
What is Webswing ? Webswing is a web server that allows to run any swing application inside your web browser using only pure HTML5.
The best days of swing framework are gone. Desktop applications lost
popularity and everything is forced to be online and mobile. But what
about existing application? Using applet technology proved to be
insecure, rewriting the application to web technology is too
expensive. This is where Webswing can help you. With Webswing, your
application is securely running on server and user's browser only
displays the application window. All this without changing single line
of source code.
How is it possible, to run netbeans project in the browser?
My project have only one frame, and uses swing. I have no idea, how is it possible, to write an embedded java application, for browsers.
You are looking for Java WebStart , take a look to this tutorial in Enabling Java Web Start in Netbeans.
More information Lesson: Java Web Start
Also you may interested in Applets, Lesson: Java Applets
Consider looking into JApplets, this sounds to be what you are looking for.
Links:
Example
Documentation
I think if you want to launch it in Browser then it is better in Netbeans you chose Java EE project. This you can run in browser and you can create much better GUI than swing by using HTML and CSS. Of course it will be applet based.
Check this tutorial
I'm doing my academic project currently. Its based on swings and awt. I am running it in command prompt. Is there any possibility for me to run it on a browser
In order to run a Java application in a browser, you need to make it (or wrap it) in an Applet. A Swing application is actually usually designed as a desktop application (meaning, standalone). Applets tend to be pretty resource-intensive for your user.
You should create an applet probably, that could run in a browser.
An applet can have GUI part too similar to a desktop GUI app.
The GUI of the applet can be based on Swing or AWT.
See also:
http://docs.oracle.com/javase/7/docs/api/java/applet/Applet.html
Take a look at Java Web Start which will allow you to deploy your application as is without any redevelopment of the code.
The First Suggestion is to use Applets. If that is not confortable for you and if you have a simple Swing application, I would recommend that you look at AjaxSwing
I onced used it on a simple Application and it works.
Webstart is another Way to go. You have Options to take, pick the one that works best for you.
Is there any tool that can convert already programmed Swing J2SE into JSP J2EE shell?.
Thanks!
No, there is no such tool. Although you might found some attempts to do it, desktop and WEB paradigms are way too different to have a tool that converts between between them properly.
If you absolutely must run your APP on a WEB environment, you might find easier to convert your Swing application into a Web Applet. It's not the same though. An Applet is basically a Swing application running inside a browser. Not a WEB-WEB application.