Go to Post Hi. My name is Rick and I am a Roboholic. - Rick TYler [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-01-2017, 22:53
lucas.alvarez96's Avatar
lucas.alvarez96 lucas.alvarez96 is offline
Registered User
AKA: Lucas Alvarez
FRC #2576 (Chilean Heart)
 
Join Date: Dec 2013
Rookie Year: 2013
Location: Chile
Posts: 123
lucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to all
Java external libraries

Can we keep on importing libraries into the build process from custom directories in the same way as before? I used to write the following lines in build.properties file in the project source:

Code:
lib.dir=${src.dir}/../lib
userLibs=\
	${lib.dir}/library_1.jar:\
	${lib.dir}/library_2.jar:\
Does this still work considering that the build process now includes files in the wpilib directory?
__________________
FRC 2576 2015-2016: Mentor
FRC 2576 2013-2015: Programmer & Chairman's Presenter

Los Angeles Regional 2014: Regional Chairman's Award
Reply With Quote
  #2   Spotlight this post!  
Unread 31-01-2017, 23:49
AustinShalit's Avatar
AustinShalit AustinShalit is offline
Registered User
AKA: אוסטין
no team (WPILib Suite Developer)
 
Join Date: Dec 2013
Rookie Year: 2008
Location: Los Angeles/Worcester/Israel
Posts: 154
AustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of lightAustinShalit is a glorious beacon of light
Re: Java external libraries

Follow the steps in this article to add a library:

http://wpilib.screenstepslive.com/s/...arty-libraries
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 01-02-2017, 00:19
lucas.alvarez96's Avatar
lucas.alvarez96 lucas.alvarez96 is offline
Registered User
AKA: Lucas Alvarez
FRC #2576 (Chilean Heart)
 
Join Date: Dec 2013
Rookie Year: 2013
Location: Chile
Posts: 123
lucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to all
Re: Java external libraries

So I have to add the libraries to \wpilib\user\java\lib? Is this the only way to get the libraries recognized by the build? The thing is that I'd like to include the libraries in the project folder for easier distribution.

I noticed that the build.properties file in wpilib defines the user libraries with
Code:
userLibs.dir=${user.home}/wpilib/user/java/lib
I tried overwriting that setting with the following two lines at the end of the build.properties file in my project:
Code:
lib.dir=${src.dir}/../lib
userLibs.dir=${lib.dir}/yamlbeans-1.11.jar:${lib.dir}/commons-collections4-4.1.jar
However, I get the following error message upon deploying:
Code:
BUILD FAILED
C:\Users\Lucas\wpilib\java\current\ant\build.xml:124: D:\Lucas\Desktop\FRC\2017\eclipse_workspace\Pie-API\lib\lib\commons-collections4-4.1.jar does not exist.
That's cause I have my libraries in Pie-API/lib/ not Pie-API/lib/lib/. If I remove the /lib from the lib.dir definition, the build process tries to find the libraries in Pie-API/.

I know that I can just place my libraries in a Pie-API/lib/lib/ folder, but I'm sure that I'm doing something awfully wrong. Is there any way of correctly setting a different userLibs.dir directory?
__________________
FRC 2576 2015-2016: Mentor
FRC 2576 2013-2015: Programmer & Chairman's Presenter

Los Angeles Regional 2014: Regional Chairman's Award
Reply With Quote
  #4   Spotlight this post!  
Unread 01-02-2017, 00:40
lucas.alvarez96's Avatar
lucas.alvarez96 lucas.alvarez96 is offline
Registered User
AKA: Lucas Alvarez
FRC #2576 (Chilean Heart)
 
Join Date: Dec 2013
Rookie Year: 2013
Location: Chile
Posts: 123
lucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to alllucas.alvarez96 is a name known to all
Re: Java external libraries

Ok, I got it. I just had to set the userLibs.dir option in my build.properties like:
Code:
userLibs.dir=lib
That actually should've been really obvious from the beginning
__________________
FRC 2576 2015-2016: Mentor
FRC 2576 2013-2015: Programmer & Chairman's Presenter

Los Angeles Regional 2014: Regional Chairman's Award
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 13:15.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi