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 (406)
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  
  Native libs in Applets  (Read 611 times)
0 Members and 1 Guest are viewing this topic.
Offline TheAnalogKid
« League of Dukes »

JGO Coder


Projects: 3



« Posted 2006-02-16 18:36:53 »

Hi,

I'm wondering if it's possible to load native libs in an applet? If yes how? Simply with the archive attribute?

Also, how can I set system properties in the applet html descriptor?

Thanks

Offline Linuxhippy

Senior Member


Medals: 1


Java games rock!


« Reply #1 - Posted 2006-02-16 20:41:46 »

Hi!

1.) Thats quite simple:
- Your applet has to be signed - run withought any security restrictions
- Your native library has to be copied somewhere out of the jar to a disk of you user's computer. (Since lib-loading is os-dependant and os can't load libs out of jav-files of course)
- Just load the lib via System.load***

But i really would not do that - it limits your app to less than one platform (in case of windows even win64 is problematic), ask yourself wether you really need this or it would be just cool to have it.

2.) I don't know any way setting system properties via the html-parameters, if you think about setting java2d related properties you can almost forget it since AWT is already initialized when the applet executes custom code - so you've to live with what you get.

lg Clemens
Offline TheAnalogKid
« League of Dukes »

JGO Coder


Projects: 3



« Reply #2 - Posted 2006-02-16 20:48:56 »

Thanks for your answer.

Quote
But i really would not do that - it limits your app to less than one platform (in case of windows even win64 is problematic)
It could work at least for Windows. Think about all the native libs from LWJGL, GAGE timer, ... One problem is to make sure to load the correct libs according to the platform.

Quote
ask yourself wether you really need this or it would be just cool to have it.
The purpose is to be able to use gaming libs that use native libs for hardware acceleration or other harware related things. I though it would be obvious.

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

Senior Member


Medals: 1


Java games rock!


« Reply #3 - Posted 2006-02-16 21:52:16 »

Yes for libraries like lwjgl the challange is to figure out which libraries to load, but loading the libraries itself works (surprisingly) well ... I never enountered any problems.

Yes I've answered this question many times (at least 3-4x) and most of the time at forum.java.sun.com where people think about access to win32 and stuff like that. I simply did not think far enough Wink

Good luck, lg Clemens
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!
 
Get high quality music tracks 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 (76 views)
2013-05-17 21:29:12

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

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

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

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

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

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

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

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

UnluckyDevil (185 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.077 seconds with 20 queries.