Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (472)
Games in Android Showcase (105)
games submitted by our members
Games in WIP (524)
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  
  clarification needed on "getting started"  (Read 4130 times)
0 Members and 1 Guest are viewing this topic.
Offline xi4xi4

Innocent Bystander





« Posted 2010-09-05 15:55:29 »

Hi, I am trying to set this up in ubuntu. Im fairly new to linux and I also hate setting up environments. When you say add the .so file to java.library.path - how exactly do I do that ?

PS Im using eclipse.
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #1 - Posted 2010-09-05 22:03:11 »

Easiest way in eclipse is to right click the jinput.jar library in your project settings, and point the native library to where the .so is. From the command line you'll need a -Djava.library.path= pointing at the directory containing the .so

HTH

Endolf

Offline fishtoprecords

Senior Newbie





« Reply #2 - Posted 2011-02-04 21:47:33 »

As an alternative, all you have to do is copy the appropriate .so for your verrsion, i.e..

for 32 bit ubuntu:  libjinput-linux.so
and for 64 bit ubuntu: libjinput-linux64.so

to the proper directory in your JRE installation. For example, on my laptop, I have the JDK installed in
/opt/jdk1.6.0_21/
so the appropriate directory is
/opt/jdk1.6.0_21/jre/lib/i386

all you have to do is copy the proper .so to that directory and you are ready to go.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline DzzD
« Reply #3 - Posted 2011-02-04 22:18:00 »

As an alternative, all you have to do is copy the appropriate .so for your verrsion, i.e..

for 32 bit ubuntu:  libjinput-linux.so
and for 64 bit ubuntu: libjinput-linux64.so

to the proper directory in your JRE installation. For example, on my laptop, I have the JDK installed in
/opt/jdk1.6.0_21/
so the appropriate directory is
/opt/jdk1.6.0_21/jre/lib/i386

all you have to do is copy the proper .so to that directory and you are ready to go.

hum really not a best practice idea, after some monthes you will have forgot that you put this library in a system folder and will encounter bugs in others projects and will have trouble to find where it come from ( caused by version mismatch between libraries and jars)

Offline fishtoprecords

Senior Newbie





« Reply #4 - Posted 2011-02-04 22:21:06 »

I agree with the potential for version skew. Perhaps I don't understand the suggestions above.
Something has to bind the .so to a known place so that the java library can find the needed functions.

How do you suggest one do that?
Offline cylab

JGO Knight


Medals: 38



« Reply #5 - Posted 2011-02-05 11:57:27 »

Adding
  -Djava.library.path=/path/to/your/additional/so/files
to the java command when starting an application expands the native library search path.

For linux "experts": it's more or less the same as doing
  LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/your/additional/so/files; java ...

Both have the same effect, that the native libraries are found by the java executable without adding them to some system paths.

Mathias - I Know What [you] Did Last Summer!
Offline fishtoprecords

Senior Newbie





« Reply #6 - Posted 2011-02-05 16:04:27 »

Thanks for the clarification. Nice to know.

I'm not convinced that its really needed, over the simple copy. Except that if you put it in the JRE directory, and subsequently use another JRE version or even change to a completely new JRE, you have to redo it. I don't think its likely that we'll see a lot of name conflict, libjinput-linux.so is a nice name.
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #7 - Posted 2011-02-05 16:11:22 »

Adding it to the jdk is crazy, what happens if you have 2 apps installed that depend on different versions of jinput?

Offline fishtoprecords

Senior Newbie





« Reply #8 - Posted 2011-02-05 16:33:47 »

Adding it to the jdk is crazy, what happens if you have 2 apps installed that depend on different versions of jinput?
I could be wrong, I often am.

I can't imagine that. Are there really serious compatibility problems with jinput? Does it really upgrade that frequently?

Standard Unix practice, going back decades, is to use version numbers in the name to keep them separate if needed.
libjinput-linux_2.1.3a.so

On Windows, we are stuck with DLL hell
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #9 - Posted 2011-02-05 18:03:03 »

People can do what ever they want with JInput code (with BSD limits), which means we can't assume anything. And as you point out, windows is 'fun'

Endolf

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.

Riven (6 views)
2014-07-10 20:20:18

CopyableCougar4 (16 views)
2014-07-10 02:26:14

CopyableCougar4 (25 views)
2014-07-09 02:55:38

Code Mage (24 views)
2014-07-08 23:57:00

Code Mage (10 views)
2014-07-08 23:49:08

AppleSauce (20 views)
2014-07-08 19:25:32

CopyableCougar4 (21 views)
2014-07-06 01:51:26

ipe369 (26 views)
2014-07-05 14:18:25

vastrolorde (37 views)
2014-07-04 18:45:44

theagentd (53 views)
2014-07-02 22:19:37
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!