This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

trouble packaging jars


I'm using Kawa to write a networked 3D game built on JavaMonkeyEngine. The combination works great. It performs extremely well, and enables us to add and modify features extremely rapidly with very compact code.

Now I want to figure out how to package our classes in executable jars. That's turning out to be more difficult than I anticipated. I've been unable to get the kawac ant task to work outside of the kawa sources. I've tried using plain old Makefiles and using kawa as a compiler, which works fine, but for some reason I end up unable to figure out the right class or classpath to put in the manifest.

Is anyone else doing interactive development with Kawa and then building the results into a standalone jar? If so, I'd love to pick your brain about how you set up the jar builds. So far, examining kawa's own buildfile and sources has not helped the light dawn.

I suppose I should mention I'm not exactly new to doing this. I've packaged executable jars many times before from sources in several different languages--Java, Scala, Clojure, and even--ten years or so ago--Kawa itself. However, it has been a couple of years since the last time, so there's a good likelihood that I'm just forgetting something simple.

I don't want to spew tons of details about all the stuff I've tried so far--your eyes would glaze over--but, just briefly, the project consists of a set of library jars (including kawa itself), and the Scheme sources of the game client and server. We use Emacs to run kawa, and we run the game processes from the repl. This enabls us to inspect and interact with the game server and client in real time, while they're running. Kawa's performance is great for this stuff; we can go from a cold start to a running game client in a couple of seconds; we can change meshes, lighting, animation, and whatever in real time while the game runs; we can kill the client or server, change something, and be back in the game in a couple of seconds.

Very briefly, I've tried using the kawac ant task, but I can't seem to figure out how to use it outside kawa's source tree. I can point it at kawa's tools directory and then ant can find the definition of the Kawac class, but then it complains that it can't find kawa.repl, and nothing I've tried (i.e. all sorts of path-like structures pointing to where the kawa jar is) fixes that problem.

I've tried running kawa from a Makefile to compile the scheme sources to classfiles, and that works well enough, but then I can't seem to figure out a way to package them with a manifest so that java can find the main class. Yes, I compiled with kawa --main, and yes, when I jar ft the jarfile, the main class is where the manifest says it is, but java complains just the same that it can't find od load the class.

Thanks in advance for any help or advice.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]