To randomly generate a number between 1 and 250 you type Math.random()*249+1
Type: Posts; User: ajayajayaj
To randomly generate a number between 1 and 250 you type Math.random()*249+1
For another reason my javac command wont work so I have to use automatic ways.
I've uninstalled and re installed java many times.
Here you go:
For an unknown reason when I use the jarsigner command it returns the error of:
When I've googled how it says to use jar signer but it gives the error of:
I don't understand the link you gave to me about signing jars.
I have figured out the problem.
I had a folder with the exact same name for no reason.
Also, now with that working, do I have to have all users of my applet to have the same .java.policy file as...
I can't find any real reasons why it does that.
--- Update ---
Do you know any way I could run this differently?
Here is the complete program that compiles, executes and shows the problem for testing:
public class TestProgram{
public static void main(String args[]){
try {
FileOutputStream test = new...
Yes it does exist.
The error message is:
--- Update ---
What do you mean by:
For some unknown reason, now, I can't access any directory.
But only with that command.
I'm using:
try {
FileOutputStream out = new FileOutputStream(new File("C:\\users\\Ajay\\desktop\\"));...
For testing purposes, I tried accessing many directories.
When I even tried just accessing C:\users\<user>\Desktop\ it wouldn't work!
I get the same error!
Does trying the code in an app mean making a second applet with just hat code?
Oh sorry, I moved the file from the folder instead of copying it.
Now it says the original error:
I did the all permissions.
But now I get the error:
I couldn't find the .java.policy file.
I didn't find it in there?
How do you do that?
Where is the user dir?
Do you have to have every computer to have that file?
So you add that to your applet?
So how do you give it the permission?
It said:
--- Update ---
Also, what I understood from the link you gave me was you have to add the text:
to run the applet instead of the normal code.
On what browser?
Well, I selected Advanced Then selected show console.
But where is the cosole?
I can't find the button.