English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Yes, big question, but I really am looking for the UNIX equivalent of a Windows JScript that does the following (for example only, I realized I can't call a Microsoft application on UNIX)....

var objwd=new ActiveXObject("word.application");
objwd.visible=false;
objwd.Documents.open("blah");

...

Again, obviously the example above is a Windows-application specific example only. What I'm looking to do is merely emulate a similar concept except using Java (or Perl would be fine too, but I have so little knowledge of either). I want to create an object reference to a particular UNIX-installed application and then manipulate the object with the permissible methods associated with that object. I'm fairly familiar with the way to do this in Windows Scripting, but am quite new to UNIX and am trying to learn the various analygous scripting methods there. Any help (especially code samples) would be much appreciated.

2007-06-13 06:05:11 · 2 answers · asked by hmmmmm 2 in Computers & Internet Programming & Design

My UNIX box is Sun Solaris.

2007-06-13 10:11:50 · update #1

2 answers

Well first off, you don't really have COM (you can get emulators) on UNIX systems so you need to work directly with the applications and their APIs to interact with them. If you are looking to do this from Java, you would create your application using the jar file containing APIs from the application you are trying to launch. You could also see if a command line version exist for simple things like trying to open an executable, like "/opt/myapp/app.exe somefile.txt".

For many of the scripting tasks, you can generally find good examples in /etc/rc2.d for starting up applications (similar to what Microsoft services does but without the complexity of actually registering a service...you can just create a startup script and place it in there with a start number for sequence). Of course if you are running a UNIX system like Solaris 10, you do get Service Management Framework (SMF) that offers the features of dependencies and parallel start. I'm not sure if any of the Linux distros have a similar capability or not.

** Edit **
Are you looking to do this for a particular application then? I have plenty of Solaris experience going from Sun OpenWindows 4.x and Solaris 2.5 through Solaris 10. For better or worse (depends who you ask), you won't find VBA like references available on Solaris.

2007-06-13 06:27:40 · answer #1 · answered by Jim Maryland 7 · 0 0

Java would nicely be utilized for both, yet is oftentimes for application Programming. For device element programming, you'll discover extra C because it would not have the OO overhead that you would discover in Java, C#, C++, or different OO programming languages. @? Romeo ? - Java isn't the slow/cumbersome language that you may want to keep in recommendations. perchance if the superb version you regarded at became from 2000, you've gotten a case, yet Java/JVM has made important advancements to shake that issue.

2016-10-18 21:17:16 · answer #2 · answered by ? 4 · 0 0

fedest.com, questions and answers