|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
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 |
#2
|
||||
|
||||
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? |
#3
|
||||
|
||||
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. |
#4
|
|||
|
|||
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 |
#5
|
||||
|
||||
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. |
#6
|
|||
|
|||
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 |
#7
|
||||
|
||||
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 |
#8
|
|||
|
|||
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 |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
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 |