SFML community forums

Bindings - other languages => Java => Topic started by: Yski on February 03, 2014, 11:42:40 am

Title: I'm missing something obvious
Post by: Yski on February 03, 2014, 11:42:40 am
Hi, I'm having some trouble getting started with JSFML, namely importing it. I'm used to working with C++, so I'm thinking I'm missing some obvious step when it comes to importing external libraries in Java. I think the screenshots tell the story better than I ever could.

Simply put, I added jsfml.jar to eclipse's Java build path and tried to import it, and this is what happened.

What's going on?

Title: Re: I'm missing something obvious
Post by: pdinklag on February 03, 2014, 11:08:08 pm
Imports need to be declared before the first class in a Java source file... please read about how to write a basic Java program.
Title: Re: I'm missing something obvious
Post by: Yski on February 04, 2014, 07:32:59 pm
I had misplaced the import? I knew it was something obvious, but that? There's no excuse for this; I'm bad and right now I should feel bad  :-[

That was a total blackout, as I've been using Java's built in libraries for ages (heck, importing works the same way in every language I can think of), so that really shouldn't have happened. My apologies, and thanks for pointing it out!