1. Debug无法开启:
ERROR:transport error 202: gethostbyname: unknown host A configuration error occurred during startup. Please verify the preference field with the prompt: ERROR: transport error 202: gethostbyname: unknown host ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]
解决方案:
在/etc/hosts下面添加 127.0.0.1 localhost.localdomain localhost 上面一行就行了。 应该是localhost没有映射到127.0.0.1的缘故。因为eclipse调试的时候会连接localhost的.
参见:
http://my.oschina.net/wuyizhong/blog/132511
2. mvn命令使用时
错误: 找不到或无法加载主类 org.codehaus.plexus.classworlds.launcher.Launcher
解决方案: M2_HOME, PATH是否设置正确. 根本原因是PATH没有设置正确.