Exception in thread "main" java.lang.NoSuchMethodError: main [问题点数:20分,结帖人moruo2002]

Bbs1
本版专家分:0
结帖率 100%
Bbs1
本版专家分:0
Bbs4
本版专家分:1542
Bbs7
本版专家分:12088
Bbs4
本版专家分:1542
Bbs3
本版专家分:866
Bbs7
本版专家分:18321
Bbs1
本版专家分:0
Bbs1
本版专家分:0
Bbs1
本版专家分:85
Bbs1
本版专家分:0
Bbs3
本版专家分:814
Bbs1
本版专家分:0
Bbs1
本版专家分:0
Bbs1
本版专家分:85
main" java.lang.NoSuchMethodError">java 编译时 错误提示 Exception in thread "main" java.lang.NoSuchMethodError
public class TemplateTarenarn public static void mian(String[] aergfs)rn rn Course a=new jjStudy();rn a.study();rn rnrn rnabstract class Coursern public final void study()rn unix();rn oracle();rn cpp();rn ucpp();rn java();rn rn public abstract void unix();rn public abstract void oracle();rn public abstract void cpp();rn public abstract void ucpp();rn public abstract void java();rn rn rnclass jjStudy extends Coursern public void unix()rn System.out.println("记命令");rn rn public void oracle()rn System.out.println("熟悉表结构");rn rn public void cpp()rn System.out.println("理解");rn rn public void ucpp()rn System.out.println("应用");rn rn public void java()rn System.out.println("比较着学习");rn rnrnrn一个联系模版的小程序,编译时可以通过但是运行时就不能够通过,望高手帮助
main" java.lang.NoSuchMethodError: main 帮忙解决下吧!">Exception in thread "main" java.lang.NoSuchMethodError: main 帮忙解决下吧!
小弟,刚学java但是书中许多许多的例子都不能运行 都显示Exception in <em>thread</em> "<em>main</em>" java.lang.NoSuchMethodError: <em>main</em> 我看了许多相关的帖子,然后我把我能看到的jar都设置到classpath里去了但是还是出现这问题!郁闷了!谁帮忙解决下!谢谢了喔!我jdk1.5.0和1.6.0都试了还是有这问题.....
main" java.lang.NoSuchMethodError: main">编译通过运行时不行,提示Exception in thread "main" java.lang.NoSuchMethodError: main
不知道怎么解决谢谢。程序是think in java 上的,还有我自己编的一个也是这样
main" java.lang.NoSuchmethodError:main这是什么错?">Exception in thread "main" java.lang.NoSuchmethodError:main这是什么错?
rt,用javac编译通过,没有报错,用java命令的时候就会出现这句话rnrn是什么问题?
main"">确定有main方法啊啊!java.lang.NoSuchMethodError: main Exception in thread "main"
哪位大神能运行一下下面的代码么 ,这代码除了有个内部类,应该没什么特别的了>_< google了很久米有解决诶。rnrn[color=#FF0000]java.lang.NoSuchMethodError: <em>main</em>rnException in <em>thread</em> "<em>main</em>" [/color]rn[code=Java]rnimport java.util.Stack;rnrnpublic class Maze rnrn private static byte maze[][] = new byte[12][12];rn //private int m_col,m_row;rn private static Stack path;rn private static int size = 10;// size=row=colrn rn public static void <em>main</em>(String[] args) rn rn // TODO Auto-generated method stubrn Maze maze1 = new Maze();rn maze1.inputMaze();rn if(maze1.findPath())rn System.out.println("Find Path!");rn //outputPath();rn elsern System.out.println("No Path!");rn rn rn //内部类rn static class Positionrn rn private int col;// = m_col;rn private int row;// = m_row;rn public Position(int i, int j) rn rn // TODO Auto-generated constructor stubrn row = i;rn col = j;rn rn rnrn private static void inputMaze()rn rn byte maze[][] =rn rn 0,1,1,1,1,1,0,0,0,0,rn 0,0,0,0,0,1,0,1,0,0,rn 0,0,0,1,0,1,0,0,0,0,rn 0,1,0,1,0,1,0,1,1,0,rn 0,1,0,1,0,1,0,1,0,0,rn 0,1,1,1,0,1,0,1,0,1,rn 0,1,0,0,0,1,0,1,0,1,rn 0,1,0,1,1,1,0,1,0,0,rn 1,0,0,0,0,0,0,1,0,0,rn 0,0,0,0,1,1,1,1,0,0rn ;rn rn rn private static boolean findPath()rn rn path = new Stack();rn rn //initialize offsetsrn Position [] offset = new Position [4];rn offset[0] = new Position(0,1); //rightrn offset[1] = new Position(1,0); //downrn offset[2] = new Position(0,-1); //leftrn offset[3] = new Position(-1,0); //uprn rn //initialize wall of obstacles around mazern for(int i = 0; i <= 3) //yesrn rn //move to maze[r][c]rn path.push(here);rn here = new Position(r,c);rn maze[r][c] = 1;rn option = 0;rn rn else rn rn if(path.empty())rn return false;rn Position next = (Position)path.pop();rn if(next.row == here.row)rn option = 2 + next.col - here.col;rn elsern option = 3 + next.row - here.row;rn here = next;rn rn rn return true; //at exitrn rn rn //private static void outputPath()rn //rn rn //rnrn[/code]
main" java.lang.NoSuchMethodError: main">运行时出现这样的问题Exception in thread "main" java.lang.NoSuchMethodError: main
请问运行时出现这样的问题:rnHelloWorldApplet.class已编译出。rnrn然后运行:java HelloWorldAppletrnrn出现:Exception in <em>thread</em> "<em>main</em>" java.lang.NoSuchMethodError: <em>main</em>rnrn请问如何解决?
main" java.lang.NoSuchMethodError;main">Applet编译后运行出现Exception in thread "main" java.lang.NoSuchMethodError;main
import java.applet.*;rnimport java.awt.*;rnrnpublic class a3 extends Appletrnpublic void paint(Graphics g)rn int x=2,y=1;rn switch(x+y)rn rn case 1 :rn g.setColor(Color.red);rn g.drawString("i am 1",5,10);rn break; rn case 2:rn g.setColor(Color.blue);rn g.drawString("i am 2",5,10);rn break; rn case 3: rn g.setColor(Color.green);rn g.drawString("i am 3",5,10);rn break; rn default:rn g.drawString("?????",5,10);rn rn rnrnrn编译后运行出现rnException in <em>thread</em> "<em>main</em>" java.lang.NoSuchMethodError;<em>main</em>rn什么问题rn怎样解决rn
main" java.lang.NoSuchMethodError: main是什么意思?">新手提问:Exception in thread "main" java.lang.NoSuchMethodError: main是什么意思?
Exception in <em>thread</em> "<em>main</em>" java.lang.NoSuchMethodError: <em>main</em>是什么意思?
main" java.lang.NoSuchMethodError: main">为什么这样报错?Exception in thread "main" java.lang.NoSuchMethodError: main
源程序只这样的:rnpublic class Lesson51rnrn int x;rn int y;rn public void prt1()rn rn System.out.println("This is public prt1!");rn rn private void prt2()rn rn System.out.println("This is priviate prt2!");rn rn protected void prt3()rn rn System.out.println("this is protected prt3!");rn rnrnrnrnclass prtmnrnrn public static void <em>main</em>(String [] args)rn rn Lesson51 p11 = new Lesson51();rn p11.prt1();rn //p11.prt2();rn p11.prt3();rn rnrn这样运行:rnE:\myjava\Lesson51>java Lesson51rnException in <em>thread</em> "<em>main</em>" java.lang.NoSuchMethodError: <em>main</em>rnrnclasspath是这样设置的:rn.;C:\j2sdk1.4.2_04\lib\tools.jarrnrn
main" java.lang.NoSuchMethodError: main">为什么会出现Exception in thread "main" java.lang.NoSuchMethodError: main
代码很简单rnimport java.util.*;rnpublic class examplernrnpublic static void <em>main</em>(String args[])rn rn tryrn rnrn System.out.println("example");rnrn rn catch(Exception e)rn rn //to do nothingrn rn rnrn编译通过,运行的时候就会输出Exception in <em>thread</em> "<em>main</em>" java.lang.NoSuchMethodError: <em>main</em>rnrn不论是用jdk运行还是用jcreator运行都是这样.rnrn但是在另一个同学的机子上,jcreator可以有输出,jdk运行的时候也是报同样的错误
main" java.lang.NoSuchMethodError:main是什么原因?">出现如下提示:Exception in thread "main" java.lang.NoSuchMethodError:main是什么原因?
出现如下提示:Exception in <em>thread</em> "<em>main</em>" java.lang.NoSuchMethodError:<em>main</em>是什么原因?rn源代码如下,用JAVAC编译通过了,用JAVA运行时出错了.rnclass point rnrn int x,y ;rn point(int x1 , int y1)rn rn x= x1;rn y= y1;rn rn point()rn rn this (0,0);rn rn void moveto(int x1,int y1)rn rn x=x1;rn y=y1;rn System.out.println(x);rn System.out.println(y);rnrn rnrnrn
main" java.lang.NoSuchMethodError:main">运行提示:Exception in threa "main" java.lang.NoSuchMethodError:main
import javax.microedition.midlet.*;rnpublic class HelloMIDlet extends MIDletrnrn public HelloMIDlet()rn rn //建構式rn rn public void startApp()rn rn rn public void pauseApp()rn rn rn public void destroyApp(boolean unconditional)rn rn rnrnrn运行提示:Exception in threa "<em>main</em>" java.lang.NoSuchMethodError:<em>main</em>rnrn请问问题出在那
main" java.lang.NullPointerException">Exception in thread "main" java.lang.NullPointerException
希望高手指点
main" java.lang.NoClassDefFoundError:">Exception in thread "main" java.lang.NoClassDefFoundError:
编译通过rn在执行时出现如下错误是什么原因:rnException in <em>thread</em> "<em>main</em>" java.lang.NoClassDefFoundError:rnrnrn
main" java.lang.OutOfMemoryError">Exception in thread "main" java.lang.OutOfMemoryError
都有什么原因能引起这种异常!rn我的这段代码大概如下:其中是vec是Vector类型的entry是自定义的对象,s2i是将String转化为int的函数,去掉这段代码就可以运行了,rnrnfor (int i = 0; i < vec.size() - 1 ; i++ )rnrnEntry this_entry = (Entry)vec.elementAt(i);rnEntry next_entry = (Entry)vec.elementAt(i+1);rnrnString this_s_time = this_entry.getStart_time();rnString this_e_time = this_entry.getEnd_time();rnint this_edaban = this_entry.getEdaban();rnrnrnString next_s_time = next_entry.getStart_time();rnString next_e_time = next_entry.getEnd_time();rnint next_edaban = next_entry.getEdaban();rn rnrnrnif (s2i(next_s_time) < s2i(this_e_time))rnrn if (this_edaban < next_edaban)rnrnnext_entry.setStart_time(this_e_time);rnvec.setElementAt(next_entry, i+1);rnrnelsernrnthis_entry.setEnd_time(next_s_time);rnvec.setElementAt(this_entry, i);rnrnrnif (s2i(next_s_time) > s2i(this_e_time))rnint add_cellCount = getCellCount(next_s_time, this_e_time);rnEntry add_entry = new Entry(this_e_time, next_s_time, add_cellCount);rnvec.insertElementAt(add_entry, i+1);rnrnrnrn
main"">java.lang.NoClassDefFoundError: Exception in thread "main"
刚开始学习并发 遇到一个问题,请高手帮忙解决rnrn//LiftOff.javarn public class LiftOff implements Runnablern protected int countDown=10;rn public static int taskCount=0;rn private final int id =taskCount++;rn public LiftOff()rn public LiftOff(int countDown)rn this.countDown=countDown;rn rn rn public String status()rn return "#"+id+"("+rn (countDown>0?countDown:"LiftOff!")+"), ";rn rn public void run()rn while(countDown0)rn System.out.println(status());rn Thread.yield();rn rn rn rn rnrn//MainThread.javarnpublic class MainThread rnrn public static void <em>main</em>(String[] args) rn // TODO 自动生成方法存根rn rn LiftOff launch=new LiftOff();rn launch.run();rn rn rnrnrn1在eclipse中运行输出java.lang.NoClassDefFoundError ,同一包中的其他程序运行无异常rn2使用命令编译运行无误rn怎么解决rnrnrn
exception in thread main???
java.lang.NoClassDefFoundErrorrn请问是怎么回事?多谢!
main" org.springframework.beans.factory.BeanCreationExcep">Exception in thread "main" org.springframework.beans.factory.BeanCreationExcep
Exception in <em>thread</em> "<em>main</em>" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [D:\work\travl\target\classes\spring-mybatis.xml]: Initialization of bean failed; nested <em>exception</em> is org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'org.springframework.core.io.Resource[]' for property 'mapperLocations'; nested <em>exception</em> is java.lang.IllegalArgumentException: Could not resolve resource location pattern [classpath:com/hbnu/travl/mapping/*.xml]: class path resource [com/hbnu/travl/mapping/] cannot be resolved to URL because it does not existrn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:681)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)rn at com.hbnu.travl.control.TestControl.<em>main</em>(TestControl.java:44)rnCaused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type 'java.lang.String' to required type 'org.springframework.core.io.Resource[]' for property 'mapperLocations'; nested <em>exception</em> is java.lang.IllegalArgumentException: Could not resolve resource location pattern [classpath:com/hbnu/travl/mapping/*.xml]: class path resource [com/hbnu/travl/mapping/] cannot be resolved to URL because it does not existrn at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:479)rn at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:511)rn at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:505)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1502)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1461)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1197)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)rn ... 11 morernCaused by: java.lang.IllegalArgumentException: Could not resolve resource location pattern [classpath:com/hbnu/travl/mapping/*.xml]: class path resource [com/hbnu/travl/mapping/] cannot be resolved to URL because it does not existrn at org.springframework.core.io.support.ResourceArrayPropertyEditor.setAsText(ResourceArrayPropertyEditor.java:140)rn at org.springframework.beans.TypeConverterDelegate.doConvertTextValue(TypeConverterDelegate.java:430)rn at org.springframework.beans.TypeConverterDelegate.doConvertValue(TypeConverterDelegate.java:403)rn at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:181)rn at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:459)rn ... 17 morernrnrnrnrnrnrnrnrnrnrnrnrnrn请问大神怎么回事rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn rnrnrn
main"">Exception in thread "main"
JAVA新手,写了一个计算复数加减乘除的程序,没有语法错误,却出现了运行错误,找不出相应的错误,请指教!rn以下是代码:rnclass Complexrnrn // a为实部,b为虚部rn private double a;rn private double b;rn rn public Complex()rn rn rn rn public Complex(double a, double b)rn rn this.a = a;rn this.b = b;rn rn rn // 设置相关属性rn public void setA(double a)rn rn this.a = a;rn rn public void setB(double b)rn rn this.b = b;rn rn rn // 得到相关属性rn public double getA()rn rn return a;rn rn public double getB()rn rn return b;rn rn rn // 重写Object类的toString()方法rn public String toString()rn rn return "(" + a + " + " + b + "i)";rn rnrnpublic class ComplexTestrnrn private static Complex c;rn public static Complex add(Complex c1, Complex c2)rn rn c = null;rn c.setA(c1.getA() + c2.getA());rn c.setB(c1.getB() + c2.getB());rn return c;rn rn public static Complex subtract(Complex c1, Complex c2)rn rn c = null;rn c.setA(c1.getA() - c2.getA());rn c.setB(c1.getB() - c2.getB());rn return c;rn rn public static Complex multiply(Complex c1, Complex c2)rn rn c = null;rn c.setA(c1.getA() * c2.getA() - c1.getB() * c2.getB());rn c.setB(c1.getB() * c2.getA() + c1.getA() * c2.getB());rn return c;rn rn public static Complex divide(Complex c1, Complex c2)rn rn c = null;rn c.setA((c1.getA() * c2.getA() + c1.getB() * c2.getB()) /rn (c2.getA() * c2.getA() + c2.getB() * c2.getB()));rn c.setB((c1.getB() * c2.getA() - c1.getA() * c2.getB()) /rn (c2.getA() * c2.getA() + c2.getB() * c2.getB()));rn return c;rn rn public static void <em>main</em>(String args[])rn rn Complex c1 = new Complex(1, 2);rn Complex c2 = new Complex(3, 4);rn System.out.println(add(c1, c2));rn System.out.println(subtract(c1, c2));rn System.out.println(multiply(c1, c2));rn System.out.println(divide(c1, c2));rn rn rnrn
main" java.lang.Error">Exception in thread "main" java.lang.Error
package com.dlhs;nclass Person()n n public void setName(String name)n this.name=name;n n public void setAge(int age)n this.age=age;n n public return String getName()n return name;n n public return int getAge()n return age;n nnnclass Student extends Person()n n public return String getSchool()n return school;n n public void setSchool(String school)n this.school =school;n nnpublic class Testn public static void <em>main</em>(String args[])n public String school;n public String name;n public int age;n Student student =new Student();n student.setName("john");n student.setAge(18);n student.setSchool("SCH");n System.out.println(student.getName());n System.out.println(student.getAge());n System.out.println(student.getSchool());nnn
main" java.lang.UnsatisfiedLinkError">Exception in thread "main" java.lang.UnsatisfiedLinkError
Exception in <em>thread</em> "<em>main</em>" java.lang.UnsatisfiedLinkError: com.sun.midp.<em>main</em>.Configuration.getProperty0(Ljava/lang/String;)Ljava/lang/String;rn at com.sun.midp.<em>main</em>.Configuration.getProperty0(Native Method)rn at com.sun.midp.<em>main</em>.Configuration.getProperty(Configuration.java:32)rn at com.sun.midp.lcdui.Resource.(Resource.java:30)rn at com.sun.midp.<em>main</em>.Main.initSystemLabels(Main.java:686)rn at com.sun.midp.<em>main</em>.Main.<em>main</em>(Main.java:103)rnthanks!!!!help me please
main"java.lang.ArrayIndexOutofBoundsException">Exception in thread "main"java.lang.ArrayIndexOutofBoundsException
这是我写的一个小拼图游戏 就是把0-8按顺序拼好 可是在DOS运行提示我14和34行Exception in <em>thread</em> "<em>main</em>"java.lang.ArrayIndexOutofBoundsException 求指点!不胜感激!rnrnimport javax.swing.*;rnimport java.awt.*;rnimport java.awt.event.*;rnimport java.util.ArrayList;rnrnpublic class SlidingPuzzle implements MouseListenerrn public static int level=3;rn public PuzzleTile[][] XueButtonArray= new PuzzleTile[level-1][level-1];rn JFrame Xueframe= new JFrame();rn JPanel Xuepanel= new JPanel();rn rn public static void <em>main</em>(String[] args)rn SlidingPuzzle XueGame= new SlidingPuzzle();rn [color=#FF0000]XueGame.start();[/color]rn rn rn public void start()rn Xueframe.setTitle("Numeric Slding Puzzle");rn Container XueContainer=Xueframe.getContentPane();rn XueContainer.setLayout(new GridLayout(level,level,1,1));rn rn int[][] a=new int[level][level];rn a[0][0]=(int)(Math.random()*(level*level));rn this.XueButtonArray[0][0]=new PuzzleTile(a[0][0]);rn this.XueButtonArray[0][0].setTileNumber(""+a[0][0]);rn this.XueButtonArray[0][0].addMouseListener(this); rn XueContainer.add(XueButtonArray[0][0]);rn for(int i=0;i
main" java.lang.NoClassDefFoundError">Exception in thread "main" java.lang.NoClassDefFoundError
public class HelloWorldrnrn public static void <em>main</em>(String[] args)rn rn String s="Hello world.";rn System.out.println(s);rn rnrnrn很简单的一个程序。rn刚开始:javac HelloWorld.java okrn然后:java HelloWorldrn就报这个错误!如何解决
main" java.lang.VerifyError:">Exception in thread "main" java.lang.VerifyError:
[b]Exception in <em>thread</em> "<em>main</em>" java.lang.VerifyError: (class: org/apache/hadoop/mapred/JobTrackerInstrumentation, method: create signature: (Lorg/apache/hadoop/mapred/JobTracker;Lorg/apache/hadoop/mapred/JobConf;)Lorg/apache/hadoop/mapred/JobTrackerInstrumentation;) Incompatible argument to function[/b]rnrn这个错误怎样解决?
main" java.lang.LinkageError:">Exception in thread "main" java.lang.LinkageError:
调用外部接口,通过myeclipse--web server client 一系列操作,得到一些文件,然后写测试demo,rnpublic static void <em>main</em>(String[] args) rn // TODO Auto-generated method stubrn EntpriseInfoImplService ent = new EntpriseInfoImplService();rn EntpriseInfoInterface eif = ent.getEntpriseInfoImplPort();rn String info=eif.findEnt(1, 2, "");rn //eif.findEnt(0, 10, "");rn System.out.println(info);rn //System.out.println(System.getProperty("java.endorsed.dirs")); rn rn rnrun as 运行报错:rnException in <em>thread</em> "<em>main</em>" java.lang.LinkageError: JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/F:/Program%20Files/Eclipse/Common/plugins/com.genuitec.eclipse.ws.xfire_9.0.0.me201211011550/lib/webservices-rt.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.5.0/docs/guide/standards/)rn at com.sun.xml.bind.v2.model.impl.ModelBuilder.(ModelBuilder.java:173)rn at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:422)rn at com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:286)rn at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)rn at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:601)rn at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:210)rn at javax.xml.bind.ContextFinder.find(ContextFinder.java:368)rn at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)rn at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)rn at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:276)rn at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:273)rn at java.security.AccessController.doPrivileged(Native Method)rn at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:273)rn at com.sun.xml.ws.spi.ProviderImpl.(ProviderImpl.java:98)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)rn at java.lang.reflect.Constructor.newInstance(Constructor.java:525)rn at java.lang.Class.newInstance0(Class.java:374)rn at java.lang.Class.newInstance(Class.java:327)rn at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:36)rn at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:95)rn at javax.xml.ws.spi.Provider.provider(Provider.java:76)rn at javax.xml.ws.Service.(Service.java:57)rn at com.dj.entservice.EntpriseInfoImplService.(EntpriseInfoImplService.java:56)rn at com.dj.entservice.TestEntpriseinfo.<em>main</em>(TestEntpriseinfo.java:14)rnrn在网上查的解决办法不对,请大家来分析一下是什么原因呢rn
main" java.lang.NoClassDefFoundError:***">Exception in thread "main" java.lang.NoClassDefFoundError:***
同样的class在别的机器上可以RUNrn为什么到了我的机器上就出现这个提示啊rn我的PATH和他们的是一样的
main" java.lang.ArrayIndexOutOfBoundsException">Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
[code=Java]rnpublic class UseStudent rnrn String Sname;rn int SNo;rn int age;rnrn UseStudent(String Sna, int Sno,int ag) rn Sname = Sna;rn SNo = Sno;rn age = ag;rn rnrn public static void <em>main</em>(String args[]) rnrn int i,j;rnrn UseStudent[] myarray =new UseStudent[3];rn for(i=0;i java.lang.ArrayIndexOutOfBoundsException: 3rn at UseStudent.<em>main</em>(UseStudent.java:19)rn
main" java.lang.NoclassDefFoundError:***">exception in thread "main" java.lang.NoclassDefFoundError:***
我想运行程序的话就提示这样:rn<em>exception</em> in <em>thread</em> "<em>main</em>" java.lang.NoclassDefFoundError:***rn是不是类库的问题,还是什么问题?
main" 问题">Exception in thread "main" 问题
[code=java]import java.security.MessageDigest;rnimport java.security.NoSuchAlgorithmException;rnrnrnpublic class MD5Test rn /**rn * @param argsrn */rn public static void <em>main</em>(String[] args) rn String s = "123456";rn char hexDigits[] = rn '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',rn 'a', 'b', 'c', 'd', 'e', 'f'rn ;rn char str[];rn byte strTemp[] = s.getBytes();rn try rn MessageDigest mdTemp = MessageDigest.getInstance("MD5");rn mdTemp.update(strTemp);rn byte md[] = mdTemp.digest();rn int j = md.length;rn str = new char[j * 2];rn int k = 0;rn for (int i = 0; i < j; i++)rn byte byte0 = md[i];rn str[k++] = hexDigits[byte0 >>> 4 & 0xf];rn str[k++] = hexDigits[byte0 & 0xf];rn rn System.out.println(str);rn catch (NoSuchAlgorithmException e) rn e.printStackTrace();rn rn rnrn[/code]这是我的全部代码,我想以往一样,run as java application,结果说could not find the <em>main</em>rn控制台显示 java.lang.ClassNotFoundException,求大神帮忙解决下。在附加一个问题,我网上看到说md5加密已经到几秒就能被破解的地步了,那现在一般都用什么加密急速啊
main"">java.lang.SecurityException Exception in thread "main"
Exception in <em>thread</em> "<em>main</em>" java.lang.SecurityException: Prohibited package name: java.sip.communicator.registrationrn at java.lang.ClassLoader.preDefineClass(ClassLoader.java:649)rn at java.lang.ClassLoader.defineClass(ClassLoader.java:785)rn at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)rn at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)rn at java.net.URLClassLoader.access$100(URLClassLoader.java:71)rn at java.net.URLClassLoader$1.run(URLClassLoader.java:361)rn at java.net.URLClassLoader$1.run(URLClassLoader.java:355)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(URLClassLoader.java:354)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:423)rn at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:356)rn at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:472)rnrn请问大侠知道的告诉一下.
main"java.lang.NoclassDefFoundError">Exception in thread "main"java.lang.NoclassDefFoundError
出错Exception in <em>thread</em> "<em>main</em>"java.lang.NoclassDefFoundErrorrn代码如下:rn-----------------------rnpackage hello;rnpublic class Hellorn public static voidrn <em>main</em>(String arg[]) rn System.out.println(new String("Hello, World!"));rn rn
main" java.lang.UnsupportedClassVersionError">Exception in thread "main" java.lang.UnsupportedClassVersionError
小弟最近遇到个错误,rn'Exception in <em>thread</em> -rn"<em>main</em>"java.lang.UnsupportedClassVersionError',望高手们赐教!
main" java.">Exception in thread "main" java.
rn class ck rnrn /**rn * @param argsrn */rn public static void <em>main</em>(String[] args) rn // TODO Auto-generated method stubrn int n=Integer.parseInt(args[0]);rn for(int i=1;i=i;k--)rn rn System.out.print(" ");rn rn rn for(int j=1;j java.lang.ArrayIndexOutOfBoundsException: 0rn at ck.<em>main</em>(ck.java:9)rn
main" java.long.NoClassDefFoundError:">exception in thread "main" java.long.NoClassDefFoundError:
出学JAVA 不知,做了小“hello"的程序,编译过了,可到执行时就出了上面的rn东东。请大家帮我。我想了想可能是java运行环境没有设好,可是编译过了,不明rn请大家帮忙。
main" java.lang.StackOverflowError">Exception in thread "main" java.lang.StackOverflowError
在使用快速排序对100万数据进行递归调用出现栈溢出,怎么解决???
main" java.lang.NullPointerExce">Exception in thread "main" java.lang.NullPointerExce
class CreaditCard rn private String name;rn private String password;rn private int balance;rn public CreaditCard(String name,String passowrd) rn this.name = name;rn this.password = password;rn rn public CreaditCard() rn rn public String getName() rn return name;rn rn public int seeBalance() rn return balance;rn rn public void setPassword(String password) rn this.password = password;rn rn public void setBalance(int balance) rn this.balance += balance;rn rn public boolean getBalance(int balance) rn boolean b = true;rn if(this.balance
main" org.springframework.beans.factory.BeanCreationExcepti">Exception in thread "main" org.springframework.beans.factory.BeanCreationExcepti
[code=java]Exception in <em>thread</em> "<em>main</em>" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested <em>exception</em> is org.hibernate.MappingException: An AnnotationConfiguration instance is required to use rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)rn at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)rn at lee.Main.<em>main</em>(Main.java:18)rnCaused by: org.hibernate.MappingException: An AnnotationConfiguration instance is required to use rn at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1648)rn at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1603)rn at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1582)rn at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1556)rn at org.hibernate.cfg.Configuration.configure(Configuration.java:1491)rn at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:642)rn at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)rn ... 12 more[/code]rnrnhibernate.cfg.xmlrn[code=java]rnrnrnrnrn rn jdbc:mysql://127.0.0.1:3306/mysqlrn rootrn 123456rn com.mysql.jdbc.Driverrn testrn rn truern truern updatern org.hibernate.dialect.MySQL5InnoDBDialectrn rn rn rn rnrn[/code]rnrnrnapplicationContext.xmlrn[code=java]rnrnrnrn rn rnrn rn rn rn rn rn [/code]rnrn
java:Exception in threadmain
文件一:rnpublic class PointDemornprivate class Point//成员内嵌类rn//私有域成员rnprivate int x,y;rn//构造rnpublic Point()rn//设置rnpublic void setPoint(int x,int y)rnthis.x=x;rnthis.y=y;rnrn//获得rnpublic int getX()return x;rnpublic int getY()return y;rnrnrn//域成员rnprivate Point[] points;rn//构造rnpublic PointDemo(int length)rnpoints = new Point[length];rnfor(int i=0;i
main" javax.naming.CommunicationException">Exception in thread "main" javax.naming.CommunicationException
运行一个简单的Ejb,出现以下异常rnException in <em>thread</em> "<em>main</em>" javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root <em>exception</em> is java.net.SocketTimeoutException: Receive timed out] [Root <em>exception</em> is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root <em>exception</em> is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root <em>exception</em> is java.net.ConnectException: Connection refused: connect]]]rn at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1414)rn at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:594)rn at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)rn at javax.naming.InitialContext.lookup(InitialContext.java:392)rn at com.jack.ejb.FirstEjbClient.<em>main</em>(FirstEjbClient.java:8)rnCaused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root <em>exception</em> is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root <em>exception</em> is java.net.ConnectException: Connection refused: connect]]rn at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:269)rn at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)rn ... 4 morernCaused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root <em>exception</em> is java.net.ConnectException: Connection refused: connect]rn at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:243)rn ... 5 morernCaused by: java.net.ConnectException: Connection refused: connectrn at java.net.PlainSocketImpl.socketConnect(Native Method)rn at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)rn at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)rn at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)rn at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)rn at java.net.Socket.connect(Socket.java:519)rn at java.net.Socket.connect(Socket.java:469)rn at java.net.Socket.(Socket.java:366)rn at java.net.Socket.(Socket.java:267)rn at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)rn at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)rn at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:239)rn ... 5 morern配置文件:rn[img=https://img-bbs.csdn.net/upload/201403/14/1394777087_345096.jpg][/img]rnjboss配置文件:rn[img=https://img-bbs.csdn.net/upload/201403/14/1394777924_900237.jpg][/img]rnrnrn查看jnp端口,未占用;jboss-client.jar和jnp.jar都添加了;rnjboss配置文件中未找到jboss-service.xml和server.xml;rndo<em>main</em>.xml文件中未找到修改端口的代码rnrn
main" java.lang.">Exception in thread "main" java.lang.
从svn上down下来的源码,在搭建本机环境的时候报错nn```n Exception in <em>thread</em> "<em>main</em>" java.lang.UnsupportedClassVersionError: org/apdplat/word/analysis/TextSimilarity : Unsupported major.minor version 52.0n 2 at java.lang.ClassLoader.defineClass1(Native Method)n 3 at java.lang.ClassLoader.defineClass(Unknown Source)n 4 at java.security.SecureClassLoader.defineClass(Unknown Source)n 5 at java.net.URLClassLoader.defineClass(Unknown Source)n 6 at java.net.URLClassLoader.access$100(Unknown Source)n 7 at java.net.URLClassLoader$1.run(Unknown Source)n 8 at java.net.URLClassLoader$1.run(Unknown Source)n 9 at java.security.AccessController.doPrivileged(Native Method)n10 at java.net.URLClassLoader.findClass(Unknown Source)n11 at java.lang.ClassLoader.loadClass(Unknown Source)n12 at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)n13 at java.lang.ClassLoader.loadClass(Unknown Source)n14 at com.platform.config.run.JfinalConfig.afterJFinalStart(JfinalConfig.java:184)n15 at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:55)n16 at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119)n17 at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)n18 at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:724)n19 at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265)n20 at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)n21 at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)n22 at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)n23 at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)n24 at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)n25 at org.eclipse.jetty.server.Server.doStart(Server.java:277)n26 at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)n27 at com.jfinal.server.JettyServer.doStart(JettyServer.java:135)n28 at com.jfinal.server.JettyServer.start(JettyServer.java:67)n29 at com.jfinal.core.JFinal.start(JFinal.java:154)n30 at com.platform.config.run.JfinalConfig.<em>main</em>(JfinalConfig.java:210)n```n在各种网站上查阅了一下,说是用低版本的JDK编译高版本的.class就会报这个错,有以下两种易发生的情况:nn1,命令行输入java -version和javac -version发现版本不一致,修改之;nn2,版本一致则检查Path路径,一般安装oracle的机子配置jdk的时候会覆盖路径,修改之。nn但是!nn一,我没有装Oracle;nnPath路径为:nnd:\data\mblog\graphicsmagick-1.3.23-q8;nC:\Windows\system32;nC:\Windows;nC:\Windows\System32\Wbem;nC:\Windows\System32\WindowsPowerShell\v1.0\;nD:\jdk1.7\bin;nD:\jdk1.7\jre\bin;nD:\mysqlinstallation\MySQL Utilities 1.3.6\;nD:\maven\apache-maven-3.3.9\bin;nn二,javac -versionnn下是java version “1.7.0_13”nnjava -version下是nnjavac 1.7.0_13nn所以,现在问题会出现在哪儿呢?nn我使用的是eclipse,jfinal,mavenn
main" java.awt.HeadlessException">Exception in thread "main" java.awt.HeadlessException
請問解決以下報錯的方法:rnrnException in <em>thread</em> "<em>main</em>" java.awt.HeadlessExceptionrn at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:204)rn at java.awt.Window.(Window.java:536)rn at java.awt.Frame.(Frame.java:420)rn at java.awt.Frame.(Frame.java:385)rn at javax.swing.JFrame.(JFrame.java:189)rn at com.stepforward.Mirrorworld.P4_View.Thing_Manager_View.(Thing_Manager_View.java:68)rn at com.stepforward.Mirrorworld.P2_Base_Bean.Thing_Manager_Service.Set_visible(Thing_Manager_Service.java:33)rn at com.stepforward.Mirrorworld.MirrorworldApplication.<em>main</em>(MirrorworldApplication.java:24)rnrn背景:rnrn我計劃把已在開發的非web工程轉換成web工程,我打算分兩步實施:先將非web工程搬到spring boot架構上,然後再來開發表示層組件。
main" java.lang.StackOverflowError .">Exception in thread "main" java.lang.StackOverflowError .
package 折半递归非递归;rnrnrnpublic class RecursiveTest rn /** * 递归实现 * * @param n * @return */ rn public static double recursive(long n) rn if (n == 1) rn return Math.log(1); rn rn else rn return Math.log(n) + recursive(n - 1); rn rn rn /** * 非递归实现 * * @param n * @return */ rn public static double directly(long n) rn double result = 0; rn for (int i = 1; i java.lang.StackOverflowErrorrn at 折半递归非递归.RecursiveTest.recursive(RecursiveTest.java:11)rn at 折半递归非递归.RecursiveTest.recursive(RecursiveTest.java:11)rn at 折半递归非递归.RecursiveTest.recursive(RecursiveTest.java:11)rnrn请问如何解决
用Java实现的星际争霸2用户说明书下载
用Java编写的星际争霸2用户说明书,其中涉及到图形用户界面、事件监听、异常、Model1模式等知识。 相关下载链接:[url=//download.csdn.net/download/redbeliefchendewu/2705330?utm_source=bbsseo]//download.csdn.net/download/redbeliefchendewu/2705330?utm_source=bbsseo[/url]
WSUS服务器端安装和客户端的设置下载
WSUS服务器端安装和客户端的设置 windows2008下带截图安装文档 相关下载链接:[url=//download.csdn.net/download/bingyan0371/4039665?utm_source=bbsseo]//download.csdn.net/download/bingyan0371/4039665?utm_source=bbsseo[/url]
IBM Cognis vs Oracle OBIEE下载
IBM Cognis vs Oracle OBIEE 相关下载链接:[url=//download.csdn.net/download/zchlrain01/4097215?utm_source=bbsseo]//download.csdn.net/download/zchlrain01/4097215?utm_source=bbsseo[/url]
我们是很有底线的