求指点:我把JDK1.7换成1.8,JSP老是报错

九月 22, 2015 2:27:29 下午 org.apache.jasper.compiler.JDTCompiler$1 findType
严重: Compilation error
org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
at org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.(ClassFileReader.java:372)
at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:232)
at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:188)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:113)
at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:122)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromTypeSignature(LookupEnvironment.java:1335)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromVariantTypeSignature(LookupEnvironment.java:1391)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeArgumentsFromSignature(LookupEnvironment.java:1172)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.getTypeFromTypeSignature(LookupEnvironment.java:1340)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.createMethod(BinaryTypeBinding.java:550)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.createMethods(BinaryTypeBinding.java:630)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.cachePartsFrom(BinaryTypeBinding.java:365)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:688)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:667)
at org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:296)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:118)
at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49)
at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:122)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:168)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getPackage(Scope.java:2379)
at org.eclipse.jdt.internal.compiler.ast.ParameterizedQualifiedTypeReference.internalResolveLeafType(ParameterizedQualifiedTypeReference.java:138)
at org.eclipse.jdt.internal.compiler.ast.ParameterizedQualifiedTypeReference.internalResolveType(ParameterizedQualifiedTypeReference.java:132)
at org.eclipse.jdt.internal.compiler.ast.ParameterizedQualifiedTypeReference.resolveType(ParameterizedQualifiedTypeReference.java:351)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypeFor(SourceTypeBinding.java:1374)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.fields(SourceTypeBinding.java:699)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:677)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:469)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:756)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:468)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:459)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

jdk

4个回答

说我的jsp第一行有问题,可是,第一行是<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>啊

你这样试一下,你再新建一个jsp看报错么?应该是版本不匹配…

遇到了同样的问题,楼主解决了吗

u011543563
武华筝 请问有没有解决?
大约 2 年之前 回复

版本升级,出现的问题一样,解决了吗?

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Myeclipse 使用jdk1.7
我用的Myeclipse2013 前段时间才发布的新版本。按道理说应该能支持jdk1.7 可是我测试switch 支持String能通过。测试List<String> list=["list"];,别的好像都能通过。 就不能通过。怎么能让Myeclipse 支持jdk1.7 该配置的我已经都配置了啊? 下面是我的配置 [img]http://dl.iteye.com/upload/attachment/0083/0926/d9a17582-83fc-312a-aaf8-62aae525c1a4.png[/img] [img]http://dl.iteye.com/upload/attachment/0083/0928/96ce96ad-d8c1-389c-aaf3-95585264c3d0.png[/img]
jdk1.6访问https接口报错,jdk1.7访问正常,服务端jdk为1.7
jdk1.6访问https接口报错,jdk1.7访问正常,服务端jdk为1.7报错,对比正常访问密码套件不一样,可是我下载jce之后也没有用正常使用的是TLS,1.6使用的是MD5,如图:![图片说明](https://img-ask.csdn.net/upload/201901/29/1548755192_521116.jpg) ![图片说明](https://img-ask.csdn.net/upload/201901/29/1548755365_63670.png)
JDK1.7环境ANT通过SVNKIT EXPORT文件失败
环境:window7 64bit. jdk1.6 ant1.9 svnkit1.3.1 export 文件成功,换成jdk1.7,1.8以后都报错: negotiate authentication failed:no valid credenticals provided. 下载了最新的svnkit,大概是1.8版本。把ANT_HOME\LIB下的SVNKIT和SVNJAVAHL替换掉了。 还是不行。 ANY 同仁知道?
DJUNIT在jdk1.7下执行不了
下载了下面版本的djunit,jdk1.7运行时报错(提示堆栈形状不一致),jdk1.6运行时正常,是因为不支持jdk1.7的关系吗?去djunit官网看了下,也没明确说不支持,不过运行环境只写到了java6。有人了解的吗? 版本:jp.co.dgic.eclipse.jdt.djunit_3.5.x_0.8.6 错误消息:java.lang.VerifyError: JVMVRFY012 スタックの形状が不整合です; class=jp/co/mlisystems/wn/green/service/service/impl/DjunitDemo、method=testDemo(I)V、pc=17 at java.lang.J9VMInternals.verifyImpl(Native Method) at java.lang.J9VMInternals.verify(J9VMInternals.java:94) at java.lang.J9VMInternals.initialize(J9VMInternals.java:171) at jp.co.mlisystems.wn.green.service.service.impl.DefaultKeiyakuGaiyoServiceTest.testTestDemo(DefaultKeiyakuGaiyoServiceTest.java:6) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:618) at junit.framework.TestCase.runTest(TestCase.java:176) at junit.framework.TestCase.runBare(TestCase.java:141) at junit.framework.TestResult$1.protect(TestResult.java:122) at junit.framework.TestResult.runProtected(TestResult.java:142) at junit.framework.TestResult.run(TestResult.java:125) at junit.framework.TestCase.run(TestCase.java:129) at junit.framework.TestSuite.runTest(TestSuite.java:255) at junit.framework.TestSuite.run(TestSuite.java:250) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:88) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) at java.lang.reflect.Method.invoke(Method.java:618) at jp.co.dgic.eclipse.jdt.internal.junit.runner.DJUnitRunner.main(DJUnitRunner.java:49)
Tomcat部署工程时报错: Exception sending context...
工程师SVN上检出的,按理说应该是没有问题的,怎么会发生如下错误。 Tomcat启动部署工程时报错: ``` 信息: Deploying web application directory D:\apache-tomcat-7.0.30\webapps\MC 九月 01, 2016 8:43:42 上午 org.apache.catalina.core.ApplicationContext log 信息: No Spring WebApplicationInitializer types detected on classpath 九月 01, 2016 8:43:42 上午 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring root WebApplicationContext 九月 01, 2016 8:43:45 上午 org.apache.catalina.core.StandardContext listenerStart 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mcServiceHsf' defined in file [D:\apache-tomcat-7.0.30\webapps\MC\WEB-INF\classes\com\inspur\gcloud\ext\service\impl\MessageCenterServiceImpl.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.inspur.gcloud.ext.service.impl.MessageCenterServiceImpl]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1013) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:959) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:490) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791) 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.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.inspur.gcloud.ext.service.impl.MessageCenterServiceImpl]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1006) ... 26 more Caused by: java.lang.ExceptionInInitializerError at com.inspur.gcloud.ext.service.impl.MessageCenterServiceImpl.<init>(MessageCenterServiceImpl.java:43) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:148) ... 28 more Caused by: com.inspur.hsf.service.rpc.RpcException: 没有找到可用服务,服务:logCenter.primaryService at com.inspur.hsf.service.cluster.impl.AvailableClusterInvoker.doInvoke(AvailableClusterInvoker.java:88) at com.inspur.hsf.service.cluster.impl.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:222) at com.inspur.hsf.service.rpc.transcation.humanredo.StoreFailureInvoker.invoke(StoreFailureInvoker.java:34) at com.inspur.hsf.service.rpc.proxy.jdk.JdkProxyFactory$1.invoke(JdkProxyFactory.java:82) at com.sun.proxy.$Proxy8.isModuleExistByCode(Unknown Source) at com.inspur.gcloud.logcenter.primary.core.PrimaryManager.init(PrimaryManager.java:29) at com.inspur.gcloud.logcenter.util.GCloudLogUtil.<init>(GCloudLogUtil.java:26) at com.inspur.gcloud.logcenter.util.GCloudLogUtil.getInstance(GCloudLogUtil.java:62) at com.inspur.gcloud.mc.common.util.McLoggerUtil.<init>(McLoggerUtil.java:28) at com.inspur.gcloud.mc.common.util.McLoggerUtil.<clinit>(McLoggerUtil.java:30) ... 34 more ```
jdk1.6下用jna调用dll库报错,换成jdk1.7成功
使用jkd1.6提示java.lang.UnsatisfiedLink,换成jdk1.7就可以了,请问有没有熟悉的大神知道是什么原因
tomcat启动成功访问网页报编译版本低于1.7。使用的是jdk1.7
org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 27 in the jsp file: /WEB-INF/include/prelude.jsp Resource specification not allowed here for source level below 1.7 24: SessionManager sessionManager = resourceProvider.getResource(SessionManager.class); 25: Session dimengSession = sessionManager.getSession(request, response,true); 26: SystemDefine systemDefine = resourceProvider.getSystemDefine(); 27: try (ServiceSession serviceSession = resourceProvider.getResource( 28: ServiceProvider.class).createServiceSession(dimengSession)) { 29: FileStore fileStore = resourceProvider.getResource(FileStore.class); 30: Rewriter rewriter = resourceProvider.getSystemDefine().getRewriter(); Stacktrace: at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366) at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:468) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:378) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:657) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:748) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:488) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:411) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:338) at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:466) at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:337) at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:427) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:200) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) 编译的版本已经是1.7,tomcat的版本是7.0.52,这个问题不知道出在哪里了。有没有遇到过类似情况的。
JDK 1.5 升级到JDK1.6 引发的问题
1、我在本地把项目的jdk1.5升级到了jdk1.6 ,通过myeclipse10.7.1 1.1)加载tomcat6 经过调试除了把commons-dbcp-1.2.2.jar 升级到commons-dbcp-1.3.jar 。 删除项目中的spring.jar 和Spring1.2.9.jar两个jar包换成spring-2.5.4.jar之外没做任何操作【tomcat就可以跑起来,并能进入系统】。 2、把tomcat 换成weblogic 11具体版本为 wls1036_win32 ,部署文件之后报错 [ERROR] 2014-06-06 18:20:25,039 [org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:215)] Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xfire.messageServiceFactory' defined in class path resource [org/codehaus/xfire/spring/xfire.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/wsdl/Definition at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:478) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1868) at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3154) at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1518) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:484) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200) at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27) at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:671) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212) at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:44) at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161) at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79) at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184) at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361) at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51) at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200) at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30) at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240) at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169) at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123) at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180) at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96) at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256) at weblogic.work.ExecuteThread.run(ExecuteThread.java:221) Caused by: java.lang.NoClassDefFoundError: javax/wsdl/Definition at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.privateGetPublicMethods(Class.java:2547) at java.lang.Class.getMethods(Class.java:1410) at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1280) at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1154) at java.beans.Introspector.getBeanInfo(Introspector.java:405) at java.beans.Introspector.getBeanInfo(Introspector.java:164) at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:220) at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:144) at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:252) at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:380) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1287) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1248) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1008) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:470) ... 50 more Caused by: java.lang.ClassNotFoundException: javax.wsdl.Definition at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 66 more <2014-6-6 下午06时20分25秒 CST> <Warning> <HTTP> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xfire.messageServiceFactory' defined in class path resource [org/codehaus/xfire/spring/xfire.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/wsdl/Definition. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xfire.messageServiceFactory' defined in class path resource [org/codehaus/xfire/spring/xfire.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/wsdl/Definition at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:478) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at java.security.AccessController.doPrivileged(Native Method) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) Truncated. see log file for complete stacktrace Caused By: java.lang.NoClassDefFoundError: javax/wsdl/Definition at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.privateGetPublicMethods(Class.java:2547) at java.lang.Class.getMethods(Class.java:1410) at java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1280) Truncated. see log file for complete stacktrace Caused By: java.lang.ClassNotFoundException: javax.wsdl.Definition at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) Truncated. see log file for complete stacktrace > <2014-6-6 下午06时20分25秒 CST> <Warning> <HTTP> <BEA-101162> <User defined listener com.sysnet.amis.interactive.listener.ContextListener failed: java.lang.NullPointerException. java.lang.NullPointerException at com.sysnet.amis.interactive.listener.ContextListener.contextDestroyed(ContextListener.java:38) at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:482) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.EventsManager.notifyContextDestroyedEvent(EventsManager.java:200) Truncated. see log file for complete stacktrace > ContextLoader contextDestroyed <2014-6-6 下午06时20分25秒 CST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application '_appsdir_amis6.13.0_dir'. weblogic.application.ModuleException: at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1520) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:484) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119) Truncated. see log file for complete stacktrace Caused By: java.lang.ClassNotFoundException: javax.wsdl.Definition at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) Truncated. see log file for complete stacktrace > 2.1)在我本地的lib下面有 xfire-all-1.2.6.jar 及spring-2.5.4.jar 然后在C:\Oracle\Middleware\user_projects\domains\base_domain\bin\setDomainEnv.cmd 文件最后一行加入 set CLASSPATH=c:\bea\spring-1.2.9.jar;c:\bea\xfire-all-1.2.6.jar;c:\bea\hibernate3.jar;c:\bea\commons-logging.jar;c:\bea\log4j-1.2.14.jar;c:\bea\jaxen-1.1.1.jar;c:\bea\dom4j-1.6.jar;c:\bea\hibernate-annotations.jar;c:\bea\hibernate-tools-3.0.jar;c:\bea\ejb-3.0-edr2.jar;c:\bea\cglib-nodep-2.1_3.jar;c:\bea\c3p0-0.9.0.4.jar;c:\bea\ehcache-1.4.1.jar;%CLASSPATH% 然后,从项目中的WEB-INF / lib下,把这些jar包复制出来,放到c:\bea下,依然报这个错。 3、我删除weblogic及对应项目重新配置了一下。依然这样。
编译jdk1.7时发生错误:Unsupported major.minor version 52.0
今天试着编译jdk1.7。make sanity都check passed了,可是在make时,就发生这个错误: make[2]: Entering directory '/home/fengli/Downloads/MyOpenJdk7/langtools/make' JAVA_HOME=/usr/lib/jdk1.6.0_32 ANT_OPTS=-Djava.io.tmpdir='/home/fengli/Downloads/MyOpenJdk7/build/langtools/build/ant-tmp' /usr/lib/apache-ant-1.10.3/bin/ant -Djdk.version=1.7.0 -Dfull.version='1.7.0-internal-root_2018_11_06_19_55-b00' -Dmilestone=internal -Dbuild.number=b00 -Djavac.target=7 -Djavac.source=7 -Dboot.java.home=/usr/lib/jdk1.6.0_32 -Dimport.jdk=/home/fengli/Downloads/MyOpenJdk7/jdk -Dbuild.dir=/home/fengli/Downloads/MyOpenJdk7/build/langtools/build -Ddist.dir=/home/fengli/Downloads/MyOpenJdk7/build/langtools/dist build Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/tools/ant/launch/Launcher : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main class: org.apache.tools.ant.launch.Launcher. Program will exit. Makefile:201: recipe for target 'build' failed make[2]: *** [build] Error 1 make[2]: Leaving directory '/home/fengli/Downloads/MyOpenJdk7/langtools/make' make/langtools-rules.gmk:37: recipe for target 'langtools-build' failed make[1]: *** [langtools-build] Error 2 make[1]: Leaving directory '/home/fengli/Downloads/MyOpenJdk7' Makefile:244: recipe for target 'build_product_image' failed make: *** [build_product_image] Error 2 我/etc/profile是这样的: # /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). if [ "$PS1" ]; then if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then # The file bash.bashrc already sets the default PS1. # PS1='\h:\w\$ ' if [ -f /etc/bash.bashrc ]; then . /etc/bash.bashrc fi else if [ "`id -u`" -eq 0 ]; then PS1='# ' else PS1='$ ' fi fi fi if [ -d /etc/profile.d ]; then for i in /etc/profile.d/*.sh; do if [ -r $i ]; then . $i fi done unset i fi # jdk1.8 #export JAVA_HOME=/usr/lib/jdk1.8.0_191 #export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH #export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH # jdk1.7 #export JAVA_HOME=/usr/lib/jdk1.7.0_80 #export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH #export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH # jdk1.6 export JAVA_HOME=/usr/lib/jdk1.6.0_32 export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH #set Ant enviroment export ANT_HOME=/usr/lib/apache-ant-1.10.3 export PATH=$PATH:$ANT_HOME/bin # for jdk7 compile export LANG=C #BootStrap-JDK export ALT_BOOTDIR=/usr/lib/jdk1.6.0_32 #OracleJDK export ALT_JDK_IMPORT_PATH=/usr/lib/jdk1.6.0_32 # export ALLOW_DOWNLOADS=true #the same with you cup cores export HOTSPOT_BUILD_JOBS=2 export ALT_PARALLEL_COMPILE_JOBS=2 # export USE_PRECOMPILED_HEADER=true # export BUILD_LANGTOOLS=true export BUILD_JAXWS=false #export BUILD_JAXP=false #export BUILD_CORBA=false export BUILD_HOTSPOT=true export BUILD_JDK=true export SKIP_COMPARE_IMAGES=true # BUILD_DEPLOY=false # BUILD_INSTALL=false # export ALT_OUTPUTDIR=/home/fengli/Downloads/MyOpenJdk7/build # unset JAVA_HOME unset CLASSPATH # make 2>&1 | tee $ALT_OUTPUTDIR/build.log
jdk1.7发送不了post请求 jdk1.8却可以
发送post方法: public static String doPost(String url, String params) throws Exception { CloseableHttpClient httpclient = HttpClients.createDefault(); HttpPost httpPost = new HttpPost(url);// 创建httpPost httpPost.setHeader("Accept", "application/json"); httpPost.setHeader("Content-Type", "application/json"); String charSet = "UTF-8"; StringEntity entity = new StringEntity(params, charSet); httpPost.setEntity(entity); CloseableHttpResponse response = null; try { response = httpclient.execute(httpPost); StatusLine status = response.getStatusLine(); int state = status.getStatusCode(); if (state == HttpStatus.SC_OK) { HttpEntity responseEntity = response.getEntity(); String jsonString = EntityUtils.toString(responseEntity); return jsonString; } else{ // logger.error("请求返回:"+state+"("+url+")"); } } finally { if (response != null) { try { response.close(); } catch (IOException e) { e.printStackTrace(); } } try { httpclient.close(); } catch (IOException e) { e.printStackTrace(); } } return null; } 1.7: Exception in thread "main" java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:196) at java.net.SocketInputStream.read(SocketInputStream.java:122) at sun.security.ssl.InputRecord.readFully(InputRecord.java:442) at sun.security.ssl.InputRecord.read(InputRecord.java:480) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:927) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1339) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1323) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:353) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:134) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) at org.tempuri.HttpUtilA.doPost(HttpUtilA.java:77) at org.tempuri.HttpUtilA.main(HttpUtilA.java:58) 1.8: { "bindingUser" : null, "id" : "e5e404dd-e2d8-4988-be49" }
.exe安装jdk1.7和jdk1.8安装,报错如下
C:\Users\28214>java -version Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.8', but '1.7' is required. Error: could not find java.dll Error: Could not find Java SE Runtime Environment.
jdk1.8换成11,启动项目报错java.net.MalformedURLException: unknown protocol: jrt
jdk11 Information:Internal caches are corrupted or have outdated format, forcing project rebuild: Module 'messystem' production: **java.net.MalformedURLException: unknown protocol: jrt** 解决:据说jdk11完美兼容以前jdk,但是项目是使用1.8 编写,报错, 在project structure->modules-> ![在这里插入图片描述](https://img-blog.csdnimg.cn/2018122312124235.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzM2OTIyOTI3,size_16,color_FFFFFF,t_70) 最后还是将项目jdk换回1.8, 11的新特性还是使用deemo去体验比较好,不要轻易将其用在低版本的jdk编写的项目中,这样的体验可能会有代价的,还好我这个只是启动不起来,如果是启动之后的运行过程中,出现什么问题,那就是GG了. 如果哪位朋友有不回恢复jdk1.8就能解决这个报错的,还望留言指教!! 注:1.8一切正常,只是更改项目jdk为11,没有更改任何代码,启动报错
JDK1.8新特性代码如何用1.7来写
小白一个,JDK1.8的新增语法这些还不了解,正在学习 如下是一个转换工具类,用JDK1.7该如何写 ``` public static class Functions{ /**yyyy-MM-dd**/ public static final Function<Object, Object> DateFormat = (Object obj)->{ if(obj!=null){ try{ return new SimpleDateFormat("yyyy-MM-dd").format(obj); }catch(Exception e){ return null; } } return null; }; /**yyyy-MM-dd HH:mm:ss**/ public static final Function<Object, Object> DateTimeFormat = (Object obj)->{ if(obj!=null){ try{ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(obj); }catch(Exception e){ return null; } } return null; }; /**true:是,false:否**/ public static final Function<Object, Object> BooleanDefault = (Object obj)->{ if(Boolean.TRUE.equals(obj)) return "是"; else if(Boolean.FALSE.equals(obj)) return "否"; return null; }; } ``` 这是调用的代码片段。这里的((Function<Object,Object>)v).apply又该如何写 ``` else if(v instanceof Function) cell.put(keyName, ((Function<Object,Object>)v).apply(BeanUtils.getPropertyDescriptor(data.getClass(), fieldName).getReadMethod().invoke(data))); ```
为什么我已经配置好了jdk1.7,另一个项目是可以运行的,但是当前项目却[如图]报错!
![图片说明](https://img-ask.csdn.net/upload/201712/09/1512780775_245734.png)
Missing artifact jdk.tools:jdk.tools:jar:1.8
环境:win10 jdk1.8 ![图片说明](https://img-ask.csdn.net/upload/201901/10/1547089206_936456.jpg) 这个是eclipse里报的错!我想解决这个问题 **首先说明:我要解决的方法并不是要你告诉我在pom.xml文件里加依赖**, 因为我是在编译别人的代码时出现的这个问题,已确定代码无问题且无法修改 我认为应该是我jdk或者eclipse哪里配置的问题,希望能修复这个问题。下面贴出我的一些配置,希望有大佬能指点解决这个问题。 ![图片说明](https://img-ask.csdn.net/upload/201901/10/1547089551_52494.jpg) 这个是classpath的配置,不知道有没有问题,但是现在在cmd里输入java和javac是正常的。 ![图片说明](https://img-ask.csdn.net/upload/201901/10/1547089627_490273.jpg) ![图片说明](https://img-ask.csdn.net/upload/201901/10/1547089674_17282.jpg) eclipse里jdk的配置。 ![图片说明](https://img-ask.csdn.net/upload/201901/10/1547089702_982955.jpg) jdk安装的时候有分开安装,应该是不会有啥覆盖的情况。 ![图片说明](https://img-ask.csdn.net/upload/201901/10/1547110354_479874.jpg)![图片说明](https://img-ask.csdn.net/upload/201901/10/1547110362_826936.jpg) 这里我清楚我的maven仓库里并没有这个jdk.tools,我可以在cmd里mvn导入,但我这里希望就是能不能通过设置一下哪里,让他能贼自动找到jdk/lib/tools.jar这个东西。因为我需要让一个我无法修改的项目也能够找到这个tools.jar,所以我希望能做出全局的修改。 如果我加系统依赖的话会出现 ![图片说明](https://img-ask.csdn.net/upload/201901/10/1547112744_290270.jpg) 我只前有说过,我在cmd里输出java和javac都是可以正常反应的,环境变量不知道有没有问题。 上面图片的异常是Project build error: 'dependencies.dependency.systemPath' for jdk.tools:jdk.tools:jar must specify an absolute path but is ${JAVA_HOME}/lib/tools.jar 希望有大佬能指点解决这个问题,万分感谢!
启动Tomcat时出现警告: The APR based Apache...
一月 04, 2016 10:42:32 上午 org.apache.catalina.core.AprLifecycleListener init # 警告: The APR based Apache Tomcat Native library failed to load. The error reported was [D:\apache-tomcat-7.0.67\bin\tcnative-1.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform] java.lang.UnsatisfiedLinkError: D:\apache-tomcat-7.0.67\bin\tcnative-1.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937) at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1855) at java.lang.Runtime.loadLibrary0(Runtime.java:870) at java.lang.System.loadLibrary(System.java:1122) at org.apache.tomcat.jni.Library.<init>(Library.java:42) at org.apache.tomcat.jni.Library.initialize(Library.java:178) at org.apache.catalina.core.AprLifecycleListener.init(AprLifecycleListener.java:201) at org.apache.catalina.core.AprLifecycleListener.isAprAvailable(AprLifecycleListener.java:109) at org.apache.catalina.connector.Connector.setProtocol(Connector.java:592) at org.apache.catalina.connector.Connector.<init>(Connector.java:66) at org.apache.catalina.startup.ConnectorCreateRule.begin(ConnectorCreateRule.java:62) at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1282) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1343) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649) at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1555) at org.apache.catalina.startup.Catalina.load(Catalina.java:616) at org.apache.catalina.startup.Catalina.load(Catalina.java:667) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:253) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:427) 一月 04, 2016 10:42:33 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: Server version: Apache Tomcat/7.0.67 一月 04, 2016 10:42:33 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: Server built: Dec 7 2015 13:07:11 UTC 一月 04, 2016 10:42:33 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: Server number: 7.0.67.0 一月 04, 2016 10:42:33 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: OS Name: Windows 8.1 一月 04, 2016 10:42:33 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: OS Version: 6.3 一月 04, 2016 10:42:33 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: Architecture: x86 一月 04, 2016 10:42:33 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: Java Home: D:\java\jdk8.0\jre 一月 04, 2016 10:42:33 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: JVM Version: 1.8.0_45-b14 一月 04, 2016 10:42:33 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: JVM Vendor: Oracle Corporation 一月 04, 2016 10:42:33 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: CATALINA_BASE: D:\apache-tomcat-7.0.67 一月 04, 2016 10:42:33 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: CATALINA_HOME: D:\apache-tomcat-7.0.67 一月 04, 2016 10:42:33 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:7694 一月 04, 2016 10:42:33 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Dcatalina.home=D:\apache-tomcat-7.0.67 一月 04, 2016 10:42:33 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Dcatalina.base=D:\apache-tomcat-7.0.67 一月 04, 2016 10:42:33 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Djava.endorsed.dirs=D:\apache-tomcat-7.0.67/common/endorsed 一月 04, 2016 10:42:33 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Djava.io.tmpdir=D:\apache-tomcat-7.0.67\temp 一月 04, 2016 10:42:33 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Djava.library.path=D:\java\jdk8.0\jre\bin;D:\apache-tomcat-7.0.67\bin 一月 04, 2016 10:42:33 上午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Dsun.io.useCanonCaches=false 一月 04, 2016 10:42:34 上午 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["http-bio-8080"] 一月 04, 2016 10:42:34 上午 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["ajp-bio-8009"] 一月 04, 2016 10:42:34 上午 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 2676 ms 一月 04, 2016 10:42:34 上午 org.apache.catalina.core.StandardService startInternal 信息: Starting service Catalina 一月 04, 2016 10:42:34 上午 org.apache.catalina.core.StandardEngine startInternal 信息: Starting Servlet Engine: Apache Tomcat/7.0.67 一月 04, 2016 10:42:34 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\apache-tomcat-7.0.67\webapps\Demo 一月 04, 2016 10:42:34 上午 org.apache.catalina.deploy.WebXml setVersion 警告: Unknown version string [3.1]. Default version will be used. 一月 04, 2016 10:42:35 上午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom 信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [107] milliseconds. 一月 04, 2016 10:42:35 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory D:\apache-tomcat-7.0.67\webapps\Demo has finished in 1,274 ms 一月 04, 2016 10:42:35 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\apache-tomcat-7.0.67\webapps\docs 一月 04, 2016 10:42:35 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory D:\apache-tomcat-7.0.67\webapps\docs has finished in 77 ms 一月 04, 2016 10:42:35 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\apache-tomcat-7.0.67\webapps\examples 一月 04, 2016 10:42:36 上午 org.apache.catalina.core.ApplicationContext log 信息: ContextListener: contextInitialized() 一月 04, 2016 10:42:36 上午 org.apache.catalina.core.ApplicationContext log 信息: SessionListener: contextInitialized() 一月 04, 2016 10:42:36 上午 org.apache.catalina.core.ApplicationContext log 信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@18b35d6') 一月 04, 2016 10:42:36 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory D:\apache-tomcat-7.0.67\webapps\examples has finished in 1,073 ms 一月 04, 2016 10:42:36 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\apache-tomcat-7.0.67\webapps\host-manager 一月 04, 2016 10:42:36 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory D:\apache-tomcat-7.0.67\webapps\host-manager has finished in 83 ms 一月 04, 2016 10:42:36 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\apache-tomcat-7.0.67\webapps\manager 一月 04, 2016 10:42:36 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory D:\apache-tomcat-7.0.67\webapps\manager has finished in 62 ms 一月 04, 2016 10:42:36 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\apache-tomcat-7.0.67\webapps\ROOT 一月 04, 2016 10:42:36 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory D:\apache-tomcat-7.0.67\webapps\ROOT has finished in 47 ms 一月 04, 2016 10:42:36 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deploying web application directory D:\apache-tomcat-7.0.67\webapps\ServletRequest 一月 04, 2016 10:42:37 上午 org.apache.catalina.deploy.WebXml setVersion 警告: Unknown version string [3.1]. Default version will be used. 一月 04, 2016 10:42:37 上午 org.apache.catalina.startup.HostConfig deployDirectory 信息: Deployment of web application directory D:\apache-tomcat-7.0.67\webapps\ServletRequest has finished in 388 ms 一月 04, 2016 10:42:37 上午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["http-bio-8080"] 一月 04, 2016 10:42:37 上午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["ajp-bio-8009"] 一月 04, 2016 10:42:37 上午 org.apache.catalina.startup.Catalina start 信息: Server startup in 3097 ms
LINUX平台下遇到一个诡异的问题,JDK 1.7.0_02
java.lang.NoClassDefFoundError: Could not initialize class sun.font.SunFontManager at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:264) at sun.java2d.SunGraphics2D.getFontMetrics(SunGraphics2D.java:789) at com.runqian.report4.model.NormalCell.getStyle(Unknown Source:2033) at com.runqian.report4.model.NormalCell.getStyle(Unknown Source:1938) at com.runqian.report4.view.html.HtmlReport.generateHtml(Unknown Source:255) at com.runqian.report4.tag.HtmlTag.doStartTag(Unknown Source:1050) at org.apache.jsp.reportJsp.showReport_jsp._jspService(showReport_jsp.java:291) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:438) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:720)
jboss7.1和eclipse4.3+jdk1.7部署項目運行出錯
1. 14:56:37,166 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-11) MSC00001: Failed to start service jboss.deployment.unit."ABSAppian.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ABSAppian.jar".POST_MODULE: Failed to process phase POST_MODULE of deployment "ABSAppian.jar" at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51] at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51] 2. Caused by: java.lang.RuntimeException: Error getting reflective information for class com.nmg.service.contract.ContractReportService with ClassLoader ModuleClassLoader for Module "deployment.ABSAppian.jar:main" from Service Module Loader at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70) at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55) at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final] ... 5 more 3. Caused by: java.lang.NoClassDefFoundError: jxl/biff/DisplayFormat at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_51] at java.lang.Class.privateGetDeclaredFields(Class.java:2397) [rt.jar:1.7.0_51] at java.lang.Class.getDeclaredFields(Class.java:1806) [rt.jar:1.7.0_51] at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final] ... 10 more 4. Caused by: java.lang.ClassNotFoundException: jxl.biff.DisplayFormat from [Module "deployment.ABSAppian.jar:main" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA] at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA] at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA] at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA] at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA] ... 15 more 注:jxl包我已經放在lib下了,但還是報錯。
IntelliJ IDEA12.1.6 用的JDK1.7 Switch语句跟字符串报错
JDK1.7新特性,从Eclipse迁移过来的代码,和Eclipse用的同样的JDK1.7.0_07,在Eclipse中switch()括号中写字符串正常运行。 到了IDEA中显示如下错误: [img]http://dl2.iteye.com/upload/attachment/0090/0287/5d1648eb-99d2-3455-bdf4-73c3c841ad2b.jpg[/img] [img]http://dl2.iteye.com/upload/attachment/0090/0289/63217753-b14c-3b70-9d8f-153a065aca77.jpg[/img] 编译器版本也选了1.7,结果编译时报 java: -source 1.6 中不支持 switch 中存在字符串 (请使用 -source 7 或更高版本以允许 switch 中存在字符串) 请教还有哪里要设置么?
相见恨晚的超实用网站
搞学习 知乎:www.zhihu.com 简答题:http://www.jiandati.com/ 网易公开课:https://open.163.com/ted/ 网易云课堂:https://study.163.com/ 中国大学MOOC:www.icourse163.org 网易云课堂:study.163.com 哔哩哔哩弹幕网:www.bilibili.com 我要自学网:www.51zxw
花了20分钟,给女朋友们写了一个web版群聊程序
参考博客 [1]https://www.byteslounge.com/tutorials/java-ee-html5-websocket-example
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
字节跳动视频编解码面经
引言 本文主要是记录一下面试字节跳动的经历。 三四月份投了字节跳动的实习(图形图像岗位),然后hr打电话过来问了一下会不会opengl,c++,shador,当时只会一点c++,其他两个都不会,也就直接被拒了。 七月初内推了字节跳动的提前批,因为内推没有具体的岗位,hr又打电话问要不要考虑一下图形图像岗,我说实习投过这个岗位不合适,不会opengl和shador,然后hr就说秋招更看重基础。我当时
开源一个功能完整的SpringBoot项目框架
福利来了,给大家带来一个福利。 最近想了解一下有关Spring Boot的开源项目,看了很多开源的框架,大多是一些demo或者是一个未成形的项目,基本功能都不完整,尤其是用户权限和菜单方面几乎没有完整的。 想到我之前做的框架,里面通用模块有:用户模块,权限模块,菜单模块,功能模块也齐全了,每一个功能都是完整的。 打算把这个框架分享出来,供大家使用和学习。 为什么用框架? 框架可以学习整体
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
Python——画一棵漂亮的樱花树(不同种樱花+玫瑰+圣诞树喔)
最近翻到一篇知乎,上面有不少用Python(大多是turtle库)绘制的树图,感觉很漂亮,我整理了一下,挑了一些我觉得不错的代码分享给大家(这些我都测试过,确实可以生成喔~) one 樱花树 动态生成樱花 效果图(这个是动态的): 实现代码 import turtle as T import random import time # 画樱花的躯干(60,t) def Tree(branch
深深的码丨Java HashMap 透析
HashMap 相关概念 HashTab、HashMap、TreeMap 均以键值对像是存储或操作数据元素。HashTab继承自Dictionary,HashMap、TreeMap继承自AbstractMap,三者均实现Map接口 **HashTab:**同步哈希表,不支持null键或值,因为同步导致性能影响,很少被使用 **HashMap:**应用较多的非同步哈希表,支持null键或值,是键值对...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
Python 基础(一):入门必备知识
目录1 标识符2 关键字3 引号4 编码5 输入输出6 缩进7 多行8 注释9 数据类型10 运算符10.1 常用运算符10.2 运算符优先级 1 标识符 标识符是编程时使用的名字,用于给变量、函数、语句块等命名,Python 中标识符由字母、数字、下划线组成,不能以数字开头,区分大小写。 以下划线开头的标识符有特殊含义,单下划线开头的标识符,如:_xxx ,表示不能直接访问的类属性,需通过类提供
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
JDK12 Collectors.teeing 你真的需要了解一下
前言 在 Java 12 里面有个非常好用但在官方 JEP 没有公布的功能,因为它只是 Collector 中的一个小改动,它的作用是 merge 两个 collector 的结果,这句话显得很抽象,老规矩,我们先来看个图(这真是一个不和谐的图????): 管道改造经常会用这个小东西,通常我们叫它「三通」,它的主要作用就是将 downstream1 和 downstre...
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员...
相关热词 c#选择结构应用基本算法 c# 收到udp包后回包 c#oracle 头文件 c# 序列化对象 自定义 c# tcp 心跳 c# ice连接服务端 c# md5 解密 c# 文字导航控件 c#注册dll文件 c#安装.net
立即提问