Advertisement
Guest User

Untitled

a guest
Feb 19th, 2011
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.34 KB | None | 0 0
  1. continue
  2. ***
  3. So, about JOAL (what I could see from archives I have).
  4.  
  5. It consists of 2 parts:
  6. - Java code: joal.jar
  7. - Native code: (joal.dll - in your game archive).
  8.  
  9. If try to run java -jar Moldering.jar on linux, the error would be:
  10.  
  11. Exception in thread "Thread-2" java.lang.UnsatisfiedLinkError: no joal in java.library.path
  12. at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1681)
  13.  
  14. This is expected as the program tries to find joal native library (on linux this would be libjoal.so) and can't find it, cause only joal.dll is available. So, the natural step to solve this is to find libjoal.so somewhere in inet, put it to Moldering dir near joal.dll and things should work.
  15.  
  16.  
  17. And at this point the problem comes. joal.dev.java.net site which is pointed as joal dev home everywhere in google and which also should have builds and source code snapshots for different joal versions is not available anymore. I could only find http://code.google.com/p/joal-linux-amd64/downloads/list - which contains joal library source code and linux builds, but only for single 1.1.3 version.
  18.  
  19. So, I have taken joal-amd64-1.1.3.tar.gz from there expecting to find libjoal.so file inside. Actually it was there, but with some nuances.
  20.  
  21. Inside the archive:
  22. joal-amd64.zip/joal/build/joal-1.1.3-pre-20100918-linux-amd64.zip/joal-1.1.3-pre-20100918-linux-amd64/lib/ dir has the following pre-buit files:
  23.  
  24. libjoal_native.so
  25. libgluegen-rt.so
  26. joal.jar
  27. gluegen-rt.jar
  28.  
  29. The differences are:
  30. - libjoal_native.so should be named libjoal.so (which already means that dowloaded 1.1.3 version migh not match to the the windows version in game archive)
  31. - joal.jar size is 51.8Kb vs 31.2Kb with game distrib (this also means that versions do not match)
  32. - additional gluegen (jar and so) deps.
  33.  
  34. Some intermediate tries like renaming libjoal_native.so to libjoal.so, replacing joal.jar from game archive to joal.jar from 1.1.3 archive etc would remove the "UnsatisfiedLinkError" error above, but would give other missing deps errors - will not describe all variants.
  35.  
  36. So steps to completely replace joal inside Moldering_0.0.5 distrib:
  37. 0. Build joal 1.1.3 from source (by some reason I had some problems with prebuilt libjoal_native.so and libgluegen-rt.so files provided above):
  38. - cd to joal-amd64/joal/make
  39. - run ant
  40. - see built files in joal-amd64/joal/build/tmp/joal-1.1.3-pre-20110219-linux-amd64/lib
  41.  
  42. 1. Put joal.jar and gluegen-rt.jar to Moldering_0.0.5/lib dir (replace existing joal.jar)
  43. 2. Put libjoal_native.so and libgluegen-rt.so to Moldering_0.0.5/
  44. 3. Add gluegen-rt.jar to classpath inside Moldering.jar:
  45. - rename Moldering.jar to Modlering.zip
  46. - navigate inside Modlering.zip/META-INF and edit MANIFEST.MF file - edit line "Class-Path":
  47. Class-Path: lib/joal.jar lib/gluegen-rt.jar lib/core.jar...
  48. - rename Modlering.zip back to Moldering.jar
  49.  
  50. So, this steps should be enough to completely update joal inside Modering distribution.
  51.  
  52. Then run java -jar Moldering.jar and receive:
  53.  
  54. Exception in thread "Thread-2" java.lang.NoSuchMethodError: net.java.games.joal.AL.alListenerfv(I[F)V
  55. at Utilities.JOALSoundMan.initListener(JOALSoundMan.java:113)
  56. at Utilities.JOALSoundMan.<init>(JOALSoundMan.java:60)
  57. at Moldering.GamePanel.initialize(GamePanel.java:1344)
  58. at Moldering.GamePanel.run(GamePanel.java:507)
  59. at java.lang.Thread.run(Thread.java:636)
  60.  
  61.  
  62. Which means that "net.java.games.joal.AL" class from updated joal.jar does not have method called from Utilities.JOALSoundMan.initListener. This is the final proof that old joal.jar from Modering distrib is not compatiple with joal.jar from 1.1.3 version.
  63.  
  64.  
  65. The simple solution to run the game in linux could be finding earlier versions of joal lib, to see which of them matches to the one provided with Moldering distrib and to add/replace joal files inside Moldering.zip as described above. The problem here is that I just could not find earlier joal versions source/builds by the reason provided above (the site is dead and no mirrors with all historical versions). Most likely you will meet same problems if you will want to run the game on Mac if you don't have native joal mac lib of the same version as provided joal.dll. You can also try to move to joal 1.1.3 which must not be that hard as moving to another lib, but 1.1.3 in turn seems not to have prebuilt windows joal.dll, so this is dilemma :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement