SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-08-2010, 09:30 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
How to put .jars into separate folder?

Gents,

I'm looking at using a publicly available java class in a Sage plugin. The java class is not packaged nice and neat into a single jar file. Instead it contains several jar files as well as some .dll and .so libraries that must be in the same place as the jar files. Rather than dumping all of this stuff into the JARs directory I'd like to put it in it's own directory but if I do that how do I tell Sage where to find it?

I took a brief look at ClassLoaders but before spending too much time on this I'd appreciate some insight.

Thanks,

Tom
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #2  
Old 08-08-2010, 11:20 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
I would say just go ahead and put them in the JARs folder, since that's where Sage expects to find plugin JARs. Messing about with custom ClassLoaders is (in my opinion) something that should be done only as a last resort, and only by seasoned Java coders who know exactly what they're doing with it. (Jeff has posted elsewhere that an improperly written ClassLoader can mess up the plugin system.)
__________________
-- Greg
Reply With Quote
  #3  
Old 08-08-2010, 02:34 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Greg,

That's probably good advice but there are about 20 different files that are needed. Stuffing that many items into somebody's JARs folder makes me feel dirty. I suppose that's the lesser of two evils because breaking the plugin system would not make me feel good either.

I'll have to think more about this.

Tom
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #4  
Old 08-08-2010, 03:01 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
What does this class do that requires that many files? Maybe there's another way to get the functions you need without so much baggage.
__________________
-- Greg
Reply With Quote
  #5  
Old 08-08-2010, 03:57 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Yes, that's what I'm thinking too. I would like to access load information for the network and hard drives to see how hard it will be to implement a "Disk Monitor" and "Network Monitor" similar to my "CPU Monitor." That plugin has an amazing number of downloads so obviously there is a demand for it.

This Java class seems to be very popular and it's well supported:

http://sourceforge.net/projects/sigar/files/

Edit: One of my options is to not include the files that are not needed for Windows, Linux and Mac.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #6  
Old 08-08-2010, 07:44 PM
PLUCKYHD PLUCKYHD is offline
SageTVaholic
 
Join Date: Dec 2007
Posts: 6,257
Yeah I was the one who was using class loaders and seeing if classes where loaded in my plugin. I since have stopped and just leave the loading and unloading to sagetv.

Also be sure and seperate those Apis in library type so others can use them if they want and that is where they belong anyhow.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
BMT/ Which dup jars to delete? matt91 SageTV v7 Customizations 2 05-27-2010 08:31 AM
folder.jpg -- where to put it for DVD srothwell SageTV Software 7 07-15-2004 12:13 AM


All times are GMT -6. The time now is 02:29 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.