代码改变世界 java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()解决办法 android Toast提示异常:java.lang.RuntimeException: Can't create handler inside thread that has not called 原因是在子线程弹Toast了, 切记,Toast只能在UI线程弹出 解决办法…
今天在发布Java项目的时候又遇到 Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this program 这种情况了, 解决办法: 首先查看环境变量: vim /etc/profile 找到JAVA_HOME 把路径记录下 编辑文件 /usr/local/tomca…
SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmssSSS"); Date date = new Date(); String nowData = format.format(date); //直接获取到服务器工程名路径下面 String path = request.getSession().getServletContext().getRealPath("pdf/ElecScan"+nowD…
Calendar c = Calendar.getInstance();//可以对每个时间域单独修改 int year = c.get(Calendar.YEAR); int month = c.get(Calendar.MONTH)+1; int day = c.get(Calendar.DATE); int hour = c.get(Calendar.HOUR_OF_DAY); int minute = c.get(Calendar.MINUTE); int second = c.get(C…
@RequestMapping(value = {"save"}) @ResponseBody public Result save(TBaseInterventionPlan model,String tBaseRegulateInterventions) { Result result; List<TBaseRegulateIntervention> list = new ArrayList<TBaseRegulateIntervention>(); if…
严重: Failed to initialize end point associated with ProtocolHandler ["http-bio-8080"] java.net.BindException: Address already in use <null>:8080 at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:407) at org.apache.tomcat.util.…