System.out  View Console via Unix box/ Command Line

I am dumping messages to System.out. When I package it and run it as a service, I can drop this to an out file. When I just run the jar file from the windows command line or from a Unix box it runs silently. Is there a way to have the System.out dropped to a file in this scenario or better yet shown on screen?
Once I run the jar file how do I kill it without killing the process?
Thanks

Fanbladeus02 wrote:
"Killing a jar file..." I don't want to kill the Jar file itself, but I do want to stop it from running after I launch it.Then you mean you want to kill the process which is using the jar file.
>
Example from my unix prompt I do something like this:
java -jar -classpath </home/user/jarprog/> /home/user/jarprog/JARPROG.jar jarprog.Main.java
I don't see any output, it just drops to the next open prompt. This means the program has finished. It could have started another one which does the real work, but you have no control over it.
I assume java is still running my jar file somewhere. (My first thought was) That is very unlikely unless the writers of the code have gone to great lengths to hide another running process from you. (But reading further this appears to be the case)
How do I stop it? Find the process with "ps" and send it a kill signal.
Once I start the program how do I interact with it to stop it?ctrl-C, but you cannot kill it after the prompt has returned because its not running any more. (it started another process and then bailed)
Similiarly in Windows, I run it from the command line it drops to the next "c:\". I look in task manager and see java running. It appears your program starts another java process in the background.
I look in the database that it is updating and the records are flying in. If I end the process, the records stop flying in (DUH). Again how do I interact with it to gracefully end the process?It appears that whoever wrote the program has gone to some lengths to prevent you from doing that. I would ask them.

Similar Messages

  • Deployment unsuccessful via UNIX box but Successful from windows

    Hi,
    I am able to deploy my ADF application on remote server by my ANT SCRIPT.
    But when I am trying to deploy my application through UNIX box, Its successfully making EAR File but that EAR file is smaller(in term of size) , which I am getting from Windows deployment from similar script. It not adding bc4j.xcfg file of AM and adfm.xml file also in EAR. If I am deploying this same EAR file from script on unix then its successfully deploying and when I am going to my application its showing blank page insist of contains.
    I am using same script for deployment on unix box also which I am using on Windows.
    Can anyone suggest me where I am lacking or something which I need to take care on Unix.
    Thanks in Advance
    Ramit Mathur

    Looks like your ant script is buggy...
    If your ant script does not produce the same EAR (I only mean the content, not the size) there must be something wrong either with your installation on the UNIX box or your ant script.
    If you know which files are missing thats the point to look at. As you wrote the script it should not be difficult to find the part of hte script which should copy the missing files into the resulting EAR file. May be you have a wrong path (windows like drive letters or '\' instead of '/') in your script.
    Timo

  • How to view an applications actions in command line?

    I have a series of highly repetitive tasks that require a tremendous number of button / menu clicks that I've been trying to automate. I have successfully automated the process with Automator using bash mouse clicks x,y coordinates. However, because this is method requires pixel coordinates it only works on one of my machines because the others do not have the same display size. As such this solution is lacking.
    What i'm looking for (and struggling to find) is means of viewing any running application's action as an equivalent text command. This is a built in functionality in most 3D modeling programs like Maya, Blender, etc. (which is where I first started using this method of automating tedious processes). Having the ability to view any button click or menu selection as a text based command, makes sorting out the proper syntax to create a proper script infinity easier.
    As an example, I want to be shown something like:
    tell application "Finder" to launch "Safari"      When clicking on the safari dock icon
    tell application "Safari" to open location "http://www.google.com/"     When typing in the URL and pressing enter
    tell application "System Events" to keystroke "apple support"    When typing the text string into google's search bar
    Though the above example is applescript, I'll take any language if it gets me heading int he right direction.  :-)
    Side note though Automator's 'watch me' do is great for simple tasks, I found it to be unreliable given the number of steps I have to deal with. 

    You might check with your apps' developers to see if they support AppleScript, Automator, or other scripting languages that might be used for this. Some programs have built-in macro and scripting options that can be set up in a built-in editor or run in a built-in command-line environment of sorts, while others supply libraries for external scripting with AppleScript and others.
    As for live tracing of a program's commands, most that you use will be coded in a low level language like C, C++, Java, or Objective-C, which are compiled and run in binary machine code as opposed to an interpreted language (one that does not need compiling to run), as is the case with most scripting languages (shell scripts, AppleScript, Matlab, etc.).
    For the most part, the only options you have for "tracing" a program's functions are to monitor output that it might log to the console. You can see this by opening the console, but the output here is diagnostic in nature and is programmatically limited to what the programmers have intended be output (ie, things like warnings and errors, as opposed to every action the program is taking). You can also use the Terminal to directly launch a program's executable so it is hosted in the Terminal shell. This will give you direct access to all of the program's output, as opposed to that only intended for logging in the Console, but it is still not the same as a full output of the commands and routines the program is performing.
    Some of Apple's developer tools can allow you to better monitor a program's functions, but these are intended for developers, and have some requirements, and will not allow you to use any results for productivity automation.

  • Enable AFP File Sharing via ARD through command line?

    Anyone know how to enable AFP file sharing on a remote Leopard client using ARD? I had been sending Unix Commands to do most of my changes, but cannot figure out how to enable AFP file sharing through a unix command. I've tried running /usr/sbin/AppleFileServer but that doesn't seem to do the trick. Any ideas?

    Howdy, Space Ranger!
    I'd recommend checking out the following documentation to get filesharing going without interrupting a current user.
    Apple Remote Desktop Administrator’s Guide
    http://images.apple.com/remotedesktop/pdf/ARD3_AdminGuide.pdf
    Page 145:
    Executing a Single UNIX Command
    Using the UNIX Command window, you can send a single command to the selected
    client computers. The command is executed using the bash shell.
    To execute a single UNIX command:
    1 Select a computer list in the Remote Desktop window.
    2 Select one or more computers in the selected computer list.
    3 Choose Manage > Send UNIX Command.
    4 Type or paste the command.
    If your command is a multi-line script, enter each command on its own line. If you want
    to break up a single-line command for better readability, use a backslash (\) to begin a
    new line.
    5 Set the permissions used to execute the command.
    You can choose the currently logged-in user, or choose the name of another user on
    the client computers.
    6 Click Send.
    For information regarding Terminal commands that can be useful (this is for 10.3 and later, but the relevant command does work in 10.8):
    Mac OS X Server Command-Line Administration
    http://manuals.info.apple.com/en_US/MacOSXSrvr10.3_CommandLineAdminGuide.pdf
    Page 65:
    Commands you can use to create share points and manage AFP, NFS, Windows (SMB), and FTP services in Mac OS X Server.
    Share Points
    You can use the sharing tool to list, create, and modify share points.
    Best regards,
    Allen

  • Discoverer 10g on Unix AIX (command line)

    Hello,
    We are on 10g (10.2.0.3.0)
    We would like to generate reports with Discoverer directly on Unix, and save the results of a report into a file on the Unix machine.
    Ideally, I suppose I would like to get the command line...
    I saw dis51pr and dis51ws... but I have a very poor knowledge about Discoverer on Unix.
    Do you have any advice ?
    Thanks in advance,
    Olivier

    Hi,
    You can invoke a web service from PL/SQL using the utl_http package and because you can connect to viewer and run a discoverer workbook from a url then you should be able to run the viewer workbook from PL/SQL using Disco viewer as a web service. e.g.
    http_req := utl_http.begin_request('http://server:port/discoverer/viewer?username= etc', 'POST', 'HTTP/1.1');
    where the url you pass contains all the details of the username, password, database, workbook and parameters.
    Then use utl_http.get_response to obtain the html generated by Disco viewer which you could then write to a file.
    I haven't tried this approach yet with Discoverer, it is a lot of work to set up and get working.
    Rod West

  • Errors when packaging extension via Extension Manager Command Line

    Hi all,
    I am attempting to package an Adobe Fireworks extension via the CS6 Extension Manager command line tool:
    /Applications/Adobe\ Extension\ Manager\ CS6/Adobe\ Extension\ Manager\ CS6.app/Contents/MacOS/Adobe\ Extension\ Manager\ CS6 -suppress -package product="Fireworks CS6" mxi="name.mxi" mxp="name.mxp"
    I get the following error:
    error: +++ Assert in file /export/home/coretech/source/daily/extendscript/scriptobjects/build/xcode24/../../source/ bridgetalk/source/SoBridgeTalk.cpp, line 117
    +++ BridgeTalk::InitTerm::exit() has already been called.
    Debugger() was called!
    Does anyone have any suggestions on how to proceed?
    Best,
    Dmitriy

    1. There is no "product" attribute in package command. Please remove it.
    2. Why do you still package mxp? MXP has some limitations and is no longer supported in Extension Manager CC. You should package ZXP instead.
    3. Extension Manager CS6 can't sign extension during package. We have a new free product called Adobe Exchange Packager which can package and sign extensions. You can sign in http://www.adobeexchange.com/ and go to Resources page to download it. The current version in this page can't package extension based on existing mxi file. The latest version meets your requirement and will be available in a couple of days.

  • XSQL Pages via Oracle XSQL Command Line in Batch program

    When I try to call the XSQL Command Line utility in a batch file
    it throws a java.lang.UnsatisfiedLinkError. Anyone have any
    ideas what is wrong?

    Nevermind I solved the problem.

  • Starting managed server's via NodeManager from command line.

    In WLS 70 weblogic.Admin utility has been enhanced to start/stop/kill
    managed servers via NodeManager.
    Here's the syntax
    java weblogic.Admin -url {admin server url} -username {admin user}
    -password {admin password} START {managed server instance name for e.g. S1}
    Pls make sure that the admin server & Nodemanager have started prior to
    executing the above command.
    Similary you can issue "SHUTDOWN S1" command which will shutdown the
    managed server.
    See weblogic.Admin for more info. With this interface you don't need to
    go to admin console to remotely start/stop managed servers.
    Hope it helps
    Kumar

    Solved: attention must be paid to the casing of the attribute name. The first character of the attribute name must be uppercase.
    So the property must be set as following:
    set JAVA_OPTIONS=-Dweblogic.ssl.ServerPrivateKeyPassPhrase=<the_password> %JAVA_OPTIONS%
    Edited by: javawarrior2003 on 24-nov-2011 18.19
    Edited by: javawarrior2003 on 24-nov-2011 18.20

  • I need to have a URL that's loading from a batch file load into the side bar instead of the main window and I can't figure out what to add to the command line to make it do this.

    I've seen similar questions, but no answers. Most commonly, I've seen people wanting to know how to code a link on their website to make it open in the sidebar. That would be handy too.
    My own goal here is to make all the pages I need open for work open where I want them, all in one click.

    I don't have a Recently Added playlist.  However, I discovered that the file I had named Eating Healthy was given the name You Can Enjoy Eating Healthy when it copied to iTunes.  I'm guessing iTunes pulled the full name of the piece from the internet.  Upshot--the mp3 did transfer to iTunes on all 3 tries, but I was looking in my alphabetized list under E, not Y, so I didn't see it there.  Thanks for your help. 

  • How to compile and deploy JSP code from Unix server command line?

    I am new to JSP technology. We are thinking to modify some of JSP code to meet our need. But I am not sure what I should do after I change JSP code. How can I compile the changed code? How to deploy? How to publish on the web?

    All files are regenerated if changed.
    That goes for the .java and the .class files that are created. The jsp server checks to see if the current version is the latest. If it is, nothing gets changed or recompiled. If things are different, programs are recompiled.
    Youll notice that if you have a new jsp it always takes longer the first time. Or even when you change a jsp, the first time takes the longest for the page to come up in a browser. This is because of recompiling.
    Does this make any sense?
    Adam

  • How to capture System.out, done by another program

    Hi All,
    My application runs other application in back. How can I capture system.out.println() written by another application & display via dialog box.
    Like :execl() or execv() function in C runtime library. Where every printf() message printed to passed buffer.
    Thank you,
    Avin Patel

    You can create an InputStream from a started process. Then read all the bytes from the inputstream and write them to an outputstream (like System.out)
    Process p = Runtime.getRuntime().exec(COMMAND);
    InputStream is = p.getErrorStream();   //Or another stream
    int[] buffer = new int[128];
    while((read = is.read(buffer)) != -1){
    System.write.out(buffer, 0, read);
    }

  • Invoking a UNIX shell command from Java stored procedure

    The program below is suppose do send an email using UNIX mailx program. It works correctly when I compile it in UNIX and invoke it from the command line by sending an email to the given address.
    I need this program to run as a stored procedure, however. I deploy it as such and try to invoke it. It prints the results correctly to the standard output. It does not send any emails, however. One other difference in execution is that when invoked from the command line, the program takes about a minute to return. When invoked as a stored procedure in PL/SQL program or SQL*Plus anonymous block, it returns immediately.
    Why would mailx invocation not work from a stored procedure? Are there other ways to invoke mailx from PL/SQL?
    Thank you.
    Michael
    import java.io.BufferedWriter;
    import java.io.IOException;
    import java.io.OutputStreamWriter;
    public class MailUtility
    public static void main(String[] args)
    System.out.println(mailx("Hey, there", "Hello", "oracle@solaris10ora", 1));
    * Sends a message using UNIX mailx command.
    * @param message message contents
    * @param subject message subject
    * @param addressee message addressee
    * @param display if greater than 0, display the command
    * @return OS process return code
    public static int mailx(String message, String subject,
    String addressee, int display)
    System.out.println("In mailx()");
    try
    String command =
    "echo \"" + message + "\" | mailx -r [email protected]" + " -s \"" + subject + "\" " + addressee;
    if (display > 0)
    System.out.println(command);
    try
    Process process = Runtime.getRuntime().exec("/bin/bash");
    BufferedWriter outCommand =
    new BufferedWriter(new OutputStreamWriter(process.getOutputStream()));
    outCommand.write(command, 0, command.length());
    outCommand.newLine();
    outCommand.write("exit", 0, 4);
    outCommand.newLine();
    outCommand.flush();
    process.waitFor();
    outCommand.close();
    return process.exitValue();
    catch (IOException e)
    e.printStackTrace();
    return -1;
    catch (Exception e)
    e.printStackTrace();
    return -1;

    try adding the full explicit path to "mailx" in the command string that gets sent to Runtime. i would guess that the shell that gets spawned might not have a proper environment and thus mailx might not be found.
    == sfisque

  • Java system properties in the command line...

    Is it possible to know (at run-time) which system properties have been specified in the command line (using the -Dprop=value argument)?
    Actually I would like to avoid people running the JVM and using my program overwriting the user.name property.
    Thanks
    Lionel

    Why use JNI? That's a little overkill. Just use args[] in main.
    public static void main( String args[] ) {
    for( int i = 0; i < args.length; i++ ) {
    if( args.startsWith("-Duser.name=") ) {
    System.out.println( "Well " + args[i].substring("-Duser.name=".length) + " you're not who you say you are!" );
    System.exit(-1);

  • System.out.println crashes wireless toolkit

    I'm using system.out.println calls to create debugging commands to test my application. They mostly work but if I try to print out a lot at once the wireless toolkit crashes.
    This is all on my computer, not on any mobile device.
    The error I get is:
    Exception in thread "Child process stdout copier" java.lang.ClassCastException: sun.java2d.NullSurfaceData cannot be cast to sun.java2d.d3d.D3DSurfaceData
         at sun.java2d.d3d.D3DRenderer.copyArea(D3DRenderer.java:55)
         at sun.java2d.d3d.D3DSurfaceData.copyArea(D3DSurfaceData.java:638)
         at sun.java2d.SunGraphics2D.doCopyArea(SunGraphics2D.java:1986)
         at sun.java2d.SunGraphics2D.copyArea(SunGraphics2D.java:1968)
         at javax.swing.BufferStrategyPaintManager.copyArea(BufferStrategyPaintManager.java:315)
         at javax.swing.RepaintManager.copyArea(RepaintManager.java:1228)
         at javax.swing.JViewport.blitDoubleBuffered(JViewport.java:1604)
         at javax.swing.JViewport.windowBlitPaint(JViewport.java:1573)
         at javax.swing.JViewport.setViewPosition(JViewport.java:1118)
         at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.vsbStateChanged(BasicScrollPaneUI.java:1027)
         at javax.swing.plaf.basic.BasicScrollPaneUI$Handler.stateChanged(BasicScrollPaneUI.java:1016)
         at javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedRangeModel.java:348)
         at javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBoundedRangeModel.java:285)
         at javax.swing.DefaultBoundedRangeModel.setValue(DefaultBoundedRangeModel.java:151)
         at javax.swing.JScrollBar.setValue(JScrollBar.java:446)
         at com.sun.kvem.toolbar.MainWindow$ConsoleStream.write(Unknown Source)
         at java.io.PrintStream.write(PrintStream.java:430)
         at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
         at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
         at com.sun.kvem.environment.StreamCopier.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:619)Am I doing something wrong or is this a bug in the toolkit?
    Once I get this exception the whole toolkit becomes unresponsive and I have to close it and re-open.

    mydreamgirl, welcome to the forum. Please don't post in threads that are long dead and don't hijack another poster's thread. When you have a question, start your own topic. Feel free to provide a link to an old post that may be relevant to your problem.
    I'm locking this thread now.
    db

  • HOW TO system.out.PRINT a curly brace: {

    How is it possible to print a {  with command: system.out.print{ "text { text"}; ?
    Thanks

    How is it possible to print a {  with command:
    system.out.print{ "text { text"}; ?
    ThanksYour command has 2 errors in it.
    1) "system" must start with a capital "S"
    2) You used curly brackets where you should have used parentheses
    This works: System.out.print( "text { text");
    (although I suspect that you really want to use println, not print)

Maybe you are looking for

  • Can I use my Time Capsule to extend a current network? If so, How?

    Can I use my Time Capsule to extend a current network? If so, How?

  • How do i get my money back for a purchase i regret

    On 10/10/12 I made a purchase accedentilly. the reason for this is because my baby brother was playing Bike race free and bought to other versions with no intention.

  • Problem in message

    Dear ABAPers, I am working on User Exits.Based on some condition i am giving error meesge.But system displays as a information message.What could be the problem. Here i give my code. data : l_qmnum type qmih-qmnum. data : l_TEXT132 type TEXT132. clea

  • Error running client program

    c:>java HelloClient Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/logging/LogO utputStream at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:124) at weblogic.jndi.WLInitialContextFactory.getInitial

  • Please help with very strange problem,Am I the only one......

    I am running Photoshop CS5 on a Q6600, 6 gigs of ram 3 Tbytes HD space and a 8600GT 512 video card. CS5 runs great until I add a configurator 2 panel, then strange things happen. When I select a tool using a keyboard shortcut, is changes very slowly