Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

手动编译不通过 #32

Open
Matrix0xCC opened this issue Dec 19, 2016 · 1 comment
Open

手动编译不通过 #32

Matrix0xCC opened this issue Dec 19, 2016 · 1 comment

Comments

@Matrix0xCC
Copy link

Matrix0xCC commented Dec 19, 2016

Cknife/src/com/ms509/ui/panel/FileManagerPanel.java第17行引用了一个未使用的类。
注释掉可以编译通过。

做了个简易的编译脚本。

<?xml version="1.0" encoding="UTF-8"?>
<project default="jar" name="makejar">
  <property name="javaexe" value="C:\\Program Files\\Java\\jdk1.8.0_101\\bin\\javac"/>
  <property name="main_class" value="com/ms509/ui/Cknife"/>
  <property name="jar_file" value="Cknife.jar"/>
  <target name="compile">
    
    <path id="libs">
      <fileset dir="lib">
        <include name="**/*.jar"/>
      </fileset>
    </path>
    
    <mkdir dir="bin" />

    <javac debug="true" destdir="bin" encoding="UTF-8" executable="${javaexe}" fork="yes" includeAntRuntime="false" optimize="off" srcdir="src" target="1.8">
      <classpath refid="libs"/>
    </javac>
  </target>

  <target depends="compile" name="jar">
    <!-- copy resource files -->
    <copy todir="bin/com/ms509/" includeEmptyDirs="true" flatten="false">
      <fileset dir="src/com/ms509/" >
        <include name="images/" />
      </fileset>
    </copy>

    <manifestclasspath jarfile="${jar_file}" property="manifest.classpath">
      <classpath refid="libs"/>
    </manifestclasspath>

    <jar basedir="bin" destfile="${jar_file}">
      <manifest>
        <attribute name="Main-Class" value="${main_class}"/>
        <attribute name="Class-Path" value="${manifest.classpath}"/>
      </manifest>
    </jar>

  </target>

  <target name="clean">
    <delete dir="bin" />
  </target>
</project>
@featherL
Copy link

怎么手动编译啊,怎么命令行手动编译,不想去下载eclipse。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants