zoukankan      html  css  js  c++  java
  • 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


    ——————————————————————————————————
    傲轩游戏网
  • 相关阅读:
    骨骼动画的原理及在Unity中的使用
    GUI之ScrollView的使用
    Java编程技术之浅析Java容器技术
    Linux系统 Centos7 环境基于Docker部署Rocketmq服务
    Linux系统环境基于Docker搭建Mysql数据库服务实战
    Java编程技术之浅析JVM内存
    Java编程技术之浅析SPI服务发现机制
    Linux系统环境基于Docker搭建系统基础镜像
    Linux Centos7 环境搭建Docker部署Zookeeper分布式集群服务实战
    Linux Centos7 环境基于Docker部署Zookeeper服务搭建实战
  • 原文地址:https://www.cnblogs.com/cuizhf/p/2379739.html
Copyright © 2011-2022 走看看