Where is the path to the src folder pointed to by the -classpath option?
You keep leaving that off. You need to have it in the classpath.

What folder is the src folder in? If it is in the beerV1 folder then you only need to add a . to the -classpath you are using:

-classpath D:/tomcat/common/lib/servlet-api.jar;.

Java SE doesn't know about the insides of many types of files.
You will have to
either find a third party package that does know how to make the changes you want to make
or you will need to get documentation for the layout of the contents of the file and write code to add to or update the contents of the file. If you find out what the contents of the file are, then we can help you write the code to change the file.

getting an uninitialized variable

Give the variable a value when you define it.

When you get an error message you should copy and paste here the full text. Just copying part of the message can leave off valuable information.

The code has many missing }s. The if statements at the end of the code all have {s without the matching }s

The code you've posted is trying to do too many things all at once. I suggest again that you do one thing at a time. When you get that one step done, then try adding the next step.
The first step should be getting the user's input into an array. And print it to see what is there.
When you can do that then add the next step.

Did you undererstand my explanation of the problem and how to fix it?

Please post the full text of the error message that shows what the index's value is.

If an array is empty, it does not have a first element (index of 0)
The code should test the array's length BEFORE trying to index into it.
A length of 0 means there are no elements.

Try doing some debugging by adding some println statements that show the values of the variables as they are changed.

Make sure that there is only one object being used. For example are you calling the set method for one object and calling the get method with another object.

If you have problems with your code, please post the code and describre the problems you are having.

Look at the Floating-Point Literals section.
I think a literal is what you are calling a constant.

put all the required libraries, resources everything into single jar file , so that i can use one single jar file .

Extract everything from all the other jar files and use the jar command to put all the extracted files into the single jar file.

The posted command line doesn't have the -classpath option. You should get a different error with that command line. For example: javac: invalid flag: E:/JAVA/JSP/beerV1/src
Please copy the full contents of the command window so we can see what has been entered and what the javac program's response was.

To copy the contents of the command prompt window:
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper left again
Select Edit and click 'Copy'

Paste here.

how will my main function know when the time os over.

The thread could call a method before it exits to tell other code that it is exiting the thread.

if i sleep my main thread will that also make my spawned threads

That shouldn't happen. A call to the sleep() only effects the thread that calls sleep(). The other threads will continue executing.

new Thread(thread_bw3).stop();
This code has several problems.
It makes not sense to create a new thread and immmediate call its stop() method.
The stop() method is deprecated and should not be used.

I'm confused about what you are trying to do. Can you explain in more detail?
Is each thread to have its own duration? The posted code makes it look like there is only one duration for all the threads.

Did you add a listener to the button?

Try another browser.
Contact the authors of the program. The problem looks like its with the HTML and the browser, not with java.

Each thread could get the time it started by calling the System class's currentTimeMillis() method when it starts and call it later in execution and compute the duration the thread has run by subtracting the start value from the current value . When the user time has run out, the thread would exit.

On my Windows 7 system, the path and filename of the executable is:


I copied and renamed the javaw.exe file to a temp folder and executed it with:

C:\Temp\javawxyz.exe Testinsurance

Then looked in the Task Manager and saw javawxyz.exe listed.

No idea.

Have you tried making copies of the javaw.exe file and renaming them?

Re-read my past posts.

Did you try putting the path to the src folder on the -classpath option?

I don't see the path to the src folder in javac's -classpath option. Try putting it there.

Did you write the small test program and test it the two ways I suggested?
What happened?

What is the command line you are using? Do you put the path to the src folder in the -classpath option used in the command line?
I don't know if the javac command will use both the environment variable AND the -classpath option's value.

To see what classpath is used by the java program make a small program with this:

and execute it with a -classpath option and without to see the difference.

Can you copy the html that is loaded and post it here?

Some browsers want the class name on the code= attribute of the <applet tag, not the filename.
For you it could be: code=Client

What browser are you using? Have you tried it in another browser?

What did Google give you?

Which of those 4 steps are you working on? Do one at a time: code it, compile and test it.
When it works move to the next one.
When you have problems and want help, post your questions here.

results[4][5] = i; // problem here nothing gets stored

How do you know? Is the statement executed? It's inside of an if statement.
Add a println immediately after that statement that prints out the value of results[4][5] and the value of i. Then you'll see what was stored in the array.

That doesn't look like valid java code. var is not part of java.

What happened if I omit the "f" at the end?

If it is java, compile and execute the program and see what happens.

create a JAR file which will containt everything required.

You might not need to put the contents of the other jar files into your jar file. The manifest file has a record/line where you can specify other jar files: Class-Path:

One of my manifest files:

Main-Class: CmprFolders
Class-Path: DocumentViewerWParser.jar

Is your question about how to use the jar command
or is it about how to use an IDE?

I'm getting a few errors

You need to post the full text of any error messages that you need help with.

not sure how to continue

To see what is in the token array use the Arrays class's toString() method to format the array for output: System.out.println("an ID "+ java.util.Arrays.toString(theArrayName));
Replace "an ID" with a description of what is being printed.

What does the assignment say you need to do with the tokens that are in the array?

Read the API doc for the packages you are using.

Look at what is to be printed on each line. The first line has one number, the second line has two number. Each line starts with its line number and decrements. Make some loops that follows those rules.

Client.class is not a class name. It looks like a filename.
Can you view the HTML you have loaded and post it?
Some browsers do not like filename where there should be a class name.