Running Oracle Forms 11g outside browser - java

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

Related

Why doesn't Tomcat Server have latest HTML updates?

I'am trying to run this project on my local host.
I followed these instructions on how to launch a dynamic web project on Tomcat Server.
Everything works and when I run the application, I see this which is correct
Now I'am trying to play around with the code a bit. I located the html code that corresponds to the new wine page - /WebContent/tpl/wine-details.html
I changed the country label to show states instead.
However when I re run the web application on the Tomcat Server, the label still says country.
Does anyone know what the issue is? I made sure to save the file. What I also found interesting was there were two copies of this file, in backbone-jax-cellar and backbone-jax-cellar-master. I made sure that both copies contained the states label.
If anyone's having this issue still, I recommend just visiting the URL in a web browser. I used Chrome and everything is showing up fine.
I think the problem here is that Eclipse is somehow caching the html page and doesn't update it when it runs the web app

How to call a Java program from a hyperlink locally?

I have a html file, there are links in it, I wonder if there is a way to use those links to call a java program to generate another html file ?
Something like this :
<Html>
<body>
Some text
<A Href=[somehow point to a java .class file to run]>My Link</A>
More text
</Body>
</Html>
I know how to use Java to generate html, what I'm asking here is how to pass a parameter to this local java class so that it can generate html file with the input ?
So if the Java program is called : MyHtmlGen.java
Then the class will be MyHtmlGen.class
And then if I run it from the command line, it would be like this :
> java MyHtmlGen my_input
But I don't know how to turn that into the html link above ?
You could use WebStart to launch an Java application from a browser interaction.
The section of the linked documentation titled: "Running a Java Web Start Application From a Browser" provides a demo you can try. The link to the Java application is provided as:
Launch Notepad Application
That documentation states that when you click the link:
Java Web Start software loads and runs the application based on instructions in the JNLP file.
That isn't the behavior I get on Safari 7.1 on OS X 10.9 with Oracle Java 8u40 installed. Instead, I just get the jnlp file downloaded and can double click on the downloaded file to run the application. I think on some browsers, Oracle may provide a plugin to the browser which is able to launch the jnlp referenced application automatically without the user having to also double click on a downloaded jnlp file. Perhaps if the Java deployment toolkit were used, rather than a straight a href link, the user experience might be a bit more seamless.
Note: browser manufacturers have been phasing out support for plugin technology like this, so the experience or even the ability to automatically run the referenced application may vary for both you and your users. Additionally, allowing such plugins to run within a browser environment can increase the security attack vulnerability surface for a user's browser. WebStart is also quick a tricky technology to use and support for your users. So for these reasons I normally don't recommend using WebStart as a deployment solution.
That's just impossible. A link <a> will fire a GET request to the server for the URI set in the href attribute, it's not meant to execute a specific piece of code. If you want to execute code when clicking a link, use JavaScript, but be aware that JavaScript cannot start an instance of JVM and run your exact Java application.
On the other hand, maybe you should look into Applet or JavaFX and embed the java application in your page. Or probably you may submit an action to the server, and at server side you may start the JVM and execute your Java code.

Browser Compatibility Issues With Java

Java Compatibility
I have been having some trouble with making a custom browser I am using a default class provided by oracle for a custom browser. One thing I noticed with the browser is that it cannot run java applets without some sort of variation of java browser plugins. How exactly do normal browsers receive information from a web server to run a java program externally? Is there any way to somehow point the browser toward the jre to run the app like on a normal browser. Just need somewhere to start. FireFox apparently references some sort of MIME format under the npjp2.dll native found in the jre directory. Thanks Very Much.
Oracle Example
You can provide the user with a standard html download page in order for him to download a JNLP file which is the standard file to start a java web start app (applet). If the user's system has java installed, it must recognize the .jnlp file and assosiate it as a java app. It's an extra step, for the user to manually download the file instead of running automatically on a web browser, however because of recent security loopholes on java web implementations, most browsers don't trust java anymore, therefore the blocking. If you insist on setting up a web start app in a browser you must make sure that all users have appropriate security configurations on ther java installation (very unlikely).
EDIT:
Here's a very nice tutorial on how to achieve what I just explained.
TUTORIAL

run swing application on browser

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.

GWT 2.0 Eclipse plugin - how to automatically launch browser on run / debug?

I've downloaded the new GTW 2.0 and it's eclipse plugin
In the new eclipse plugin, when running or debugging instead of opening the browser, it shows this:
For your convenience, here are some URLs that you may wish to view in development mode. Simply copy/paste a URL below into any supported browser.
At least they could have made the URL clickable (e.g. open your default browser) but you can only copy.
Is there a patent infringment they are trying to avoid? whats so hard in opening a browser link?
It seems they don't support it for some reason, there is no workaround, and it is the intended way.
Notice that your launch configuration
is listed in the view, along with some
suggested URLs to start up your GWT
application. Copy the URL for your
application into the browser's address
bar by selecting the entry and
choosing Copy from the context menu.
Once you have navigated to the startup
URL in your browser, you'll notice
that a browser entry will be added to
the launch configuration:
If anyone from Google reads this, it would be nice to explain why on earth you don't launch the URL?
Strange. I haven't looked at this stuff since GWT 1.8 or so, but at that time my favorite browser would pop right up when the app was launched.
I don't know exactly what's wrong in your case, but I'd check the following:
Does (double) clicking on a .html file in a file browser (Explorer or whatever you use) cause a browser to open up?
What about double clicking"Run as..." on a .jsp file in Eclipse? For me, that fires up Firefox, regardless of GWT. You may want to set up a file association in Eclipse to make this work.

Categories