![]() |
|
|||||||
| SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Run class files as executables
For those creating java addons for Sage that are executed outside of the Sage...I created a program that will allow you to give your class file an executable to run from. I am using this for my ffmpeg_pickup program I wrote for MlbDude's new STV.
There are two peices to the package, an EXE and its properties file. I say "an EXE" because you can rename the executable I give you to anything you want. The properties file has to match up with the executable's name. For example if I have test.exe then the properties file is test.properties. The properties file Here is a sample props file: -------------------------------------------------------------------------------- Java_Executable_Path=c:\jdk1.4.2\bin\java.exe Class_path_to_use=. Class_to_run=ffmpegPickup Args_if_any= Java_run_minimized_no_focus=true Extern_run_minimized_no_focus=true --------------------------------------------------------------------------------- The first line would have to be configured by each user, it isn't smart enough (YET) to go out and figure out where java is located on the machine. If there is interest in this (figuring out the java location), I can pursue that option. The other 3 lines, for the most part I envision the author configuring. If you leave class_path_to_use blank, it will default to ".". This is to compensate for the issues some people have with running the java modules. Usage There are two ways to run this program, with and without parameters. Without parameters, the program will execute the data in the properties file. With parameters, the program will attempt to execute the parameters, word for word. In both cases, in your task manager, this program will remain until the calling process has finished. This way if you're using it from your java program, like I am...you can use the .waitFor() method of the Process class if you desire. [Java_run_minimized_no_focus/Extern_run_minimized_no_focus] This parameters gives you the ability to run the calling processes minimized without focus. ---------------------------------------------------------------- If there are any questions....just let me know. I wrote this for my ffmpeg_pickup program but tried to make it reusable so that hopefully if anyone has a need for it, they can use it. Alex
__________________
ECS K7VTA3 + AthlonXP2400XP+ = $70 250 GB 7200 RPM HD = $160 512 MB Kingston DDR 333 = $80 Hauppage 350 Bundle = $220 SageTv = PriceLess Last edited by Alex0230; 07-13-2004 at 03:56 PM. |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|