Eclipse + Java O.o


Kramy

Active Member
Joined
Mar 15, 2008
Messages
688
Okay, I've been learning Java in my spare time for a little while now, and figured I'd try making something for the GP2X. I've been using JCreator LE(and IDE which apparently vastly simplifies working with projects), and created some tiny win32 games; things like Minesweeper, and Pipedream. :lol:

I downloaded the java devkit(which works with Eclipse?) and runtimes(go on the SD card?), and that's about where my luck at figuring things out ends.

The instructions are pretty vague, especially for someone that has zero experience with the Eclipse IDE. However, I followed them to the letter.
Instructions said:
The easy way to start using this devkit is importing all projects inside the Eclipse IDE (www.eclipse.org) and giving a look at how the Hello World is implemented.
It is necessary to import all projects because they have dependencies, for example all projects depends on HAL.

Okay, done. Projects imported. Now it's spitting out an error message, and I can't figure out how to fix it. B)

Where do I get this 'sdljava' project? It didn't come in the devkit, although there are a slew of sdljava folders, none of which appear to be projects. Do I have to download/configure something else?
eclipseerrorgu9.png


Gah, I need a tutorial. I'm a web scripter at heart... :p
 
Last edited by a moderator:
Sphinxter said:
It looks like eclipse is telling you on the first highlighted line it wants this which may or may not be what you want.
http://sdljava.sourceforge.net/


I think the idea behind the devkit is it contains everything you need. ;)

However, the instructions listed on the site might help. I'll give it a whirl...
CODE
USAGE
==================
After everything is compiled and nicely packaged up you can
write programs which utilize sdljava by doing two things:

1) include the native libraries (.so or .dll) files in the
java.library.path with the appropriate switch to the java vm:
java -Djava.library.path=$(SDLJAVA)/lib

2) include the classes from sdljava in the classpath by either
including the jarfile on the classpath or the classes
directory itself:
java -cp $(SDLJAVA)/lib/sdljava.jar
OR
java -cp $(SDLJAVA)/lib/classes

For example you can run the test for the video module like so:
java -Djava.library.path=./lib -cp ./classes/ sdljava.video.SDLVideoTest


Edit: Yeah, I have no clue what I'm doing. Linking stuff is beyond me. I like coding, but really don't like configuring IDEs or compilers.
 
Last edited by a moderator:
Well, I gave up on eclipse and went back to JCreator.

Dragged all the lib dll files into my project's build folder, and then it informed me of this:
CODE
java.lang.UnsatisfiedLinkError: F:\Programming Software\Sun Java\Projects\SDL Test\build\SDLJava.dll: Can't find dependent libraries


Google'd it, and someone else had the same problem; he advised using this to find the solution.

Used it on sdljava.dll, and apparently I was missing msvcr71d.dll; ahh...Microsoft. Downloaded that DLL and stuck it in my project's build folder, and now FINALLY it'll compile/run! Woohoo! :D
 
So, on to the next question.

Do the GP2X java runtimes work with an F200? I gather you put them on the SD card, run Launcher.sh.gpe, and select a jar file, right?

When I run it, a java logo appears. Then the screen goes black, and a droning noise comes out of the speakers. Nothing happens even if I leave it 30 seconds, so I have to cycle the power.

Erm...help? :lol:
 
Back
Top