hi!

I like to call a java file from javascript but run into error indicating unresolved class name. For a classname rd, the error states "rd is null or not a valid class". Can anyone give an idea on how to solve this? Below is my html codes & java sample file. Had been trying for many days but to no avail.

<html>
<head>
<title>Welcome!</title>

<SCRIPT LANGUAGE="JavaScript">

function read()
{
document.rd.reading();
}
</SCRIPT>

</head>
Please click here to begin
<br>
<FORM >
<INPUT TYPE=SUBMIT value="Start!" onClick="read()">

<SCRIPT LANGUAGE="JavaScript">

for(i=0;i<10;i++)
{
document.writeln( "<BR>" + rd.score[i]);
}
</SCRIPT>

</center>
</body>
</html>

import java.io.*;

public class rd
{

public static int MAX = 10;
public static byte[] score = new byte[MAX];

public void reading()
{
.....

}
}