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 09-03-2009, 12:04 PM
cracklepopflash cracklepopflash is offline
Sage User
 
Join Date: Aug 2009
Location: Sunnyvale
Posts: 26
Question about JNI and Java and C

So we can use JNI to allow the Java code to call C code. But I am wondering if there's a way to do the opposite. Like when an event on the C side happens, it can call the appropriate Java method. How would I do that in general?
Reply With Quote
  #2  
Old 09-03-2009, 12:54 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
What kind of C events are we talking about? If it's COM, there are ways of wrapping COM objects for use with Java.

You can also call Java methods directly from native code. I haven't done it myself, but I found this documentation:

http://java.sun.com/docs/books/jni/h...eth.html#26010

That said, I think you're probably better off doing as much of your coding as possible in Java, and using JNI only for the lowest-level OS-dependent stuff that can't be done any other way. If you're fluent in C, Java is not that steep a learning curve.
__________________
-- Greg
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 question joey3002 SageTV Software 0 01-10-2009 07:47 PM
Tables, Java - Java Not being Called for each TableComponent Cell stuckless SageTV Studio 3 04-02-2008 03:03 PM
Java question matrix35 General Discussion 0 12-04-2006 04:12 PM
Java Question for STV Developers mightyt SageTV Customizations 10 09-29-2004 07:35 AM
Beta V1.2.2 Java java.lang Null Pointer Exception hamptonhills SageTV Beta Test Software 1 03-27-2003 12:11 PM


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


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