This discussion is archived
5 Replies Latest reply: Apr 2, 2012 6:51 AM by 921808 RSS

Accept deployment of jar file by email

921808 Newbie
Currently Being Moderated
I'm not sure if this is the correct place to pose this problem. I posted the problem in JDeveloper and ADF a week ago but have had no response. To avoid me rewriting a long explanation you could find it using my no. 918805.
The problem in other words is that I can't get a Windows 7 system to accept and run the program downloaded from my jar file if the recipient computer has account control setting more than minimum security. I need to persuade the recipient computer to present a request to the recipient user to authorise my jar file and allow it to run when downloaded whatever the account control settings.

Edited by: 918805 on 12-Mar-2012 03:49
  • 1. Re: Accept deployment of jar file by email
    sabre150 Expert
    Currently Being Moderated
    918805 wrote:
    I posted the problem in JDeveloper and ADF a week ago but have had no response. To avoid me rewriting a long explanation you could find it using my no. 918805.
    To save a trying to find it, a URL would have been nice!

    "The download just stalls with an exception." - so what exception? The detail matters.

    You don't say what resources your installation uses or where it tries to install things so with so little to go on I suspect you chance of getting a solution to your problem here is about zero. I have no problems running Java programs on Windows 7 as long as I don't try to go outside a user's home environment.
  • 2. Re: Accept deployment of jar file by email
    921808 Newbie
    Currently Being Moderated
    Thanks for responding Sabre150. Sorry, I should have been more helpful. Here is a full updated version.

    I'm using a PC with Windows XP. I'm a private developer. I've written a project in Java and wish to deploy it to other people using email. I've written an Install program (the Main-Class) and successfully packed this in a jar file with the project class files and some data files all as described in the deployment trail in the Java Tutorials. A recipient using a PC with Windows 7 downloads the jar file and runs it to install the project class files and the data files. All this works perfectly PROVIDED User Account Control is NOT set (on the recipient's computer).

    However, when User Account Control IS set on the recipients computer the install program in the jar file starts but then ends because the statement to make the required directory (newProgramDir.mkdir();) doesn't work and the required directory is not created. The install program fails with an IOException (The system cannot find the path specified). The directory address and the statement must be correct because the directory is created properly and the files are downloaded as required when the User Account Control is not set.

    If on the other hand the required directory is created on the computer before running the jar file the install program gets past this point but then ends with an IOException (Access denied) when it tries to make a FileOutputStream using the name of the first class file to be downloaded from the jar file. Again, this name and statement must be correct because the FileOutputStream is created and the files are downloaded as required when the User Account Control is not set.

    It seems to me that when User Account Control is set the computer system should provide the user with a panel advising that an unknown program is being downloaded and request permission for the download to take place, after which the computer system should accept the data in it. However, if this is not automatic would it be possible for me to put statements in my install program in the jar file which in effect would produce the permission request and then enable the permission?

    Can someone advise me how to overcome this problem with my Install program, preferably by showing how I can detect any security and then provide a secure way of providing an authorising panel for the recipient to authorise the download and then to enable the installation? It seems to me that Java should have an answer for this problem but I have not been able to find it.

    I have spent quite a lot of time trying to find a free or commercial package for doing this and either I find them just too complicated and impossible to understand, and/or I just cannot get them to work. Thanks for reading thus far. I would really like to find a Java solution to this problem of not being able to get through the recipient's security settings.

    If your advice is to use a package to create the jar file, I would ask, what do these packages do to get their downloads accepted that I can't do using Java? Thanks for taking the time to read this. I hope you can help me.
  • 3. Re: Accept deployment of jar file by email
    921808 Newbie
    Currently Being Moderated
    Sabre150
    Thanks for your response of 12 March. Did I not provide enough information on 14 March?
    I'm not sure about the significance of your comment when you say "I have no problems running Java programs on Windows 7 as long as I don't try to go outside a user's home environment."
    I'm using a Windows XP, as administrator and sole user admittedly, and have no problems running Java programs anywhere in the system.
    On my Windows 7 machine I am also administrator and sole user and have no problems running Java programs anywhere in the system except I can't run a downloaded program when the Account Control is set on which I can do on my Windows7 machine. What's the difference and how do I resolve the problem for all the other people I might wish to send my software to?
  • 4. Re: Accept deployment of jar file by email
    sabre150 Expert
    Currently Being Moderated
    918805 wrote:
    Thanks for your response of 12 March. Did I not provide enough information on 14 March?
    For me - no. You didn't really address the points I raised.
    I'm not sure about the significance of your comment when you say "I have no problems running Java programs on Windows 7 as long as I don't try to go outside a user's home environment."
    There are only two hard disk area that you should be able to guarantee to create files and directories - the users home directory (System.getProperty("user.home")) and subdirectory tree and the tmp directory ( System.getProperty("java.io.tmpdir") ) and it's subdirectory tree.
    I'm using a Windows XP, as administrator and sole user admittedly, and have no problems running Java programs anywhere in the system.
    XP security is a joke.
    On my Windows 7 machine I am also administrator and sole user and have no problems running Java programs anywhere in the system except I can't run a downloaded program when the Account Control is set on which I can do on my Windows7 machine. What's the difference and how do I resolve the problem for all the other people I might wish to send my software to?
    Don't try to create files and directories outside of the home directory tree or the tmp directory tree. I'm not an expert on Windows but I create cross platform Java programs and they pretty much run anywhere as long as I don't try to create files and directories outside of the two safe areas.
  • 5. Re: Accept deployment of jar file by email
    921808 Newbie
    Currently Being Moderated
    Sabre150
    Thanks for your help.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points