NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Architecture (32Bit<-->64Bit) dependend module depencencies

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
Oliver Rettig
Posted via mailing list.





PostPosted: Thu Oct 16, 2008 2:21 pm    Post subject: Architecture (32Bit<-->64Bit) dependend module depencencies Reply with quote

Hallo,

I have a build a netbeans module, which depends on the java3d api. It is easy
to build a library wrapper module for the jars. But what to do with the
native libs? Different native libs for windows and linux are no problem. I
can put them in the lib/ext folder and only the needed ones are loaded based
on the files extentions.

But what to do with different architectures: 32bit versus 64bit?

Thanks for your help

Oliver Rettig
Back to top
Emilian Bold
Posted via mailing list.





PostPosted: Fri Oct 17, 2008 9:17 am    Post subject: Architecture (32Bit<-->64Bit) dependend module depencencies Reply with quote

See http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html#jni
and http://platform.netbeans.org/articles/installation.html

specifically the part:

lib: contains native JNI libraries and basic boot files. The naming
policy of the libraries is in hands of the modules, as that it has
worked well enough till now. If it proves unsufficient following
conventions shall be obeyed: There are subdirectories under the lib
directory that reflect the architecture (e.g. i386, obtained via
System.getProperty ("os.arch")) and possibly also subdirectory
identifying the system (e.g. i386/linux, obtained via
System.getProperty ("os.name").toLowerCase ()). When the system is
looking for a particular library it scans the deepest directories
first and then the shallow ones (lib/i386/linux, lib/i386, lib).

--emi

On Thu, Oct 16, 2008 at 4:24 PM, Oliver Rettig <address-removed> wrote:
Quote:
Hallo,

I have a build a netbeans module, which depends on the java3d api. It is easy
to build a library wrapper module for the jars. But what to do with the
native libs? Different native libs for windows and linux are no problem. I
can put them in the lib/ext folder and only the needed ones are loaded based
on the files extentions.

But what to do with different architectures: 32bit versus 64bit?

Thanks for your help

Oliver Rettig




--
Emilian Bold
+40 740235562
http://www.emilianbold.ro

Java and NetBeans Platform-loving consulting services from Timisoara, Romania.
Back to top
Fabrizio Giudici
Posted via mailing list.





PostPosted: Fri Oct 17, 2008 9:43 am    Post subject: Architecture (32Bit<-->64Bit) dependend module depencencies Reply with quote

But does this really work? The latest time we discussed about it (it was several months ago) I understood that the support for os.name etc... was a possible evolution for future and doesn't work at the moment. AFAIK the "library clash" problem exists and in fact it affects my application too. I hope I'm wrong...

Emilian Bold wrote:
Quote:
Quote:
See http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html#jni
and http://platform.netbeans.org/articles/installation.html

specifically the part:

lib: contains native JNI libraries and basic boot files. The naming
policy of the libraries is in hands of the modules, as that it has
worked well enough till now. If it proves unsufficient following
conventions shall be obeyed: There are subdirectories under the lib
directory that reflect the architecture (e.g. i386, obtained via
System.getProperty ("os.arch")) and possibly also subdirectory
identifying the system (e.g. i386/linux, obtained via
System.getProperty ("os.name").toLowerCase ()). When the system is
looking for a particular library it scans the deepest directories
first and then the shallow ones (lib/i386/linux, lib/i386, lib).

--emi

On Thu, Oct 16, 2008 at 4:24 PM, Oliver Rettig <address-removed> ([email]address-removed[/email]) wrote:
Quote:
Hallo,

I have a build a netbeans module, which depends on the java3d api. It is easy
to build a library wrapper module for the jars. But what to do with the
native libs? Different native libs for windows and linux are no problem. I
can put them in the lib/ext folder and only the needed ones are loaded based
on the files extentions.

But what to do with different architectures: 32bit versus 64bit?

Thanks for your help

Oliver Rettig




--
Fabrizio Giudici, Ph.D. - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
address-removed ([email]address-removed[/email]) - mobile: +39 348.150.6941
Back to top
Emilian Bold
Posted via mailing list.





PostPosted: Fri Oct 17, 2008 11:02 am    Post subject: Architecture (32Bit<-->64Bit) dependend module depencencies Reply with quote

Well, I never actually needed it, I was just pointing to the documentation.

On Linux though I know that hierarchy should be the way the linker
looks for libraries so I *think* it should work.

--emi

On Fri, Oct 17, 2008 at 11:42 AM, Fabrizio Giudici
<address-removed> wrote:
Quote:
But does this really work? The latest time we discussed about it (it was
several months ago) I understood that the support for os.name etc... was a
possible evolution for future and doesn't work at the moment. AFAIK the
"library clash" problem exists and in fact it affects my application too. I
hope I'm wrong...

Emilian Bold wrote:

See
http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html#jni
and http://platform.netbeans.org/articles/installation.html

specifically the part:

lib: contains native JNI libraries and basic boot files. The naming
policy of the libraries is in hands of the modules, as that it has
worked well enough till now. If it proves unsufficient following
conventions shall be obeyed: There are subdirectories under the lib
directory that reflect the architecture (e.g. i386, obtained via
System.getProperty ("os.arch")) and possibly also subdirectory
identifying the system (e.g. i386/linux, obtained via
System.getProperty ("os.name").toLowerCase ()). When the system is
looking for a particular library it scans the deepest directories
first and then the shallow ones (lib/i386/linux, lib/i386, lib).

--emi

On Thu, Oct 16, 2008 at 4:24 PM, Oliver Rettig <address-removed>
wrote:


Hallo,

I have a build a netbeans module, which depends on the java3d api. It is
easy
to build a library wrapper module for the jars. But what to do with the
native libs? Different native libs for windows and linux are no problem. I
can put them in the lib/ext folder and only the needed ones are loaded based
on the files extentions.

But what to do with different architectures: 32bit versus 64bit?

Thanks for your help

Oliver Rettig





--
Fabrizio Giudici, Ph.D. - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
address-removed - mobile: +39 348.150.6941




--
Emilian Bold
+40 740235562
http://www.emilianbold.ro

Java and NetBeans Platform-loving consulting services from Timisoara, Romania.
Back to top
mbien



Joined: 19 Aug 2008
Posts: 27
Location: Germany (LA)

PostPosted: Sun Oct 19, 2008 12:51 pm    Post subject: Reply with quote

the doc is really misleading, it only suggests how you should do it, but does not say that this way is the supported way... etc

Also because it is common for many libraries to manage native lib loading by itself the suggested deployment strategy won't work anyway.

I decided to just circumvent the whole netbeans native library storry entirely and implemented a simple deployment mechansim by myself (aka results&simplicity first).

The idea is basically to deploy the correct natives on mudule install into the lib folder.

here is a "deployment descriptor" for jogl:
https://netbeans-opengl-pack.dev.java.net/source/browse/*checkout*/netbeans-opengl-pack/trunk/jogl/src/net/java/nboglpack/jogl/jogl-natives-config.xml?content-type=text%2Fplain&rev=397

here the native-lib-support module:
https://netbeans-opengl-pack.dev.java.net/source/browse/netbeans-opengl-pack/trunk/native-lib-support/src/net/java/nativelibsupport/

BTW, don't waste your time to file RFEs/BUGs against it they will be usually closed as "WONT FIX" especially short before releases where the devs will try to keep the bugcount low.

regards,

michael
Back to top
Fabrizio Giudici
Posted via mailing list.





PostPosted: Mon Oct 20, 2008 1:16 pm    Post subject: Architecture (32Bit<-->64Bit) dependend module depencencies Reply with quote

COLUMBUS' EGG!

Michael, you have probably already explained this to me earlier, but
I've understood it only now. It's neat!

mbien wrote:
Quote:
the doc is really misleading, it only suggests how you should do it, but does not say that this way is the supported way... etc



Also because it is common for many libraries to manage native lib loading by itself the suggested deployment strategy won't work anyway.



I decided to just circumvent the whole netbeans native library storry entirely and implemented a simple deployment mechansim by myself (aka results&simplicity first).



The idea is basically to deploy the correct natives on mudule install into the lib folder.



here is a "deployment descriptor" for jogl:

https://netbeans-opengl-pack.dev.java.net/source/browse/*checkout*/netbeans-opengl-pack/trunk/jogl/src/net/java/nboglpack/jogl/jogl-natives-config.xml?content-type=text%2Fplain&rev=397



here the native-lib-support module:

https://netbeans-opengl-pack.dev.java.net/source/browse/netbeans-opengl-pack/trunk/native-lib-support/src/net/java/nativelibsupport/



BTW, don't waste your time to file RFEs/BUGs against it they will be usually closed as "WONT FIX" especially short before releases where the devs will try to keep the bugcount low.



regards,



michael



--
Fabrizio Giudici, Ph.D. - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
address-removed - mobile: +39 348.150.6941
Back to top
mbien



Joined: 19 Aug 2008
Posts: 27
Location: Germany (LA)

PostPosted: Mon Oct 20, 2008 5:31 pm    Post subject: Re: Architecture (32Bit<-->64Bit) dependend module depencencies Reply with quote

Fabrizio Giudici wrote:
COLUMBUS' EGG!

Michael, you have probably already explained this to me earlier, but
I've understood it only now. It's neat!

thank you!
but its true I sometimes don't understand my own explanations Wink

-michael

Fabrizio Giudici wrote:

mbien wrote:
Quote:
the doc is really misleading, it only suggests how you should do it, but does not say that this way is the supported way... etc



Also because it is common for many libraries to manage native lib loading by itself the suggested deployment strategy won't work anyway.



I decided to just circumvent the whole netbeans native library storry entirely and implemented a simple deployment mechansim by myself (aka results&simplicity first).



The idea is basically to deploy the correct natives on mudule install into the lib folder.



here is a "deployment descriptor" for jogl:

https://netbeans-opengl-pack.dev.java.net/source/browse/*checkout*/netbeans-opengl-pack/trunk/jogl/src/net/java/nboglpack/jogl/jogl-natives-config.xml?content-type=text%2Fplain&rev=397



here the native-lib-support module:

https://netbeans-opengl-pack.dev.java.net/source/browse/netbeans-opengl-pack/trunk/native-lib-support/src/net/java/nativelibsupport/



BTW, don't waste your time to file RFEs/BUGs against it they will be usually closed as "WONT FIX" especially short before releases where the devs will try to keep the bugcount low.



regards,



michael



--
Fabrizio Giudici, Ph.D. - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
address-removed - mobile: +39 348.150.6941
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo