• Post Reply Bookmark Topic Watch Topic
  • New Topic

Run Java applications in systems which doesn't have JRE  RSS feed

 
Partheban Udayakumar
Ranch Hand
Posts: 499
AngularJS Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am developing a desktop application in Java. I would like to run the application in all the systems irrespective of the JRE presence in the system. As I was going through the websites, I came to know embedding the JRE is an option. But in some sites its discouraged. How do you guys see this? I don't want to install JRE but run Java with the embedded JRE. Is it possible?
 
Dipta P Banerjee
Greenhorn
Posts: 11
Android Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure about the exact reason for not installing JRE to your target machines since installing JRE in a machine is quite common and user will accept that without any concerns if he has trust on your application. Most (or all) the applications written in Java expects that the target machine should have JRE.

In extreme case if you want to run the application in a machine which does not have JRE installed, I guess you have to use script based installer, which will first check the existence JRE, if not present then install the same and then will configure your package (if require).

There are some installers available (example IzPack) but I guess those installer will itself required JRE to be installed. You can look for any script based installer or write your own
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Partheban Udayakumar wrote:I am developing a desktop application in Java. I would like to run the application in all the systems irrespective of the JRE presence in the system. As I was going through the websites, I came to know embedding the JRE is an option. But in some sites its discouraged. How do you guys see this? I don't want to install JRE but run Java with the embedded JRE. Is it possible?

I see it as two diametrically opposed requirements.

If you want to run it on a system that doesn't have a JRE (though why one wouldn't these days, I have no idea) you have no choice but to embed it; and, if the target system doesn't allow embedded JRE's, then it won't work.

It's possible that you could get into the business of signed jars and the like, but it sounds like a lot of cack to me.

I think a better question might be: If it's likely to be run on a system that doesn't have a JRE, why are you writing it in Java?

The language needs a JRE in order to run, and I suspect that, after twenty years, most customers understand this - indeed it's a selling point (or used to be).

HIH

Winston
 
Partheban Udayakumar
Ranch Hand
Posts: 499
AngularJS Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dipta P Banerjee Winston Gutkowski,

Thanks for your comments. We are planning to provide the software through web. So we decided, it is better if we provide JRE with the application. And is there any way where we can activate JRE only when we run our jar? or silent installation of JRE without any prompt?
 
Dipta P Banerjee
Greenhorn
Posts: 11
Android Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I never tried to install it silently, but you can give it a try with the /s option with the installer. Please refer to http://www.oracle.com/technetwork/java/javase/silent-136552.html for the details
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are planning to provide the software through web.

Given that, have you considered distributing via JNLP/JavaWebStart? I believe the deployment scripts for that recognize the absence of a JRE, and offer a convenient way to download and install it.
 
Partheban Udayakumar
Ranch Hand
Posts: 499
AngularJS Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dipta,

Thanks for the link. I will definetly try it out and get back if I have more questions. Is it possible to run the app without jre installation. Obviously jre will be present but without installing it. Use jre only when the application runs.

Ulf,

We have developed it for Windows only as it involves some networking commands, so we are gonna make it an exe and upload it to our webpage. I don't have enough exposure on JNLP or Java Web Start, could you throw me some light on it?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have developed it for Windows only as it involves some networking commands, so we are gonna make it an exe and upload it to our webpage. I don't have enough exposure on JNLP or Java Web Start, could you throw me some light on it?

IMO, a .exe is about the worst way you could distribute a Java program, even if you're just targeting Windows. Start reading here: http://docs.oracle.com/javase/tutorial/deployment/index.html. You can omit the chapter on applets.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!