How to compile spark source code?


when i download spark source code from svn co spark ,

but how can i compile it .

please give me some advice ,or detail document.

thanks in advance.

you can sent documnet to

These instruction are base on building spark v2.0b3 which i downloaded last week.

I’'ve been doing my build work on a windowsXP box so all my instructions are based on that architecture.

step 1

Have ant ( and athe JDK installed and make sure they are in the path.

So for me That’'s making sure that the following is in my path

C:\Program Files\Java\jdk1.5.0_07\bin;C:\Program Files\Java\apache-ant-1.6.5\bin;

but this will vary from use to user.

step 2

I placed my spark source in the root of my c: drive, so

cd c:\spark\

make sure that all previous compiled class files are removed.

del/s *.class

Move to the build directory to do the actual compiling

cd c:\spark\build

Then this will actually build the spark.jar


Step 3

After spark has been built you need to turn this into a distributable exe file by using the install4j file that is included with the source.

This is a file called spark.install4j which lives in:


To use this you need a copy of install4j which can be downloaded from

Unfortunately this is a commercial product but luckily a demo version is available.

Load the spark.install4j into install4j and make sure the directories are all goo then click “start build”. The install4j is an excellent product and does all the packaging for you. After running that you end up with a distributable exe file with or without an integrated Java Runtime depending on what options you went with.

Ok thats it.

My hat is off to the JiveSoftware Developers, who have produced a tryly top notch jabber client. Respect.

but when i compile spark in eclipse( with ant plugin) , an error occured.

in the package --> org.jivesoftware.spark.plugin.scratchpad —>

the error as followed :

XMPPConnection con = new XMPPConnection(“derek”, 5222);

the type cannot be resolved, it is indirectory referenced.

but how to use*, i look the API document, i see the used.

how can i solve.

thanks in advance.

Not sure, sorry.

Try compiling at the command line just to make sure that ant is working properly before getting eclipse involved.

Remember Keep It Simple, Sometimes

i also solve it. because i use the java is not sun-jdk. so i cause this problem.

but i also problem is when i use ant to build spark. the error is resources is not found.

i resource as folllowed:


/root/Desktop/haitao/Spark/build.xml:128: /root/Desktop/haitao/src/resources not found.

the build.xml is import from spark build.xml.

how to find the resource.

thanks in advance.

Message was edited by: open

i have also copy the -

build -

error -

need file to the same the directory.

and then compile to succeed.

but i have a problem ,how to run startup.bat.

thanks in advance.

thank’'s Thratchen

IMPORTANT: *del/s .class delete all my files like firefox, dreamweaver :((((((((((((((((((((((

Message was edited by: urgido

I think that if you look at my message, I do mention about going into the spark directory first.

Really the process is simply:

cd c:\spark

del/s *.class

cd build




after compilation i want to execute this chat client. I am using windows XP. How can i do this? Plz help

Also plz let me know how to load spark.install4j in Install4j. i have donwloaded its enterprize addition and it is giving me a wizard. I guess all the settings are written on spark.install4j and i do not need to go through this wizard. Any advise ?


ignore my last two posts. here is the new problem

i made exe file successfully using install4j as per ur advise.

When i installed Spark using the installer i am having following exception and am using windows 2000. Plz help


at org.jivesoftware.Spark.(

… 7 more

when i compile spark source code in eclipse are succedd, when i use the install4j ,i meet the errro:

My steps are:

first , form -->project >open project> @incluide my spark.install4j file;

second , setting the General setting ,

third , in the files add the -

file target----->build;

then i bound the jar is linux-x86-sun-jdk,

test and start build is ok.

but when i run the spark in the creatived file , they can run in linux.

the error is :ls: /root/Desktop/install4jmedia/spark_2_0_1/Spark/lib/windows: ???

nothing open the spark .

how to solve ,

my thank in advance.

I can use the Ant command to build successfully. However, when i use the eclipse to open the project, it gives me 2965 errors. Most errors are like this “xxx cannot be resolved to a type”. What’'s going wrong with my eclipse configuration? My JDK is 1.5.0_09 and Ant is 1.6.5. I just downloaded the Spark sourced code 2 days ago.

Help is much appreciated!