我在LINUX下面装了JDK后
无论我写个什么样的程序(类)
编译时通过后但是执行的时候出现异常阿
而且无论什么程序只要编译通过了执行时都是同一个异常阿
异常信息如下:
Exception in thread "main" java.lang.ClassFormatError: HardcopyWriter (unrecognized class file version)
at java.lang.VMClassLoader.defineClass(libgcj.so.70)
at java.lang.ClassLoader.defineClass(libgcj.so.70)
at java.security.SecureClassLoader.defineClass(libgcj.so.70)
at java.net.URLClassLoader.findClass(libgcj.so.70)
at java.lang.ClassLoader.loadClass(libgcj.so.70)
at java.lang.ClassLoader.loadClass(libgcj.so.70)
at gnu.java.lang.MainThread.run(libgcj.so.70)
大家知道为什么吗帮帮忙阿小弟很着急阿不能写程序了
无论我写个什么样的程序(类)
编译时通过后但是执行的时候出现异常阿
而且无论什么程序只要编译通过了执行时都是同一个异常阿
异常信息如下:
Exception in thread "main" java.lang.ClassFormatError: HardcopyWriter (unrecognized class file version)
at java.lang.VMClassLoader.defineClass(libgcj.so.70)
at java.lang.ClassLoader.defineClass(libgcj.so.70)
at java.security.SecureClassLoader.defineClass(libgcj.so.70)
at java.net.URLClassLoader.findClass(libgcj.so.70)
at java.lang.ClassLoader.loadClass(libgcj.so.70)
at java.lang.ClassLoader.loadClass(libgcj.so.70)
at gnu.java.lang.MainThread.run(libgcj.so.70)
大家知道为什么吗帮帮忙阿小弟很着急阿不能写程序了
默认的路径是本身自带的JRE路径
这样写
/java安装目录/bin/java 你的程序.jar
我1。5和1。6都装了的都是这个问题阿
他提示类的格式不对阿
就是不知道是什么原因
想装系统了但是3D桌面很难弄
不想重装
所以想请大家帮帮忙阿
这个在BAIDU里面不知道怎么搜阿
我就是个CLASS文件
运行就出现异常啊
就是还没有解决啊
大家帮帮忙在想想啊
import java.net.*;
import javax.media.*;
public class playerx extends Frame implements ControllerListener
{
private Player player;
private Component visualComponent;
public playerx()
{this.setVisible(true);this.setSize(500,600);
try{
String s="Snow White 10 Years Later.mpg";
player=Manager.createPlayer(new URL("file:"+s));
visualComponent=player.getVisualComponent();
}
catch(Throwable t){
}
player.addControllerListener(this);
player.prefetch();}
public void controllerUpdate(ControllerEvent e){
this.add(visualComponent);
player.start();
return;
}public static void main(String args[]){
new playerx();}}
大家知道为什么吗
Exception in thread "JMF thread: SendEventQueue: com.sun.media.content.video.mpe
g.Handler" java.lang.NullPointerException
at java.awt.Container.addImpl(Container.java:1027)
at java.awt.Container.add(Container.java:352)
at playerx.controllerUpdate(playerx.java:20)
at com.sun.media.BasicController.dispatchEvent(BasicController.java:1254
)
at com.sun.media.SendEventQueue.processEvent(BasicController.java:1286)
at com.sun.media.util.ThreadedEventQueue.dispatchEvents(ThreadedEventQue
ue.java:65)
at com.sun.media.util.ThreadedEventQueue.run(ThreadedEventQueue.java:92)