You can create a desktop-only project with GDX just like you would with any Java class library. Here's how to do it in Eclipse.
1. Create a new project.
2. Right click your project and select Properties. In the "Java Build Path" tab, add the necessary GDX dependencies. In my project I copied them from the LibGDX Nightlies
into the folder
, then used Add JARs to select a JAR within the project path. If you want to keep your GDX JARs in the same folder for all your projects, you would select "Add External JARs" instead.
3. Create a new source folder called "assets", like so:
Inside that source folder, add a new folder like "res" or "data" for your resources. For example, if you have "assets/data" for your resources, then you'll use the following to access it:
Another option is to include your resources in your "src" folder, but this is not always recommended.
4. Compile and run a basic test:http://www.java-gaming.org/?action=pastebin&id=521