Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (522)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (589)
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 4486 times)
0 Members and 1 Guest are viewing this topic.
Offline kat15pl

Senior Newbie





« Posted 2012-03-26 20: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: 355
Projects: 3
Exp: 5 years


I'm the King!


« Reply #1 - Posted 2012-03-26 21: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
« Reply #2 - Posted 2012-03-26 21: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-26 22: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
« Reply #4 - Posted 2012-04-05 20: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

JGO Kernel


Medals: 202



« Reply #5 - Posted 2012-04-05 22: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: 56
Projects: 11


Monkey for a head


« Reply #6 - Posted 2012-04-05 22: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
« Reply #7 - Posted 2012-04-05 23: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.

 

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

The first screenshot will be displayed as a thumbnail.

xFryIx (62 views)
2014-11-13 12:34:49

digdugdiggy (41 views)
2014-11-12 21:11:50

digdugdiggy (36 views)
2014-11-12 21:10:15

digdugdiggy (30 views)
2014-11-12 21:09:33

kovacsa (53 views)
2014-11-07 19:57:14

TehJavaDev (56 views)
2014-11-03 22:04:50

BurntPizza (55 views)
2014-11-03 18:54:52

moogie (70 views)
2014-11-03 06:22:04

CopyableCougar4 (71 views)
2014-11-01 23:36:41

DarkCart (156 views)
2014-11-01 14:51:03
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
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!