| The original author of X-Ray used Eclipse when building the project, so |
| I've done so as well. There are a couple of things to keep in mind |
| to get this to run in Eclipse, which doesn't seem to be stored in the |
| .project files which get saved in the actual source archive; sorry about |
| that. |
| |
| 1) The build expects the LWJGL libraries and a few other Jar files in |
| the "lib" directory. Specifically it's looking for: |
| |
| AppleJavaExtensions.jar (presumably just for OSX) |
| jinput.jar |
| lwjgl_test.jar |
| lwjgl_util_applet.jar |
| lwjgl_util.jar |
| lwjgl.jar |
| lzma.jar |
| |
| ... Possibly some of those are optional, but you may as well leave them |
| in. Inside lib/native, make sure that you've got the "native" LWJGL |
| files, as well. These will be .dll if you're on Windows, and .so on |
| Linux. |
| |
| 2) In Eclipse, go to Window -> Preferences -> Java -> Build Path -> Classpath |
| Variables, then click the "New" button and create a variable called |
| "XRAY_CLASSPATH". Point that directory at the "lib" dir underneath the |
| X-Ray project. This should let you compile the app. |
| |
| (As an aside, the ".classpath" file distributed with the original X-Ray |
| distribution specified its jar files with relative paths, such as |
| "lib/lwjgl.jar". I could never get that to actually work, though, which |
| is why they're all prefixed with that XRAY_CLASSPATH var now. It'd be |
| nice to know why, and equally nice to be able to get rid of having to |
| set up that variable.) |
| |
| 3) To actually RUN the app through Eclipse, right-click on the top project |
| in Package Explorer, go to Properties -> Run/Debug Settings -> XRay, and |
| click on "Edit". In the Arguments tab, set the VM arguments to: |
| |
| -Xms128m -Xmx1024m -Djava.library.path=/path/to/workspace/xray/lib/native |
| |
| ... replacing the "/path/to/workspace" with the path to your actual |
| Eclipse workspace. If anyone's got a way around having to do that, let |
| me know. |
| |
| You MIGHT have to go into the Classpath tab there, as well, and add in |
| the JARs under lib/ again (which would show up under that XRAY_CLASSPATH |
| var), though I don't remember if that automatically happens or not. |
| |
| Once you've gotten that, you should be good to go. I've included a build.xml |
| which you can use to build a distribution file, etc, which I'm assuming should |
| work fine outside of Eclipse, too, though I've not tried it yet. |