• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.io.FileNotFoundException: (Access is denied)

 
Abdullah Khalaf
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dears,
I have a problem 'Strange one'. I have an applet downloads dll files in the jre bin let's say in this path C:\Program Files\Java\jre6\bin.
The problem is some machines working fine but others not.
I tested this code in 4 machines (3 of them 'which are working fine' are xp and the other one is windows 7).
The piece of code which install the dll is below.


.

Your help is highly appreciated
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's probably running under a user account that doesn't have the rights to write to that directory. Windows 7 in particular is much stricter about what a non-admin user is allowed to do.
 
Abdullah Khalaf
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your help, but how can we fix this issue ?
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By ensuring that the user account running the applet has rights to write to that directory. Or by writing the file to a directory that the user always has rights to, like his home directory.
 
Andrew Thompson
Ranch Hand
Posts: 77
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abdullah Khalaf wrote:Dears,
..I have an applet downloads dll files ..


For a plug-in 2 JRE, embed the applet using Java Web Start. For pre plug-in 2 JRE, launch the applet free floating (using JWS).

Web start makes it easy to add DLL or SO resources to the run-time class-path of an application. Even better, it will partition the download by platform, and update the natives (or classes, or resources in Java files) automatically.
 
Abdullah Khalaf
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:By ensuring that the user account running the applet has rights to write to that directory. Or by writing the file to a directory that the user always has rights to, like his home directory.

Thank you again, now I'm installing the dll files in a temp path
But when I load this library 'the required one' an exception is thrown java.lang.UnsatisfiedLinkError: "the path is here" (JVMPORT015E Unable to resolve shared library references - a prerequisite shared library may be missing)
I have a tool of dll dependency, all required dll files are in same directory, except that related to OS, like kernal32.dll.
I'm using this to load the librarySystem.load(Full path with dll name);
Is there any other dll file needed to complete loading process?
 
Abdullah Khalaf
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Andrew Thompson wrote:
Abdullah Khalaf wrote:Dears,
..I have an applet downloads dll files ..


For a plug-in 2 JRE, embed the applet using Java Web Start. For pre plug-in 2 JRE, launch the applet free floating (using JWS).

Web start makes it easy to add DLL or SO resources to the run-time class-path of an application. Even better, it will partition the download by platform, and update the natives (or classes, or resources in Java files) automatically.


Thank you too, I have to use java applet.
 
Andrew Thompson
Ranch Hand
Posts: 77
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abdullah Khalaf wrote:
Andrew Thompson wrote:
Abdullah Khalaf wrote:Dears,
..I have an applet downloads dll files ..


For a plug-in 2 JRE, embed the applet using Java Web Start. For pre plug-in 2 JRE, launch the applet free floating (using JWS).

Web start makes it easy to add DLL or SO resources to the run-time class-path of an application. Even better, it will partition the download by platform, and update the natives (or classes, or resources in Java files) automatically.


Thank you too, I have to use java applet.


That probably explains why I was not talking about launching trout, but launching an applet.

My communication obviously failed. Try reading my post again, and explain to me what you thought I was talking about.
 
Abdullah Khalaf
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Abdullah Khalaf wrote:Dears,
I have a problem 'Strange one'. I have an applet downloads dll files in the jre bin let's say in this path C:\Program Files\Java\jre6\bin.
The problem is some machines working fine but others not.
I tested this code in 4 machines (3 of them 'which are working fine' are xp and the other one is windows 7).
The piece of code which install the dll is below.


.

Your help is highly appreciated

I solved the issue, I installed the dll files in the temp folder which is accessible, and I loaded the dlls which are needed to main one manually.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!