Problem executing command line program

Hi I have a tuxedo command line app in Solaris 2.6. I was able to execute the program from unix prompt however when I try to do it from JAVA program, it does not work.
I have to execute from command line as follows
$ud32<SPACE>-U<SPACE>login<nl>
SRVCNM<TAB>CB_EXESUB<nl>
CLFY_SUB<TAB>ExeternalMsg<nl>
EQUIP_ID<TAB>1<nl>
<nl>
during command line execution from second line on you will not get the prompt. After entering a balnk line the program will execute and provide the output.
I was aslo able to execute the program by putting the last 4 lines in a file(say test.bat) and executing by issuing following command at the unix prompt
$ud32 -U sa<test.bat
My java program as follows.
import java.io.*;
public class udexec {
public static void main(String args[]) {
try{
Runtime rt = Runtime.getRuntime();
System.out.println("Before");
Process prcs = rt.exec("ud32 -U sa");
System.out.println("After: " + prcs);
InputStreamReader isr = new InputStreamReader(prcs.getInputStream());
PrintWriter out = new PrintWriter(prcs.getOutputStream());
out.println("SRVCNM CB_EXESUB");
out.println("CLFY_SUB ExternalMsg");
out.println("EQUIPID 1");
out.println("");
int ret = isr.read();
String line;
System.out.println("Before Print");
System.out.println(ret);
catch (Exception e) { System.out.println(e); }
Any help will be greatly appreciated.
Thank You
Raju

Hmm, maybe you should also give additional Excape Characters to the Process (so adding \t where you have written <TAB>, or adding \r to the lines).

Similar Messages

  • Creating a command line program reading AEP/AEPX files?

    I'm new with After Effects SDK, and I wanted to know if it's possible to use SDK to implement a command line program that gets information such as duration and frame rate in AEP/AEPX files.
    aerender, a command line render program provided by After Effects, prints out these information before rendering. But it doesn't seem to be able to print out the information without doing rendering.
    I saw a related thread here: http://forums.adobe.com/thread/844341
    But what I want is simpler. I don't need to alter the AEP/AEPX files. I just want to obtain the information quickly from an AEP/AEPX file. Is it possible to write such a tool using SDK?
    Thanks!

    hi eliang.cs!
    yes, i'm the same guy who answered on the other thread.
    everything the API does, it does through AE as a plug-in.
    so if you have AE running (even just the renderer), your project loaded and your plug-in present, you can access all the data you described with no problem, and export it out in whatever way you want. (a plug-in is actually a DLL, so you can do anything you want, even on an OS level)
    you can access the data on all elements of the project including comps, layers, footage, render queue, ect...
    having said that, you can do all of this using a script instead of a plug-in.
    scripts are much easier to build.
    perhaps there's even a script out there that does what you're looking for, or something very close that could easily be adjusted.

  • XP to windows7: Executing command line: "bcdedit.exe". CreateProcess failed. Code(0x80070002)

    I m working to migrate from XP SP3 to Windows 7 using SCCM 2012 R2 CU4 but I have a boot error similar as above. Normally with CU4, XP will be supported by WInPE 5.1 (ADK 8.1). it's a refresh scenario, the task sequence was launched from XP. USMT will
    use a local store.
    The smsts log has a content as follow:
    [Successfully completed the action (Restart Computer in WinPE) with the exit win32 code 0]LOG]!><time="10:18:00.843+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740"
    file="instruction.cxx:830">
    <![LOG[Set authenticator in transport]LOG]!><time="10:18:00.859+240" date="02-26-2015" component="TSManager" context="" type="0" thread="1740" file="libsmsmessaging.cpp:7734">
    <![LOG[Set a global environment variable _SMSTSLastActionRetCode=0]LOG]!><time="10:18:01.156+240" date="02-26-2015" component="TSManager" context="" type="0" thread="1740" file="executionenv.cxx:668">
    <![LOG[Set a global environment variable _SMSTSLastActionSucceeded=true]LOG]!><time="10:18:01.156+240" date="02-26-2015" component="TSManager" context="" type="0" thread="1740" file="executionenv.cxx:668">
    <![LOG[Clear local default environment]LOG]!><time="10:18:01.156+240" date="02-26-2015" component="TSManager" context="" type="0" thread="1740" file="executionenv.cxx:807">
    <![LOG[Updated security on object C:\_SMSTaskSequence.]LOG]!><time="10:18:01.218+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="utils.cpp:1704">
    <![LOG[Set a global environment variable _SMSTSNextInstructionPointer=2]LOG]!><time="10:18:01.218+240" date="02-26-2015" component="TSManager" context="" type="0" thread="1740" file="executionenv.cxx:668">
    <![LOG[Set a TS execution environment variable _SMSTSNextInstructionPointer=2]LOG]!><time="10:18:01.218+240" date="02-26-2015" component="TSManager" context="" type="0" thread="1740" file="executionenv.cxx:386">
    <![LOG[Set a global environment variable _SMSTSInstructionStackString=0]LOG]!><time="10:18:01.218+240" date="02-26-2015" component="TSManager" context="" type="0" thread="1740" file="executionenv.cxx:668">
    <![LOG[Set a TS execution environment variable _SMSTSInstructionStackString=0]LOG]!><time="10:18:01.218+240" date="02-26-2015" component="TSManager" context="" type="0" thread="1740" file="executionenv.cxx:414">
    <![LOG[Save the current environment block]LOG]!><time="10:18:01.218+240" date="02-26-2015" component="TSManager" context="" type="0" thread="1740" file="executionenv.cxx:833">
    <![LOG[Executing command line: "bcdedit.exe"]LOG]!><time="10:18:01.234+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="commandline.cpp:827">
    <![LOG[CreateProcess failed. Code(0x80070002)]LOG]!><time="10:18:01.234+240" date="02-26-2015" component="TSManager" context="" type="3"
    thread="1740" file="commandline.cpp:1018">
    <![LOG[Command line execution failed (80070002)]LOG]!><time="10:18:01.234+240" date="02-26-2015" component="TSManager" context="" type="3" thread="1740" file="commandline.cpp:1245">
    <![LOG[Staging boot image P0100002]LOG]!><time="10:18:01.250+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="bootimage.cpp:717">
    <![LOG[ResolveSource flags: 0x00000000]LOG]!><time="10:18:01.500+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="resolvesource.cpp:3201">
    <![LOG[SMSTSPersistContent: . The content for package PO100002 will be persisted]LOG]!><time="10:18:01.500+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740"
    file="resolvesource.cpp:3212">
    <![LOG[Locations: Multicast = 0, HTTP = 1, SMB = 0.]LOG]!><time="10:18:01.500+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="resolvesource.cpp:2749">
    <![LOG[Multicast is not enabled for the package.]LOG]!><time="10:18:01.500+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="resolvesource.cpp:2789">
    <![LOG[Trying
    http://sccmsrv.contoso.com:80/SMS_DP_SMSPKG$/P0100002/sccm?/boot.PO100002.wim to C:\_SMSTaskSequence\Packages\PO100002\boot.PO100002.wim ]LOG]!><time="10:18:18.265+240" date="02-26-2015" component="TSManager" context=""
    type="1" thread="1740" file="downloadcontent.cpp:1592">
    <![LOG[VerifyContentHash: Hash algorithm is 32780]LOG]!><time="10:18:18.265+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="downloadcontent.cpp:1870">
    <![LOG[Found boot image C:\_SMSTaskSequence\Packages\PO100002\boot.PO100002.wim]LOG]!><time="10:18:22.156+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740"
    file="bootimage.cpp:1115">
    <![LOG[Copying boot image locally...]LOG]!><time="10:18:22.156+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="bootimage.cpp:745">
    <![LOG[ADK installation root registry value not found.]LOG]!><time="10:18:30.125+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="wimfile.cpp:207">
    <![LOG[Loaded C:\Program Files\Windows Imaging\wimgapi.dll]LOG]!><time="10:18:30.171+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="wimfile.cpp:344">
    <![LOG[Opening image file C:\_SMSTaskSequence\WinPE\sources\boot.wim]LOG]!><time="10:18:30.171+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="wimfile.cpp:422">
    <![LOG[Applying image 1 to volume C:\_SMSTaskSequence\WinPE]LOG]!><time="10:18:30.296+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="wimfile.cpp:613">
    <![LOG[Closing image file C:\_SMSTaskSequence\WinPE\sources\boot.wim]LOG]!><time="10:18:32.906+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="wimfile.cpp:458">
    <![LOG[Capturing WinPE bootstrap settings]LOG]!><time="10:18:32.921+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="winpesettings.cpp:80">
    <![LOG[Environment scope successfully created: Global\{E7E5BB69-6198-4555-B5CA-6C46A2B5EB78}]LOG]!><time="10:18:32.921+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740"
    file="environmentscope.cpp:623">
    <![LOG[Executing command line: "osdnetsettings.exe" capture adapters:true scope:Global\{E7E5BB69-6198-4555-B5CA-6C46A2B5EB78}]LOG]!><time="10:18:32.921+240" date="02-26-2015" component="TSManager" context=""
    type="1" thread="1740" file="commandline.cpp:827">
    <![LOG[==============================[ OSDNetSettings.exe ]===========================]LOG]!><time="10:18:33.343+240" date="02-26-2015" component="OSDNetSettings" context="" type="1" thread="3644"
    file="main.cpp:134">
    <![LOG[Command line: "osdnetsettings.exe" capture adapters:true scope:Global\{E7E5BB69-6198-4555-B5CA-6C46A2B5EB78}]LOG]!><time="10:18:33.343+240" date="02-26-2015" component="OSDNetSettings" context=""
    type="1" thread="3644" file="main.cpp:135">
    <![LOG[No adapters found with non-empty DNSDomainSuffixSearchOrder]LOG]!><time="10:18:33.484+240" date="02-26-2015" component="OSDNetSettings" context="" type="0" thread="3644" file="netwmiadapterconfig.cpp:408">
    <![LOG[Captured settings for adapter 1]LOG]!><time="10:18:34.875+240" date="02-26-2015" component="OSDNetSettings" context="" type="1" thread="3644" file="netsettings.cpp:99">
    <![LOG[OSDNetSettings finished: 0x00000000]LOG]!><time="10:18:34.875+240" date="02-26-2015" component="OSDNetSettings" context="" type="1" thread="3644" file="main.cpp:192">
    <![LOG[Process completed with exit code 0]LOG]!><time="10:18:34.875+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="commandline.cpp:1123">
    <![LOG[Installing boot image to hard drive]LOG]!><time="10:18:34.906+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="bootimage.cpp:622">
    <![LOG[Backing up existing boot system before trying to set up new boot system]LOG]!><time="10:18:34.906+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740"
    file="bootimage.cpp:645">
    <![LOG[BootLoader::backup: C:\, C:\_SMSTaskSequence\backup]LOG]!><time="10:18:35.109+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="bootloader.cpp:85">
    <![LOG[BootLoader::restore: C:\_SMSTaskSequence\WinPE, C:\]LOG]!><time="10:18:41.187+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="bootloader.cpp:382">
    <![LOG[Saving bcd store to C:\_SMSTaskSequence\WinPE\boot\BCD]LOG]!><time="10:18:41.734+240" date="02-26-2015" component="TSManager" context="" type="1" thread="1740" file="bootconfigimplbcd.cpp:703">
    <![LOG[Executing command line: "C:\_SMSTaskSequence\WinPE\windows\system32\bootsect.exe" /NT60 SYS /MBR]LOG]!><time="10:18:42.500+240" date="02-26-2015" component="TSManager" context="" type="1"
    thread="1740" file="commandline.cpp:827">
    <![LOG[CreateProcess failed. Code(0x800700C1)]LOG]!><time="10:18:42.500+240" date="02-26-2015" component="TSManager" context="" type="3" thread="1740" file="commandline.cpp:1018">
    <![LOG[Command line execution failed (800700C1)]LOG]!><time="10:18:42.500+240" date="02-26-2015" component="TSManager" context="" type="3" thread="1740" file="commandline.cpp:1245">
    <![LOG[Failed to install boot image.
    Unknown error (Error: 800700C1; Source: Unknown)]LOG]!><time="10:18:42.515+240" date="02-26-2015" component="TSManager" context="" type="3" thread="1740" file="bootimage.cpp:682">
    <![LOG[Failed to install boot image PO100002.
    Unknown error (Error: 800700C1; Source: Unknown)]LOG]!><time="10:18:42.515+240" date="02-26-2015" component="TSManager" context="" type="3" thread="1740" file="engine.cxx:840">
    <![LOG[Failed to reboot the system. Error 0x(800700c1)]LOG]!><time="10:18:42.515+240" date="02-26-2015" component="TSManager" context="" type="3" thread="1740" file="engine.cxx:953">
    <![LOG[Failed to initialize a system reboot.
    Unknown error (Error: 800700C1; Source: Unknown)]LOG]!><time="10:18:42.515+240" date="02-26-2015" component="TSManager" context="" type="3" thread="1740" file="engine.cxx:577">
    <![LOG[Fatal error is returned in check for reboot request of the action (Restart Computer in WinPE).
    Unknown error (Error: 800700C1; Source: Unknown)]LOG]!><time="10:18:42.515+240" date="02-26-2015" component="TSManager" context="" type="3" thread="1740" file="engine.cxx:273">
    <![LOG[An error (0x800700c1) is encountered in execution of the task sequence]LOG]!><time="10:18:42.515+240" date="02-26-2015" component="TSManager" context="" type="3" thread="1740" file="engine.cxx:348">
    Thank
    Lourh

    I'm not entirely sure if this was fixed in the newer CUs, but have you seen this thread?
    https://social.technet.microsoft.com/Forums/en-US/041975df-a8a8-48cb-8d9f-0446c35210fe/sccm-2012-r2-boot-image-wont-load-in-windows-xp?forum=configmanagerosd
    It offers a couple of alternatives too (i.e., http://davejaskie.com/2014/04/03/installing-a-legacy-boot-image-in-sccm-to-support-xp-migrations/)
    Fausto

  • Is there a command line program that converts WAV to SWF?

    Is there a command line program that converts WAV to SWF?
    thanks

    why you want to do that? you can import your wav into the
    swf!

  • Cope: a command-line program colouriser

    cope is a wrapper around various command-line programs that takes their output and adds colours - a sort of ornamental cope, if you will.
    It's written in Perl, and requires version >= 5.10, so installation may be a bit complicated if you have to track down the dependencies. It installs several scripts in a directory, each one calling the program it's named after, only highlighting its output using regexes. Then you add this directory to your $PATH, and everything should (hopefully!) be seamless.
    Currently it's in release candidate status - I've been using it personally for a few weeks and nothing catastrophic has happened so far, so there's little point me keeping it private.
    Screenshots:
    Main site: http://stuff.cytzol.org/cope/
    GitHub: http://github.com/cytzol/cope

    PKGBUILD
    # Contributor: denton <e9203.00 gmail com>
    pkgname=cope-git
    pkgver=20091208
    pkgrel=1
    pkgdesc='A colourful wrapper for terminal programs'
    arch=(any)
    url=http://stuff.cytzol.org/cope/
    license=('GPL' 'PerlArtistic')
    depends=("perl>=5.10")
    makedepends=(git)
    provides=(cope)
    conflicts=(cope)
    install=$pkgname.install
    _gitroot=git://github.com/cytzol/cope.git
    _gitname=cope
    build() {
    cd $srcdir
    # Git
    msg 'Connecting to Git server...'
    if [ -d $_gitname ] ; then
    cd $_gitname && git pull origin || return 1
    msg 'The local files are updated.'
    else
    git clone $_gitroot || return 1
    fi
    msg 'Git checkout done or server timeout.'
    msg 'Starting make...'
    rm -rf $srcdir/$_gitname-build
    git clone $srcdir/$_gitname $srcdir/$_gitname-build || return 1
    cd $srcdir/$_gitname-build
    # Build
    PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
    make || return 1
    make install DESTDIR=$pkgdir || return 1
    # Remove perllocal.pod and .packlist
    find $pkgdir -name perllocal.pod -delete
    find $pkgdir -name .packlist -delete
    cope-git.install
    post_install() {
    echo 'Prepend /usr/share/perl5/vendor_perl/auto/share/dist/Cope/ to $PATH'
    post_upgrade() {
    post_install
    First time making a perl package. It puts files that shouldn't be in */site:
    /usr/bin/perlbin/site/envpath
    /usr/lib/perl5/site_perl/5.10.1/IO/Pty.pm
    /usr/lib/perl5/site_perl/5.10.1/IO/Tty.pm
    /usr/lib/perl5/site_perl/5.10.1/IO/Tty/
    /usr/lib/perl5/site_perl/5.10.1/IO/Tty/Constant.pm
    /usr/lib/perl5/site_perl/5.10.1/List/MoreUtils.pm
    /usr/lib/perl5/site_perl/5.10.1/Params/Util.pm
    /usr/lib/perl5/site_perl/5.10.1/auto/IO/Tty/Tty.bs
    /usr/lib/perl5/site_perl/5.10.1/auto/IO/Tty/Tty.so
    /usr/lib/perl5/site_perl/5.10.1/auto/List/MoreUtils/MoreUtils.bs
    /usr/lib/perl5/site_perl/5.10.1/auto/List/MoreUtils/MoreUtils.so
    /usr/lib/perl5/site_perl/5.10.1/auto/Params/Util/Util.bs
    /usr/lib/perl5/site_perl/5.10.1/auto/Params/Util/Util.so
    /usr/share/perl5/site_perl/5.10.1/Class/Inspector.pm
    /usr/share/perl5/site_perl/5.10.1/Class/Inspector/
    /usr/share/perl5/site_perl/5.10.1/Class/Inspector/Functions.pm
    /usr/share/perl5/site_perl/5.10.1/Env/Path.pm
    /usr/share/perl5/site_perl/5.10.1/IO/Stty.pm
    /usr/share/perl5/site_perl/5.10.1/IO/stty.pl
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/CC.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/SEN.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI/RFC1035.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI/RFC1738.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI/RFC1808.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI/RFC2384.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI/RFC2396.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI/RFC2806.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI/fax.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI/file.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI/ftp.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI/gopher.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI/http.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI/news.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI/pop.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI/prospero.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI/tel.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI/telnet.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI/tv.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/URI/wais.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/_support.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/balanced.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/comment.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/delimited.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/lingua.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/list.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/net.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/number.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/profanity.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/whitespace.pm
    /usr/share/perl5/site_perl/5.10.1/Regexp/Common/zip.pm
    And as shown by the previous list, I haven't fetched these binaries (are they in the repos?):
    Env::Path
    File::ShareDir
    IO::Handle
    IO::Pty
    IO::Stty
    List::MoreUtils
    Regexp::Common
    Term::ANSIColor
    Everything works, except cope_path.pl.
    Last edited by denton (2009-12-08 09:14:37)

  • Fast command-line program which displays connectivity

    Hi
    I'm looking for a command-line program which can show whether or not my network interface has an IP address or not. It could use "ifconfig" to extract the information, I don't really care, but it has to be *fast* and it cannot require root access.
    Thanks

    Thanks, but if someone knows some sed/awk magic to get only the interface's IP address, that would be great!
    EDIT:
    Using the little "sed" I know, this is what I came up with:
    ifconfig wlan0 | grep -w inet | sed "s/^\\s*//" | sed "s/^inet addr://" | sed "s/\\s.*//"
    EDIT2:
    Now I have this reasonable command:
    ifconfig wlan0 | grep -w inet | sed "s/.*inet addr:\([^ ]*\).*.*/\1/"
    Last edited by skorpan (2009-06-07 16:44:19)

  • Execute command lines from Xcelsius 2008

    Hello,
    Is there any possible way to execute command lines from Xcelsius 2008 swf?
    Thank you.

    Hi,
    You cannot call out to command-line from a Flash SWF, it is sandboxed so does not know how to do any of that.
    One (complicated) option would be to write your own app to embed the SWF into, a real app can then call out to do whatever you want, then you just have to get the SWF to communicate with your app using External Interface, it would be a lot of work.
    Regards
    Matt

  • Tagging command line programs in subtle?

    I'd like to be able to tag command line programs so I can assign them to specific views and gravities within those views.
    For example, I'd like to be able to have 'gclacli calm' be recognized by a tag so it appears in my 'agenda' view and assign it a gravity. Is there a way to do this? Right now the best I can do is limit xterm to different views but they still move around when I change  views.
    Last edited by tinySpark (2012-06-14 18:04:12)

    None of these options have worked.
    for the user variables, i just create a new one called "Path" and type in my path to java \bin right?
    This is quite frustrating. Thanks for the help though!
    --Brenton                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Uninstalling Command Line Programs

    I've searched these forums and the internet for an answer to this, but there doesn't seem to be anything out there, so I hope this will be helpful to others as well.
    I have some open source command line programs that I downloaded, compiled, and installed as part of some exercises I was doing in a book on open source GIS (geographic information systems). What I want to know is how do I remove those programs? I can find references for compiling and installing these types of programs all over the internet, but nothing about removing or uninstalling them.
    Also, any ideas for good, up-to-date references on learning Unix in Mac OS X would be appreciated too. I'd like to get more into open source GIS, but from the research I've been doing, knowing Unix would help a lot.

    What process did you use to compile and install? Was it a configure, make, make install sequence, which is fairly common? If so, go back to the directory where you did that, and try, for example, 'make uninstall'. This might work.
    Look for output files from the compile and install process (perhaps config.log) that might tell you where files will be installed. Perhaps in /usr/local?
    Is there a README or INSTALL file that came with the source code? Documentation about what was installed where might be there.
    If worst comes to worst, and you're really determined, you could repeat the compile and install steps, but with a before and after listing of all the files in your system, and compare the listings. Or use the find command immediately after the reinstall, looking for recently created or changed files (the 'mtime' option or similar).

  • Command line program execution problem.

    Hey there, I'm about to complete my Java thesis project, but I can't fix a problem: i have to find a command line programme (which is in python but i think its not a big deal) through a java programme. Getting some information around I ended up i could execute the program with the command:
    Process proc = Runtime.getRuntime().exec("...");
    and create the streams:
    OutputStream out = proc.getOutputS 14.49
    InputStream in = proc.getInputStream();
    the problem is that calling a programme which prints on screen something and then it ends (ex. ipconfig) the following sequence works out:
    do
    int i=in.read();
    if(i==-1) break;
    System.out.print((char)i);
    }while(true);
    instead in the specific case of the programme that i need to execute it canno't work because this programme after its opening prints a couple of lines, at this stage you need to type the input in and when the eof font is sent the output is printed. i've tried to send the input thru OutputStream but the execution gets stuck when it reads the output (in.read());
    Can you guys help me out? What do i need to do? Please it's very important, let me know ASAP.
    Thanks very much,
    Fabio

    I would not recommend the use of raw "InputStream" for much of anything.
    Try Scanner if you can use JDK5, if not, try BufferedReader.
    Scanner:
    Process proc = Runtime.getRuntime().exec("...");
    BufferedOutputStream out = new BufferedOutputStream(proc.getOutputStream());
    Scanner in = new Scanner(proc.getInputStream());
    while(in.hasNextLine()) {
         String s = in.nextLine();
         System.out.println(s);
    }BufferedReader:
    Process proc = Runtime.getRuntime().exec("...");
    BufferedOutputStream out = new BufferedOutputStream(proc.getOutputStream());
    BufferedReader in = new BufferedReader(new InputStreamReader(proc.getInputStream()));
    String l = " ";
    while(l != null) {
         l = r.nextLine();
         System.out.println(s);
    }

  • Problem in Executing Command Line

    Hello all,
       I am trying to execute the Perforce command lines through LabVIEW System Exec. These commands are working propery when directly entered in the command prompt, but through LabVIEW it is not working properly.
    "P4 client -i  <E:\template.txt"
    This command will read the file and create a client. Whenever we are doing this kind of  file operation (reading or writing), the command through LabVIEW is not working and the System Exec VI is giving the Standartd error output as  " Usage: client -i [ -f ] Unexpected arguments", but working perfectly in the comand prompt,

    hi cranen,
      use "cmd/c P4 client -i  <E:\template.txt" as command line input to the system exec.vi.
    Thanks and regards,
    srikrishnaNF

  • Java command line programming in windows

    Here's what I want to do:
    -write .java files in a text editor
    -compile and run them from a command line, rather than using a
    compiler like codewarrior or MS J++
    Here's my problem:
    In a program that produces output, I can't seem to find a way to
    retain the output that goes off the screen in a DOS window. Is there
    a way to enable scrolling in a DOS window, or are there any
    alternative command line terminals for Windows? Any suggestions
    would be greatly appreciated.

    I think you can increase the Screen Buffer size which should give you a scroll bar. For this right click on the icon on the top left of the DOS window -select Properties - Go to Layout tab.
    Another option will be to redirect the output to a file
    java SomeClass > log.txt
    Hope this helps.

  • How to make system call to execute command line in JAVA?

    Hi,
    I am new in JAVA. How to make system call to execute the following command line in JAVA in LINUX environment.
    rpm -qa jdkIn C programming, use as such:
    system ("rpm -qa jdk");
    How about JAVA?
    Thanks.

    Runtime.getRuntime().exec. But first read this:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • How to execute command line by Java

    Hi all,
    I have the following DOS command line that I need to execute it through Java:
    C:\Documents and Settings\Mxmler\Desktop\bin>vr1tovr2 Box.wrl -o Box2.wrl
    I know that I have to use Runtime.getRuntime().exec, But can anyone show me how to use it for the above?
    Thanks

    Mxmler wrote:
    I need your help please
    Forget about the first thread
    vr1tovr2 located inside a sub directory called converted (not in the main directory of the project constructed by eclipse)You have to tell the system where to find the program you're trying to run. You can specify the full path to the executable. Alternatively, you can specify the PATH environment variable when you call exec() (and I presume there's something similar for java.lang.ProcessBuilder). Read the docs.
    Box.wrl & Box2.wrl (will be generated) both of them are located in another directory called usrYou can either specify full paths to those files, or you can set the current working directory when you call exec(). So you'd tell exec() that you're in the directory where those files are. Read the docs.
    I have tried to do the following and I got the following error message: CreateProcess error=2, The system cannot find the file specifiedYou need to do what I said above, in particular, the first one (where you tell the system where to find the program you're trying to run).
    String path = System.getProperty("user.dir");
    String userFolder = "usr";
    String fileName = "mxmler";
    String extension = ".wrl";
    Runtime.getRuntime().exec("vr1tovr2 "
                + Key.QUOTE
                + path
                + Key.FORWARD_SLASH
                + userFolder
                + Key.FORWARD_SLASH
                + fileName + extension
                + Key.QUOTE
                + " -o "
                + Key.QUOTE
                + path
                + Key.FORWARD_SLASH
                + userFolder
                + Key.FORWARD_SLASH
                + fileName + "v2" + extension
                + Key.QUOTE);If you're going to break it down like that, then don't use the version of exec() that takes a single String for the whole command line. Use the version of exec() that takes an array of Strings (the first String in the array is the program to run, and the remaining strings in the array are arguments to that program).

  • Permission problems with command line CVS and Java CVS App

    Greetings,
    I'm part of a moderately sized website development team which recently upgraded to MacBook Pros (dual core) running OS 10.4.9. One of the primary tools we use in our day to day work is the open source concurrent versioning system (CVS). We've noticed a distressing issue running CVS on our macbook pros: there seems to be a problem with the way these new machines handle permissions on the directories/files that CVS uses to manage files.
    The error occurs when the CVS application, in this case both command line CVS and GUI CVS application named SmartCVS, tries to rename a temporary file named Entries~ to its new name Entries (no ~). It looks like this:
    java.io.IOException: Could not rename file
    /Users/[USER]/Sites/[MODULE]/lib/CVS/Entries~ to
    /Users/[USER]/Sites/[MODULE]/lib/CVS/Entries
    at smartcvs.JP.a(SourceFile:125)
    at smartcvs.JP.a(SourceFile:113)
    We've noticed that if we open up a get info window on the directory we're downloading, and choose "Apply to enclosed items" right when we start the download process, the issue will be resolved, presumably because the permissions are being set on the subdirectories as the download is taking place.
    We've checked the permissions on the overall ~/Sites/ directory numerous times, and they always seem to be set correctly as drwxr-xr-x. It's within this folder that CVS creates a directory with the CVS module name and downloads all the contained files, so we don't see why it would be having issues completing this successfully. We also checked to ensure the GUI CVS application is running under the current user on the machine: it does.
    Has anyone run into issues like this in the past? Is there more information I could provide to further clarify the problem we're having?
    Thanks for any input you have!

    Thanks for asking Jeff, yes one place we are seeing this error is Java application SmartCVS, though the results posted here are from a normal command line CVS checkout.
    ===
    Checkout command:
    cvs co [MODULE]
    ===
    Error:
    cvs [checkout aborted]: cannot rename file CVS/Entries.Backup to CVS/Entries: No such file or directory
    ===
    ID:
    uid=502([USER]) gid=502([USER]) groups=502([USER]), 81(appserveradm), 79(appserverusr), 80(admin)
    ===
    LS -ALN
    Computer:~/Sites [USER]$ ls -aln
    drwxr-xr-x 28 502 502 952 Jun 4 13:11 Sites
    Computer:~/Sites/[MODULE] [USER]$ ls -aln
    drwxr-xr-x 38 502 502 1292 Jun 4 13:33 www_root
    Computer:~/Sites/[MODULE]/www_root [USER]$ ls -aln
    drwxr-xr-x 32 502 502 1088 Jun 4 13:33 [SUBDIR1]
    Computer:~/Sites/[MODULE]/www_root/[SUBDIR1] [USER]$ ls -aln
    drwxr-xr-x 5 502 502 170 Jun 4 13:33 [SUBDIR2]
    Computer:~/Sites/[MODULE]/www_root/[SUBDIR1]/[SUBDIR2] [USER]$ ls -aln
    drwxr-xr-x 4 502 502 136 Jun 4 13:33 [SUBDIR3]
    Computer:~/Sites/[MODULE]/www_root/[SUBDIR1]/[SUBDIR2]/[SUBDIR3] [USER]$ ls -aln
    drwxr-xr-x 6 502 502 204 Jun 4 13:33 CVS
    Computer:~/Sites/[MODULE]/www_root/[SUBDIR1]/[SUBDIR2]/[SUBDIR3]/CVS [USER]$ ls -aln
    total 32
    drwxr-xr-x 6 502 502 204 Jun 4 13:33 .
    drwxr-xr-x 4 502 502 136 Jun 4 13:33 ..
    -rw-r--r-- 1 502 502 45 Jun 4 13:33 Entries
    -rw-r--r-- 1 502 502 45 Jun 4 13:33 Entries.Log
    -rw-r--r-- 1 502 502 48 Jun 4 13:33 Repository
    -rw-r--r-- 1 502 502 63 Jun 4 13:33 Root
    MacBook Pro / MacPro Mac OS X (10.4.9)

Maybe you are looking for

  • Data Reconciliation between BI and R/3 systems

    Hi Gurus, I want to know how to reconciliation the data between BI and R/3 systems. is there any easy mentods to reconcile the data.i have also gone through the HOW TO GUIDE document, that document dosen't help me out. Regards Sreenivas.Y

  • End of file reached when saving?

    Hello, I have 3 short movies (around one minute each) that I want to append using QuickTime (I do that all the time, and these 3 movies are taken from the same source than the other usually used). So, I copy and paste all of them in a new movie and t

  • Unable to Run a .jar file in pjava

    I have installed pjava (for StrongArm) on to my iPAQ Pocket PC H3660. Then I created a simple application using JBuilder and created a *.jar file of the classes. I have used the awt classes to build the interface. I am using JDK version 1.3.0. When I

  • How to disable keyboard strokes

    Hey..........can anyone help me!!!How does one disable the keyboard input....i.e,if i have a textfield and i want to give input through another panel or frame containing buttons, and disable the input through keyboard.....Any 1 ?????plz..

  • HT201210 My i pod 4th gen is disabled.  It says to connect to i tunes.  I did and it still says it.  What do I do?

    My 4th gen pod is disabled.  It says to connect with I tunes.  I did and it still says the same thing on the screen.  What do I do?