Hudson java.home 设定

在学习使用Hudson进行持续集成时,总是报这样的错误:

can't open C:\Program Files\Java\jdk1.5.0\lib\tzmappings.

 

Started by user anonymous
Updating svn://127.0.0.1/test/quickstart/trunk
At revision 886
no change for svn://127.0.0.1/test/quickstart/trunk since the previous build
Parsing POMs
[trunk] $ java -cp "C:\Documents and Settings\QGD\.hudson\plugins\maven-plugin\WEB-INF\lib\maven-agent-1.372.jar;E:\Program Files\Apache Software Foundation\apache-maven-2.2.1\boot\classworlds-1.1.jar" hudson.maven.agent.Main "E:\Program Files\Apache Software Foundation\apache-maven-2.2.1" "C:\Documents and Settings\QGD\.hudson\war\WEB-INF\lib\remoting-1.372.jar" "C:\Documents and Settings\QGD\.hudson\plugins\maven-plugin\WEB-INF\lib\maven-interceptor-1.372.jar" 1198 "C:\Documents and Settings\QGD\.hudson\plugins\maven-plugin\WEB-INF\lib\maven2.1-interceptor-1.2.jar"
<===[HUDSON REMOTING CAPACITY]===>���channel started
Executing Maven:  -B -f C:\Documents and Settings\QGD\.hudson\jobs\A test project\workspace\trunk\pom.xml clean test
ZoneInfo: C:\Program Files\Java\jdk1.5.0\lib\zi\ZoneInfoMappings (系统找不到指定的路径。)
ZoneInfo: C:\Program Files\Java\jdk1.5.0\lib\zi\ZoneInfoMappings (系统找不到指定的路径。)
ZoneInfo: C:\Program Files\Java\jdk1.5.0\lib\zi\ZoneInfoMappings (系统找不到指定的路径。)
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building quickstart
[INFO]    task-segment: [clean, test]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting directory C:\Documents and Settings\QGD\.hudson\jobs\A test project\workspace\trunk\target
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 1 source file to C:\Documents and Settings\QGD\.hudson\jobs\A test project\workspace\trunk\target\classes
[HUDSON] Archiving C:\Documents and Settings\QGD\.hudson\jobs\A test project\workspace\trunk\pom.xml to C:\Documents and Settings\QGD\.hudson\jobs\A test project\modules\cn.ac.ceode.xtwh$quickstart\builds\2010-08-18_19-56-56\archive\cn.ac.ceode.xtwh\quickstart\0.0.1-SNAPSHOT\pom.xml
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
Unable to locate the Javac Compiler in:
  C:\Program Files\Java\jdk1.5.0\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.

[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Wed Aug 18 11:57:02 GMT 2010
[INFO] Final Memory: 8M/14M
[INFO] ------------------------------------------------------------------------
channel stopped
can't open C:\Program Files\Java\jdk1.5.0\lib\tzmappings.
Finished: FAILURE

 

 

尽管我设定了JAVA_HOME变量的值,但是每次Hudson显示的系统只java.home 都是 C:\Program Files\Java\jre6\

 

不得已在Hudson的 Global properties  -> Environment variables 种手动添加了java.home 为 C:\Program Files\Java\jdk1.6.0_13。但是类似的错误仍在继续。

 

正在一筹莫展时,发现Maven的java home 也不是JAVA_HOME的,而是其下的jre文件夹: Java home: C:\Program Files\Java\jdk1.6.0_13\jre

 

照这个值将Hudson的 java.home改为 C:\Program Files\Java\jdk1.6.0_13\jre,即可

 

上网查了一下,没找到他们之间的详细区别,以后再碰到时再探究原因吧

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ERROR: Launching agent process aborted. Also: java.lang.Throwable: launched here at hudson.slaves.SlaveComputer._connect(SlaveComputer.java:287) at hudson.model.Computer.connect(Computer.java:447) at hudson.slaves.SlaveComputer.tryReconnect(SlaveComputer.java:854) at hudson.slaves.RetentionStrategy$Always.check(RetentionStrategy.java:173) at hudson.slaves.RetentionStrategy$Always.check(RetentionStrategy.java:161) at hudson.slaves.ComputerRetentionWork$1.run(ComputerRetentionWork.java:71) at hudson.model.Queue._withLock(Queue.java:1397) at hudson.model.Queue.withLock(Queue.java:1271) at hudson.slaves.ComputerRetentionWork.doRun(ComputerRetentionWork.java:62) at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:92) at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:67) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) java.lang.InterruptedException: Validate configuration: The Host must be specified The selected credentials cannot be found at hudson.plugins.sshslaves.SSHLauncher.checkConfig(SSHLauncher.java:925) at hudson.plugins.sshslaves.SSHLauncher.launch(SSHLauncher.java:411) at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:298) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:80) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)
06-06

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值