Jar installation

32 views
Skip to first unread message

Brad Wood

unread,
Apr 13, 2015, 3:13:38 PM4/13/15
to pi...@googlegroups.com
I've been over the standard installation instructions on the main site several times and they basically consist of using apt-get, installing a deb, or running a shell script that basically does the aforementioned.  

The question is, are there any magic things that happen with the installation package, or can I just direct-download the core jars and dump them in my classpath to use them?  

I went ahead and installed via "curl -s get.pi4j.com | sudo bash" when the jars didn't work only to find out my issues was something unrelated.  Now that I've run your recommended installation method I don't know if it was actually necessary or not.

Thanks!

~Brad

Robert Savage

unread,
Apr 13, 2015, 5:46:29 PM4/13/15
to pi...@googlegroups.com
Hi Brad.

Nope ... no magic.  The installation script simply places the Pi4J JARs in a fixed location on the filesystem and provides examples, builds scripts, and a utility "pi4j" shell script for easier command line compiling and launching of a java project that need to include the JARs in its classpath. 

But you can certainly deploy the Pi4J JAR file(s) that you need along with your project as long as they can be picked up in the classpath.

If you want to get rid of the installed version of Pi4J, simply run the command: "pi4j --uninstall"

Thanks, Robert



Brad Wood

unread,
Apr 13, 2015, 5:54:42 PM4/13/15
to Robert Savage, pi...@googlegroups.com
Excellent.  I'll probably eventually get around to writing a CFML wrapper library for Pi4J that will just come bundled with the jars.  

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp 

ColdBox Platform: http://www.coldbox.org 

Brad Wood

unread,
Apr 13, 2015, 7:14:18 PM4/13/15
to Robert Savage, pi...@googlegroups.com
Yep, reverting back to the jars from the last stable release fixed the error.  

"pi4j --uninstall" did not work however:
bash: /usr/bin/pi4j: /bin/bash^M: bad interpreter: No such file or directory

Looks like a Windows line ending got in the script. That's usually what the ^M means.

Robert Savage

unread,
Apr 13, 2015, 7:30:11 PM4/13/15
to pi...@googlegroups.com, rob...@savagehomeautomation.com
Yep, that ^M/<CR> issue was fixed in the release build too :-)  Congratulations you have now uncovered the two (known) defects that plagued the last RC build :-)


Or manually using these commands:


apt-get remove pi4j -y
rm /etc/apt/sources.list.d/pi4j.list
apt-key del te...@pi4j.com
apt-get update


Thanks, Robert
Reply all
Reply to author
Forward
0 new messages