Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 类文件中的魔法值1008813135不兼容_Java_Testing_Hosting - Fatal编程技术网

Java 类文件中的魔法值1008813135不兼容

Java 类文件中的魔法值1008813135不兼容,java,testing,hosting,Java,Testing,Hosting,我什么都试过了。我正在使用000webhost测试小程序。所以我上传了java文件 package game; import java.applet.*; import java.awt.*; public class main extends Applet implements Runnable { int x_pos = 10; int y_pos = 100; int rad = 20; public void init() { setBackground (Color.blu

我什么都试过了。我正在使用000webhost测试小程序。所以我上传了java文件

package game;
import java.applet.*;
import java.awt.*;

public class main extends Applet implements Runnable
{
int x_pos = 10;
int y_pos = 100;
int rad = 20;

public void init()
{
    setBackground (Color.blue);
}
public void start()
{
    Thread th = new Thread (this);
    th.start();
}
public void stop()
{

}
public void destroy()
{

}
public void run()
{
    Thread.currentThread().setPriority(Thread.MIN_PRIORITY);

    while(true)
    {
        x_pos ++;
        repaint();
        try
        {
            Thread.sleep(20);
        }
        catch(InterruptedException ex)
        {

        }
        Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
    }
}
public void paint(Graphics g)
{
    g.setColor(Color.red);
    g.fillOval(x_pos - rad, y_pos - rad, 2*rad,2*rad);
}
}

到服务器。我检查了十六进制代码,前4位数字是CAFEBABE。然后是Html

试验

知道我为什么在类文件错误中得到不兼容的魔法值1008813135吗?

1008813135是 可能服务器上不存在文件“main.java”,java正在尝试加载它得到的错误页面(从