Deploying Java Desktop Application with Java Web Start - java

I have a Java application ready to be deployed. I tried using Java Web Start (JWS) to launch my application. My application was able to launch it loads the MainFrame but some of the functionality does not work. For example my search button (which creates a new thread to search information over the internet) is not working and several other buttons. My application works perfectly as intended when I run it using the typical java -jar or by double-clicking the JAR file. Do you have any ideas why did it happen? Or am I using a wrong technology for deployment? When I read about JWS the thing that I really like is the auto-updating of the application when new versions are released for the app. I really want this feature for future updates.
Solved:
I wasn't aware of the of Web Start Console. My problem is solved now as I was able to see the stack trace. It has something to do with permissions and my JAR file being unsigned.

Related

How to distribute and deploy a java desktop program? ClickOnce for Java?

I have a Java program I made using Eclipse IDE. I can export it as a JAR file, and after manually installing the JRE on other computers, I can run it there.
I am now looking for something similar to ClickOnce in Visual Studio, where you can specify the .NET frameworks needed by your application, and just publish your program to a server. The application would then be downloaded from a webpage, automatically manage program versions, and let users know when a new update is available.
I found that Java Web Start was used for something like this, but it has been deprecated and continued as Open Web Start (https://openwebstart.com/). Is this something that can be integrated in Eclipse? What else could I use for distributing and deploying my program?
Thanks,

How to deploy a Java Play App in production using a Windows environment?

I have built a Java Play app using the latest version. Currently I am running the application using the batch file that gets generated. There's a zip file created inside target->universal folder (When I go to the bin folder inside the extracted folder this batch file is available).
How can I run this in production Windows environment? This play app is a backend service that needs to run continuously. Should this be created as a Windows Service? As in, should I try to run this batch file as a Windows Service through some means? I can't find any online references on this. Any help would be much appreciated.
There are service wrappers available, that can take almost any arbitrary application and run it as a service or daemon on some operating systems. I would highly recommend that you avoid them. Writing secure, performant services for Windows is not trivial. You can however run any script using Windows TaskManager (GUI) or Task Scheduler, and it has all the knobs you need to easily control how your application runs, when it starts and what to do if it crashes.
See schtasks.exe for command line interface reference.

Launch Java application from another application

What I want to do is to have my main Java application to update another java application using Java Web Start and then run the second application "silently" upon user request.
I know Runtime.exec to call javaws and silently import the second application in the cache. I can do that when the first application runs and then I am sure I have an updated copy of the second application. My problem is how to run the second application without showing the Java Web start "Verifying application" window.
Doing some research I see no way to avoid that if I execute the .jnlp. I am wondering whether I can run the second application calling directly the downloaded jar files by passing Java Web Start.
Any Ideas?
Thanks
You have basically two possibilities here:
you can use the JNLP Api service and use the DownloadService;
or use the URLClassLoader and load the remote class.
I don't know if this what you want to do, may be for you it seems as a trick around, forgive me if so...
Why don't you run it as exe, by using process object?
Process process = new ProcessBuilder("C:\\...Desktop\\MyExe.exe").start();
And you can convert your app to exe easily by using jsmooth

Deploying Java Application(Main Class) over Weblogic

I have a Java Application consisting of a Main Class and Java Proxies(Created using Axis 1.4).There are no Servlets or JSP`s
The program takes i/p from an excel sheet.Queries an internet application using Webservices.This process continues until all the records in the Excel have been executed.
Now my First question is how do I deploy this application on Weblogic:As a WAR, EAR or JAR(Not as WAR ofcourse)
If it is a web application we can invoke it by a path like
http://server:port/contxt_root/abc.jsp
but this aint a web application, so how would I invoke it.
In Jdevloper I right Click on Main Class, Click RUN and it starts executing.Now I have to deploy over a Weblogic Server in a Linux System
Second Question: How do I shedule it.Suppose if i want it to run weekly or daily.
For this, you don't need any kind of web related servers, but some kind of a task scheduler, like cron to schedule a command line starting your Java application
You can run your compiled classes too, I'd advise to create a JAR file of them, that makes things a lot more clean.
You could make your program a timer EJB:
http://docs.oracle.com/javaee/6/tutorial/doc/bnboy.html
Just note that Java EE entities don't work to well with local files, so you need to consider where your excel sheet is located.
I'm not so sure you need to make it a Java EE app, just a scheduled program.
Good luck

Finding the jnlp file that started a Java application (Java Web Start)

Background
I've made a Java application that is started by downloading a dynamically generated .jnlp file. What the application does is not really relevant, but its a screenrecorder. The user will download and start several (maybe hundreds) of these applications over time.
Problem
When the program ends I would like to delete the jnlp file that started the application. The point of the program is that nothing should be installed and nothing left behind. That includes the jnlp filed that one download to start it.
Question
Is there a way to find the jnlp file so i can delete it? (Preferably a File object)
Look up system property var jnlpx.origFilenameArg and delete it from the java application.
This worked on Java 6 update 26.

Categories