开发者社区> 问答> 正文

Eclipse中jar包的问题?报错

Java项目在Eclipse中,前几天都运行好好的,昨天下午新建了一个项目然后写了一个类运行了一下,运行的时候卡了一下,然后Eclipse中其他项目就报错,看样子是缺少jar包,但jar都在啊,怎么解决?


严重: Error configuring application listener of class com.cww.framework.session.ServletRequestListenerImpl java.lang.Error: Unresolved compilation problems: Syntax error, annotations are only available if source level is 1.5 or greater Syntax error, annotations are only available if source level is 1.5 or greater at com.cww.framework.session.ServletRequestListenerImpl.(ServletRequestListenerImpl.java:36) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:134) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) 2016-5-6 10:11:46 org.apache.catalina.core.StandardContext listenerStart 

严重: Error configuring application listener of class com.cww.framework.session.SessionListenerImpl java.lang.Error: Unresolved compilation problems: Syntax error, annotations are only available if source level is 1.5 or greater Syntax error, annotations are only available if source level is 1.5 or greater at com.cww.framework.session.SessionListenerImpl.(SessionListenerImpl.java:45) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:134) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) 2016-5-6 10:11:46 org.apache.catalina.core.StandardContext listenerStart 


严重: Error configuring application listener of class com.cww.framework.session.SessionBindingChecker java.lang.Error: Unresolved compilation problems: Syntax error, parameterized types are only available if source level is 1.5 or greater Syntax error, parameterized types are only available if source level is 1.5 or greater Syntax error, annotations are only available if source level is 1.5 or greater Syntax error, annotations are only available if source level is 1.5 or greater Syntax error, annotations are only available if source level is 1.5 or greater at com.cww.framework.session.SessionBindingChecker.(SessionBindingChecker.java:39) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:134) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4727) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) 2016-5-6 10:11:46 org.apache.catalina.core.StandardContext listenerStart 

展开
收起
爱吃鱼的程序员 2020-06-09 14:48:14 502 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    发异常信息,要不没法看。信息贴上去了帮忙看下

    <spanstyle="font-family:'MicrosoftYaHei',Verdana,sans-serif,宋体;font-size:14px;line-height:22px;background-color:#FFFFFF;">annotationsareonlyavailableifsourcelevelis1.5orgreateratcom.cww.framework.session.ServletRequestListenerImpl 

    <spanstyle="font-size:14px;line-height:22px;background-color:#FFFFFF;">创建项目的时候,选择的版本跟以前项目的版本不一样,一般都是选低了。你删除项目重新创建一个吧。环境要选对了。

    <spanstyle="font-size:14px;line-height:22px;background-color:#FFFFFF;"><imgsrc="http://static.oschina.net/uploads/space/2016/0506/110213_WBhD_1419305.png"alt="">

    哦!我刚才也查了下,大概是这个意思。但是现在问题是这个项目不能删,我把后来新建的那个项目删了,也clean重新编译了,怎么才能解决?

    可以手动改项目的Level的。

    Project->javecompiler你把Level选成自己定义类型。

    再者可以保持和WorkspaceLevel一致。(我常常这么做)

    编译使用的java版本太低

    2020-06-09 14:48:32
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载

相关镜像