Re: applet errors please help
ok, i will explain...
the applet loads and it checks to see if the folder c:\windows\fonts exists, then it download the font into the font folder, then it loads the new url address inside user account. of course there are more then one files downloaded and installed in different places
i need to have my font installed so the page look very nice to users, then it installs a new file in program files for a particular game...
then the browser is redirected to a thank you page where user is informed hes game was updated and everything is fine.
this application application is for users to install what they need for this game. it's very hard for many peoples to follow a tutorial and copy paste by hand files, so this helps a lot. many of them by accidentally erase important files, give wrong extensions to files etc.
let me know if i did something wrong?
Re: applet errors please help
Why are you getting a NullPointerException/ What variable is null? Why is the value of the variable null?
What is involved in downloading a file. What are the steps the applet takes.
Quote:
loads the new url address inside user account.
What does "load" mean?
Re: applet errors please help
Have you looked at using JNLP if you need to read and write files on a user's PC?
Re: applet errors please help
"loads" new url, means the browser is redirected to a thank you page and from there he can go to account page
as you can see the script first check for a temp folder, which usually doesn't exist, then it checks for the font directory in windows, then it write the font, then it goes to the redirect step and finis.
the write and redirect code is not posted on this forum, i only posted the checking directory part. if necessary i can send it to you directly.
i don't know what is JNLP
Re: applet errors please help
And what about the NPE? Have you tracked that down.
Go to this site and read up on what JNLP can do:
The Really Big Index
Re: applet errors please help
nope i didn't track the NPE...
"Ignored exception: java.lang.NullPointerException"
what exactly means this?
Re: applet errors please help
I've never seen that format/text of the message. Does your program print it?
Re: applet errors please help
well, the code is good, the only problem is related to access restriction...
so, i'm asking about a manifest file... what is that what's doing? can manifest file help me in this case?
according to microsoft, the manifest file helps to avoid the access restriction
Step 6: Create and Embed an Application Manifest (UAC)
here you can find a scheme for the UAC...
Can the manifest file from java support such a request?
Re: applet errors please help
Do you have a link to where you got that info. I can't believe that MS would be talking about the java jar file manifest file.
Re: applet errors please help
here's the link again:
Step 6: Create and Embed an Application Manifest (UAC)
ms is talking about an exe file... to add manifest so the user is warned about the application which needs UCC...
Re: applet errors please help
Your code is not an exe file. Its interpreted by the java.exe program.
Re: applet errors please help
yes, i know it's not an exe, but as i know jar files contains a manifest, isn't this manifest inside jar file causing me the problem?
Re: applet errors please help
I'm sure that the word manifest is used in many different places and that it has many different shapes and purposes.
I don't know if the manifest file is the problem. If you can give yourself permission to access a user's PC then there is no security protection for the user.
Re: applet errors please help
i have 2 new questions:
1. If i sign the jar file with a CA certificate will solve my problem?!
2. At this point, without this permission i would like to redirect the users to a page that says the applet was did not succeed to make the changes, and it must be installed manually. Is this possible?
thank you!
Re: applet errors please help
1) I don't know.
2) The showDocument method can be used to ask the browser to load a page.