Giter Club home page Giter Club logo

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Nevermind, figured it out. I hadn't set up my jars properly.

Original comment by [email protected] on 14 Mar 2011 at 6:06

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Hi, I have the same issue.
What was your solution ?

Original comment by [email protected] on 30 Mar 2011 at 5:33

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
My problem was that I didn't set up my jars correctly. Here's the relevant part 
of my working build file :

<project name="APNS_Sending" basedir=".">
    <property name="src" location="src"/>
    <property name="build" location="build"/>
    <property name="classes.dir" location="${build}/classes"/>
    <property name="libs.dir" value="${src}/libs"/>
    <property name="jar.dir" value="${build}/jar"/>
    <property name="jar.name" value="apns.jar"/>
    <property name="main-class" value="send_apns"/>    

    <path id="build.classpath">
        <fileset dir="${libs.dir}" includes="**/*.jar"/> 
    </path>

    <target name="compile">
        <mkdir dir="${classes.dir}"/>
        <javac srcdir="${src}" destdir="${classes.dir}">
            <classpath refid="build.classpath"/>
        </javac>
    </target>

    <target name="jar" depends="compile">
        <mkdir dir="${jar.dir}"/>
        <jar jarfile="${jar.dir}/external-libs.jar">
            <zipgroupfileset dir="${libs.dir}" includes="**/*.jar"/>
        </jar>
        <jar destfile="${jar.dir}/${jar.name}" basedir="${classes.dir}">
            <manifest>
                <attribute name="Main-Class" value="${main-class}"/>
            </manifest>
            <zipfileset src="${jar.dir}/external-libs.jar" excludes="META-INF/**/*"/>
        </jar>
    </target>
</project>

My libs directory includes all of the dependency jars that aren't already part 
of the standard java installation:

-rw-r--r-- 1 vova dev 1876535 Mar 12 12:29 bcprov-jdk16-146.jar
-rw-r--r-- 1 vova dev  159509 Mar 12 12:27 commons-io-2.0.1.jar
-rw-r--r-- 1 vova dev  284220 Mar 11 01:55 commons-lang-2.6.jar
-rw-r--r-- 1 vova dev   11249 Mar 13 21:36 jargs.jar
-rw-r--r-- 1 vova dev   52644 Mar 10 19:08 javapns-jdk15-165.jar
-rw-r--r-- 1 vova dev  481534 Mar 11 01:57 log4j-1.2.16.jar

I hope that helps.

vova

Original comment by [email protected] on 30 Mar 2011 at 5:41

from javapns.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024

Original comment by [email protected] on 6 Apr 2011 at 9:36

  • Changed state: Done

from javapns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.