I have one swing application that i want to run on browser.
What is the best way to achieve it ?
Is jnpl is one this solution ?
I tried jnpl but when i tries to run with -- http://localhost:8080/Test.jnlp -- One error window opens with error unable to launch application
If applet is the solution then , if possible please ,give me one sample applet application.
Thank you in advance
In fact, JNLP won't allow you to run your application a browser (as say the unofficial JNLP FAQ, JNLP!=Applet). It will instead allow you to easily distribute current (and nexts) version of your application to your clients, by simplifying the install process.
The simple way to do it is to transform your application into a real applet (complet with all its usage restrictions), then make this applet detachable, using new Java6 feature. I unfortunatly only found info on that very excellent feature in a blog post.
Related
I have created a Java program that utilizes Chrome Driver, Selenium, and Java Excel API. The program is used to automate a few different processes on Google Chrome. Currently, setting up this automation is more complicated than I would like it to be: the user needs to download a zipped folder, unzip it, download the Java Runtime Environment, and launch the program using the executable.
My goal is to simplify the installation of the automation. Ideally, a user would come to a SharePoint website, fill out a form with the parameters of the automation (potentially upload an Excel Workbook), click an "execute" button, and the automation would run. As a result, the automation would run seamlessly across platforms (Windows and MacOS) without any modifications.
I have researched changing the programming language to achieve this functionality. I concluded that a different language could remove the need for a Java Runtime Environment download, but it would still require some type of installation process. Additionally, I have researched using HTML/JavaScript, but I concluded that this is not possible because the functionality (triggering a web automation from a website) could be used maliciously without the user's knowledge. Finally, I began researching containerization through Docker. This solution seems promising but I do not know enough about it to determine if it is the appropriate solution.
What would be the best route to achieve the results that I am looking for (outlined in the second paragraph)? I have access to enterprise-grade databases that I thought may be useful. Would it be possible to have the form trigger a virtual machine to run the automation on a remote database and then output the result to the user once it has finished?
Thank you in advance for any guidance you can provide. I do not know much about making a Java program into an enterprise-grade application so any information about what to research is extremely useful. Finally, please do not hesitate to correct my logic at any point in this question as I may have drawn the wrong conclusions from my research.
You want to look into creating a jar file with your selenium code.
I am working on a project for my users to generate HTML pages, JS files, CSS files etc... through dragging and dropping visual elements and by going through a series of wizzards. The goal I am trying to achieve is to create an application in which users selects a runtime, for example tomcat or nodeJS and then be able to create content for that specific runtime in the manner described above. Part of this application would be the preparing of your runtime, and by that I mean installing tomcat or nodeJS for you. so the big question here would be, how do I run installers through program code ? (java 7/8 mainly)
what I have tried:
Using a strategy design pattern to determine the host platform and run a series of command in the terminal to execute an installer, problem here is that some installers start a wizzard and require further user input. and in some cases the host platform would require elevated permission. Is there perhaps a solution where one adds arguments to the terminal commands to skip an installation wizzard ?
Any help on this subject would be greatly appreciated.
Answer of Fildor was most usefull.
Recently I found an interesting Java applet which works pretty fine for electronic signature, but due to the recent NPAPI stuff with Chrome browser, I've considered it would be a good thing to migrate this applet to a Java application. HTML5/javascript/etc is not a possibility.
The special requisite is that the application should be launched from a browser, despite not being an applet.
The best approach I have found is as follows:
Create an installer which would create a java executable file in the local user's PC.
Create a javascript function to detect whether the application is installed in the computer (just as iTunes does/used to do).
In order to launch the application, create a custom URI Schema handler which would launch the application when found, sending the required parameters to the application (just like the applet does).
Everything sounds pretty smooth, but it's got certain drawbacks:
It's meant to work on different PC's. That means the URI Schema handler and the application MUST be installed/set up in every single computer I want to use the application in.
Migrating the applet code to a java application. It is an old application which i did not write, and it's got a single class with over four thousand lines.
With that in mind, I could not think of a better option. Is this viable? Any recommendation?
Thanks in advance.
We have an Oracle Forms 11g application which can be started via browser.
This leaves an empty browser window, since Forms opens its own window. However, if you close the empty browser window, the Forms window also get closed.
I like the fact that this kind of installation is a server installation and I can easily update it.
But I would prefer an icon (a shourtcut) on the desktop which just opens the Forms application without the browser window. I hoped to resolve this with the AppletViewer from the Java SDK.
However, when I start it with the URL of the start page I receive:
Warning: <embed> tag requires code attribute.
Exception in thread "main" java.lang.NullPointerException
at sun.applet.AppletViewer.parse(AppletViewer.java:1129)
at sun.applet.AppletViewer.parse(AppletViewer.java:1074)
at sun.applet.Main.run(Main.java:156)
at sun.applet.Main.main(Main.java:98)
Does anyone know how I can open the Forms application directly without the browser (and without a local installation of an app)?
PS: I know Run Oracle Forms as standalone without browser, but it didn't help me, because the referenced link isn't online anymore.
Update 1: the link has been replaced, so this might be a solution I will try.
Update 2: we managed to run our Forms apps via Webstart like any other desktop application. Hurrah!
You can have the the Forms app open in the same browser window it was launched from, just put this in formsweb.cfg:
separateFrame=false
You can checkout the solution using Javascript from this Blog post
We have a "desktop" application written in Java Swing that currently uses Java Web Start to instantiate the app.
We have a need to run this application INSIDE an ActiveX Browser object.
Does anyone know if this is possible and, if so, how it could be done?
Thank you!
EDIT: is there any more information I could offer that might make this question more answerable?
You can try compiling the application with iKVM, basically making it a .NET application which should be able to run within an ActiveX component.
My Java ignorance is showing. It appears that starting in v6 you can run Swing Applications in a Java Applet inside a browser using the same basic jnlp setup (with minor changes) as the Web Start method. There are some security issues I have to work out moving to support v6, but once that is fixed we should be in business!