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 06-11-2009, 09:40 AM
jphipps jphipps is offline
Sage Expert
 
Join Date: Aug 2006
Location: Maryland
Posts: 512
java file access from an extender

I have a java class that I am calling from Sage that creates an XML file, and when I run it on my Client, it creates the file correctly. When I try to do the same on my HD100 extender, the file is not created. I have not had a chance to put the code in for the exception handling to debug it yet. I was wondering how java file handling was done on the extenders. I know the studio guide said that on an extender or placeshifter does local IO against the server, but just wanted to verify that was the case. I am running 6.5.17 if it matters...

Thanks,
Jeff
Reply With Quote
  #2  
Old 06-11-2009, 10:17 AM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
Should work just like client except the java is run on the server.

Are you running the server in service mode? If so, it could be a network path access problem?
Reply With Quote
  #3  
Old 06-11-2009, 10:25 AM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
When using Java file calls, file access from extenders would be on the server.

If you are talking about the SageTV file access calls, then I may need to update the Studio manual. Since the HD200 and Placeshifter can access files on drives connected to them, the "Local" API calls actually access files on their local file systems. The non-Local file API calls access files on the SageTV server.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #4  
Old 06-11-2009, 12:29 PM
jphipps jphipps is offline
Sage Expert
 
Join Date: Aug 2006
Location: Maryland
Posts: 512
I am running my server in service mode. The current call I have did not specify a path, just a file name. When I ran it on my client, it created the file under c:\programs\sagetv\sagetv, but when I ran it on the HD100, I searched the entire C: drive on the server, and could not find the file. I will put some logging into the exception handling to see if/what errors it may be getting..

How would you access the server file system on the HD200 or placeshifter using java if file classes would access local storage?

Thanks,
Jeff
Reply With Quote
  #5  
Old 06-11-2009, 12:37 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
What exact call are you using? Yes, checking the server's log could help.

Java file IO calls don't access the extender/placeshifter's local drive; only the SageTV "Local" versions of file accessing API calls can do that.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #6  
Old 06-11-2009, 01:21 PM
jphipps jphipps is offline
Sage Expert
 
Join Date: Aug 2006
Location: Maryland
Posts: 512
I am use a FileOutputStream to write out an xml document. I will check the exception later tonight. Sounds like all java File IO classes will use the server or client filesystem. Is there a way from java to write to the local disk of a HD200 or placeshifter client, or is it easier to try to use the SageTV calls?

Thanks,
Jeff
Reply With Quote
  #7  
Old 06-11-2009, 01:23 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Try doing java_io_File_getAbsolutePath(new_java_io_File("Foo.xml")) and see what you get.

Best practice is probably not to use relative filenames in the first place, since you don't control how Sage sets the current directory and can't guarantee that it will be what you expect. Instead, use file system calls to get the explicit path of your plugin's install directory, or the user's profile directory, and put your config files there.

Note that if your server is running Vista, attempts to create data files under Program Files\SageTV\SageTV may fail or get redirected somewhere else.
__________________
-- Greg
Reply With Quote
  #8  
Old 06-11-2009, 08:55 PM
jphipps jphipps is offline
Sage Expert
 
Join Date: Aug 2006
Location: Maryland
Posts: 512
I am at a loss... I put a display for the getAbsolutePath and exception handlers in to log to the sage log, sage log entries in the method to produce output through various stages of the code and rebuild the jar... And of couse, it ran fine and generated the XML files just like they should have...

The getAbsolutePath did return c:\program files\sagetv\sagetv... I didn't use a specific path because I am still working out the locations I am going to store the files, so I did a quick and dirty...

Thanks for everyones help...
Jeff
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
Java error - file attached stani SageTV Software 0 11-05-2007 10:33 AM
sage tv won't work when java access bridge is installed, arg!!! (hairpulling!!) whocrazy SageTV Software 7 11-20-2006 12:16 AM
Testing Sagetv with Java Access bridge nallan SageTV Software 0 04-01-2006 07:31 PM
MVP Extender Reboots on Video Access crmartin SageTV Media Extender 3 01-13-2006 12:33 PM
Sage file access details? lovingHDTV SageTV Software 17 07-10-2005 08:57 AM


All times are GMT -6. The time now is 01:40 AM.


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