Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3508 Members - Latest Member: PienueDut

26. May 2012, 10:57:17 am
Xith3D CommunityGeneral CategoryGeneral Discussion (Moderators: Marvin Fröhlich, 'n ddrylliog)Netbeans java.library.path=${...}
Pages: [1]
Print
Author Topic: Netbeans java.library.path=${...}  (Read 2308 times)
monty_hall
Just dropped in

Offline Offline

Posts: 2


View Profile Email
« on: 23. March 2009, 06:07:00 pm »

I've noticed that xith-tk has a nblibraries.properties file that points to the location of the native .dll files.  The netbeans "run vm args" are: "-Djava.library.path="${libs.xith3d-third-party-natives.classpath}""  This is rather nifty as I originally had a rather long path list. 

I'm assuming that when I ask netbeans to execute a xith-tk program, netbeans will deference "${libs.xith3d-third-party-natives.classpath}" from the nblibraries.properties file and then execute.  Or does it?  I like the idea of referencing dll or jars from a properties file than one large monolithic classpath or -Djava.library.path command line entry.  Any info appreciated.

Monty
Logged
hell32
Just dropped in

Offline Offline

Posts: 14


...compilling into hell64 (15% complete)


View Profile
« Reply #1 on: 24. March 2009, 08:00:31 am »

vm params not like program params, they pickups
Code: (java)
    public static final String JVM_PARAMETER_LIBRARIES = "libraries.xml.path";
    public static final String JVM_PARAMETER_TYPES = "types.xml.path";

 

        Map<String, String> types = LibraryTypeParser.parseTypes(System.getProperty(JVM_PARAMETER_TYPES));
        List<LibraryVO> libs = LibraryParser.parseLibraries(System.getProperty(JVM_PARAMETER_LIBRARIES));


System.getProperty(JVM_PARAMETER_LIBRARIES)

Logged

Sorry i'm bad speak English xD
Mathias 'cylab' Henze
Fierce Warrior
****
Offline Offline

Posts: 540

1064620
View Profile WWW
« Reply #2 on: 24. March 2009, 11:40:15 am »

I've noticed that xith-tk has a nblibraries.properties file that points to the location of the native .dll files.  The netbeans "run vm args" are: "-Djava.library.path="${libs.xith3d-third-party-natives.classpath}""  This is rather nifty as I originally had a rather long path list. 

I'm assuming that when I ask netbeans to execute a xith-tk program, netbeans will deference "${libs.xith3d-third-party-natives.classpath}" from the nblibraries.properties file and then execute.  Or does it?  I like the idea of referencing dll or jars from a properties file than one large monolithic classpath or -Djava.library.path command line entry.  Any info appreciated.

You are right. In xith-tk, we created a special native classpath, that points to the dlls (or other natives when you rename a "nblibraries-private-<platform>.properties" file to "nblibraries-private.properties"). You can even edit this in netbeans, if you temporarily add the "xith3d-third-party-natives" library in the projects properties and click the Edit-Button. You have to remove it from the classpath afterwards, though, since otherwise the natives are also includes in the - well - classpath Wink  You don't want that (could lead to problems). You only want the property being set to reference it in the JVM args.

Hope it helps.

PS. the same "trick" is mentioned in my "Setting up Xith3d in Netbeans 6.1" (currently the only Smiley) blog post.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic