MarteEngine: Win下执行ant脚本build.xml中的exej目标时出现的错误

Win7操作系统,执行ant脚本build.xml中的exej目标,出现如下错误信息:

BUILD FAILED
D:\eclipse-SDK-3.6.2-win32\eclipse\workspace\MarteEngine\build.xml:236: Expecting  class path separator ';' before 'Files\Java\jdk1.6.0_25\jre/lib/rt.jar'  in argument number 1


在ProGuard网站的Troubleshooting页(http://proguard.sourceforge.net/index.html#manual/troubleshooting.html)找到

Error: Expecting  class path separator ';' before 'Files\Java\...' ( in Windows)
    If the path of your run-time jar contains spaces, like  in "Program Files", you have to enclose it  with single or double quotes, as explained  in the section on file names. This is actually  true  for all file names containing special characters, on all platforms.

 

同时在http://proguard.sourceforge.net/index.html#manual/usage.html页面对File Names有如下说明

ProGuard accepts absolute paths and relative paths  for the various file names and directory names. A relative path is interpreted as follows:

    relative to the base directory,  if  set, or otherwise
    relative to the configuration file  in which it is specified,  if any, or otherwise
    relative to the working directory.

The names can contain Java system properties delimited by '<' and '>'. The system properties are automatically replaced by their respective values.

For example, <java.home>/lib/rt.jar will automatically be expanded to something like /usr/local/java/jdk/jre/lib/rt.jar. Similarly, <user.home> will be expanded to the user's home directory, and <user.dir> will be expanded to the current working directory.

Names  with special characters like spaces and parentheses must be quoted  with single or double quotes. Note that each file name  in a list of names has to be quoted individually. Also note that the quotes themselves may need to be escaped when used on the command line, to avoid them being gobbled by the shell.

For example, on the command line, you could use an option like '-injars "my program.jar":"/your directory/your program.jar"'.

 

 综上,解决方法为:

将build.xml的第237行中的${java.home}/lib/rt.jar用双引号引起来。

改之前为

          -libraryjars ${java.home}/lib/rt.jar;lib/lwjgl.jar;lib/slick.jar;lib/jorbis-0.0.15.jar

修改后为

          -libraryjars "${java.home}/lib/rt.jar";lib/lwjgl.jar;lib/slick.jar;lib/jorbis-0.0.15.jar

 

 


 

 

 

 

 

 

转载于:https://www.cnblogs.com/cuizhf/archive/2012/03/04/2379739.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值