Linux javac编译

公司之前员工编译都是直接用eclipse直接编译,如今须要转移到服务器上编译(不然不能自动化,流程化),因而乎开始了漫长的javac的编译报错解决过程。java


一、编译报错web

package com.sun.p_w_picpath.codec.jpeg does not existspring

[javac] import com.sun.p_w_picpath.codec.jpeg.*;服务器

处理办法:
eclipse

javac 加上参数-XDignore.symbol.fileide

最好的解决办法,不要使用sun的这些库spa

二、运行报错debug

严重: Servlet.service() for servlet [dispatcher] in context with path [/xxx] threw exception [Request processing failed; nested exception is org.springframework.web.bind.annotation.support.HandlerMethodInvocationException: Failed to invoke handler method [public void com.qmsk.business.order.quote.mainQuote.controller.BsMainQuoteController.insertQuote(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,java.lang.Long)]; nested exception is java.lang.IllegalStateException: No parameter name specified for argument of type [java.lang.Long], and no parameter name information found in class file either.] with root causecode

java.lang.IllegalStateException: No parameter name specified for argument of type [java.lang.Long], and no parameter name information found in class file either.orm

解决办法:

javac -g使用javac的debug模式。

最终使用javac的参数以下,共参考:

javac -g -XDignore.symbol.file -classpath $JAVA_HOME/lib/ -d xxxx  -extdirs $JAR_PATH @$SRC_PATH/sources.list

相关文章
相关标签/搜索