Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (407)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Eclipse with SDL - how to  (Read 1897 times)
0 Members and 1 Guest are viewing this topic.
Offline kat15pl

Senior Newbie





« Posted 2012-03-26 22:22:24 »

Hi,
If there is topic like that, please tell me (I didn't found any).

Could anyone told me step by step how to integrate my procet (existing) with SDL library for java (sdljava)?

Sorry for my english
Offline ra4king

JGO Kernel


Medals: 264
Projects: 2


I'm the King!


« Reply #1 - Posted 2012-03-26 23:17:18 »

I'm assuming this sdljava contains necessary JAR files and native DLL, SO, and DYLIB files? If so, then it's best to simply put all the JAR files in a folder called "libs" in your project root and then put all the natives in a folder "natives" under "libs". After that you right click the project, choose "Build Path", choose "Configure Build Path". Under the "Projects" tab, click on "Add JARs" and highlight all your JARs. Then expand the main sdljava JAR, double click on "Native Library Location", click on "Workspace", and choose the "natives" folder. You're done setting up the build path Smiley

Offline gouessej

JGO Ninja


Medals: 33
Projects: 1


TUER


« Reply #2 - Posted 2012-03-26 23:34:03 »

Hi

A friend of mine wrote a tutorial in French about SDL in Java. He used it during several months and told me it is quite very buggy. Maybe you should plan to use something else.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline kat15pl

Senior Newbie





« Reply #3 - Posted 2012-03-27 00:00:43 »

I try this simple program (to check SDL):
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
import sdljava.*;
import sdljava.video.*;

class HelloSDL {
   public static void main(String[] args) {
      final String caption = "Hello, SDL!";
      System.out.println(caption);

      try {
         SDLMain.init(SDLMain.SDL_INIT_VIDEO);
         SDLVideo.wmSetCaption(caption, caption);
         SDLSurface screen = SDLVideo.setVideoMode(640, 480, 24, 0);
         java.lang.Thread.sleep(2500);

      } catch (Exception e) {
         e.printStackTrace();
      } finally {
         SDLMain.quit();
      }
   }
}


When I run it it says:

Hello, SDL!
Native code library failed to load.
java.lang.UnsatisfiedLinkError: C:\JavaSDL\lib\SDLJava.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform

I load SDl.dll (64bit), but I can't find SDLJava.dll 64bits.
Offline gouessej

JGO Ninja


Medals: 33
Projects: 1


TUER


« Reply #4 - Posted 2012-04-05 22:40:36 »

Hi

SDLJava has not been updated since 2005-09-16, I have not succeeded in finding the missing DLL. Are you really sure you still want to use this library? You can do the same things with JogAmp (JOGL + JOAL + JOCL) and some high level libraries like Paul Lamb Sound System.

Offline sproingie
« Reply #5 - Posted 2012-04-06 00:05:17 »

It's not like SDL has changed much since 2005 either (1.3 still isn't out) ... but my fuzzy recollection is that SDLJava never worked very well in the first place.
Offline Orangy Tang

JGO Kernel


Medals: 48
Projects: 11


Monkey for a head


« Reply #6 - Posted 2012-04-06 00:43:31 »

It's not like SDL has changed much since 2005 either
Intel macs have been released and become widespread since then though. I doubt SDLJava works on any modern OSX machine...

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline gouessej

JGO Ninja


Medals: 33
Projects: 1


TUER


« Reply #7 - Posted 2012-04-06 01:00:31 »

It's not like SDL has changed much since 2005 either (1.3 still isn't out) ... but my fuzzy recollection is that SDLJava never worked very well in the first place.

That's what I meant in my previous comment. My friend wrote a tutorial about it in 2009 and told me that it was already quite buggy.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Browse for soundtracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (91 views)
2013-05-17 21:29:12

alaslipknot (100 views)
2013-05-16 21:24:48

gouessej (130 views)
2013-05-16 00:53:38

gouessej (125 views)
2013-05-16 00:17:58

theagentd (136 views)
2013-05-15 15:01:13

theagentd (123 views)
2013-05-15 15:00:54

StreetDoggy (165 views)
2013-05-14 15:56:26

kutucuk (187 views)
2013-05-12 17:10:36

kutucuk (190 views)
2013-05-12 15:36:09

UnluckyDevil (196 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.098 seconds with 22 queries.