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 12-20-2010, 02:50 PM
Ericvic Ericvic is offline
Sage User
 
Join Date: Apr 2005
Posts: 48
Studio Java class Question

I have a customer class that I call from inside an STV. I had this working fine in v6 but now that I have upgraded to v7 I can't get it to work. What is the best way to debug some java code that is called within Sage? I know I used to know this when I originally created the class but that was over 2 years ago and I haven't had to touch it since it just worked.

Thanks,
Eric
Reply With Quote
  #2  
Old 12-20-2010, 03:08 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by Ericvic View Post
I have a customer class that I call from inside an STV. I had this working fine in v6 but now that I have upgraded to v7 I can't get it to work. What is the best way to debug some java code that is called within Sage? I know I used to know this when I originally created the class but that was over 2 years ago and I haven't had to touch it since it just worked.

Thanks,
Eric
If you turn on debug logging, then the sagetv_0.txt file may contain some output (exceptions, etc). Also, if you are not using your own loggers, then you can output informatin to the sagetv_0.txt using System.out.println("You message"); from inside the java code.

You'll need to restart sagetv each time our rebuild your java classes.
Reply With Quote
  #3  
Old 12-20-2010, 03:13 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by Ericvic View Post
I have a customer class that I call from inside an STV. I had this working fine in v6 but now that I have upgraded to v7 I can't get it to work.
Dumb question, but did you update the STV properly? If the code worked under v6 it should work under v7. Maybe when you updated the v7 STV you did something slightly wrong (like a small spelling mistake.) v7 also uses an updated JRE so maybe there is an incompatibility with the newer JRE?
__________________

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 12-20-2010, 04:09 PM
Ericvic Ericvic is offline
Sage User
 
Join Date: Apr 2005
Posts: 48
Quote:
Originally Posted by stuckless View Post
If you turn on debug logging, then the sagetv_0.txt file may contain some output (exceptions, etc). Also, if you are not using your own loggers, then you can output informatin to the sagetv_0.txt using System.out.println("You message"); from inside the java code.

You'll need to restart sagetv each time our rebuild your java classes.
I was hoping to be able to debug the class within eclipse but I guess I can get by with using System.out.println().
Reply With Quote
  #5  
Old 12-20-2010, 04:10 PM
Ericvic Ericvic is offline
Sage User
 
Join Date: Apr 2005
Posts: 48
Quote:
Originally Posted by tmiranda View Post
Dumb question, but did you update the STV properly? If the code worked under v6 it should work under v7. Maybe when you updated the v7 STV you did something slightly wrong (like a small spelling mistake.) v7 also uses an updated JRE so maybe there is an incompatibility with the newer JRE?
I did have some syntax errors in the STV at first but I think have have gotten all of them. It is probably something stupid I am missing, I will just have to dig harder.

Thanks for the info.

Eric
Reply With Quote
  #6  
Old 12-20-2010, 05:47 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by Ericvic View Post
I was hoping to be able to debug the class within eclipse but I guess I can get by with using System.out.println().
If you use my sagex-apis, which a wrapper for the SageTV apis, then you can run and debug the code from inside eclipse, which is how I develop. But, it might be faster, for now, to simply use system.out than to convert your class over to use my apis.
Reply With Quote
  #7  
Old 12-21-2010, 02:40 PM
Ericvic Ericvic is offline
Sage User
 
Join Date: Apr 2005
Posts: 48
I figured out my problem. I forgot to put quotes around the name of the context in my AddGlobalContext() command, now it is working correctly again.
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
How to: Access my java classes in Studio chrishallowell SageTV Studio 3 08-04-2010 11:12 PM
Question about using the properties class in java PLUCKYHD SageTV Studio 8 01-08-2010 12:13 PM
Help calling Java from Studio Tiki SageTV Studio 3 12-31-2008 12:51 PM
Calling custom java classes from studio davin SageTV Studio 9 11-09-2005 11:50 AM


All times are GMT -6. The time now is 01:46 PM.


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