我编了如下一个程序,可是为什么能在javac 命令中通过,可是却运行不了java命令
import javax.swing.JOptionPane;
public class E {
public static void main ( String args [] )
{
String shu = JOptionPane.showInputDialog ("请输入数据:"),
result = "";
int zhi = Integer.parseInt ( shu ),
e = 1,
i = 1;
while ( zhi > 0 )
{
for ( int j = 1;j < zhi;j++)
{
i = i*j ;
}
e += (1/i);
zhi++;
}
result = " E的值是:"+e;
JOptionPane.showMessageDialog (null,result,"结果",JOptionPane.WARNING_MESSAGE);
}
}