Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

java - Is there any remotely cross platform way to execute an external process? -


i looking advice on how execute process cross platform.

i have written java , ruby implementations of app, less of language specific problem , more of platform specific issue.

e.g on ubuntu /usr/bin/ searched do

# ruby  `handbrakecli #{args}` # works on ubuntu , other linux distros since handbrakecli in /usr/bin/ 

for windows search current directory running in. however, if copy windows executable current directory runtime linking error cause crash (dll not present)

the default install path handbrakecli in "program files(x86)/handbrake" (x86 in 64 bit obviously), program files isn't in search path far can tell.

for macosx have no clue how execute mac "application folders" command line other "open" command. less of issue since after handbrakecli normal executable. handbrakecli not installed /usr/bin or /usr/local/bin ( or variation there of )

my best idea make config file has path handbrakecli. if go route ideal able detect platform on, problem together. 1 have done c #ifdef sections , not in ruby or java.

i appreciate , input.

you can current os in java using

system.getproperty("os.name") 

in ruby:

require 'rbconfig' puts config::config['host_os']  

hope helps :)


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -