Return-Path: X-Original-To: apmail-karaf-user-archive@minotaur.apache.org Delivered-To: apmail-karaf-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4D5C410353 for ; Wed, 12 Mar 2014 01:06:42 +0000 (UTC) Received: (qmail 63932 invoked by uid 500); 12 Mar 2014 01:06:41 -0000 Delivered-To: apmail-karaf-user-archive@karaf.apache.org Received: (qmail 63830 invoked by uid 500); 12 Mar 2014 01:06:41 -0000 Mailing-List: contact user-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@karaf.apache.org Delivered-To: mailing list user@karaf.apache.org Received: (qmail 63815 invoked by uid 99); 12 Mar 2014 01:06:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Mar 2014 01:06:40 +0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=SPF_SOFTFAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of anhlon@gmail.com does not designate 216.139.236.26 as permitted sender) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Mar 2014 01:06:35 +0000 Received: from ben.nabble.com ([192.168.236.152]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1WNXcb-00030a-Sb for user@karaf.apache.org; Tue, 11 Mar 2014 18:06:13 -0700 Date: Tue, 11 Mar 2014 18:06:13 -0700 (PDT) From: ken To: user@karaf.apache.org Message-ID: <1394586373796-4032203.post@n3.nabble.com> Subject: executing command during client startup MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi, I am using karaf 3.0.0 and trying to execute a custom command during bin/client. While a trivial command such as "bin/client -h 127.0.0.1 "exit --help"" works well. Its when I attempt to execute a custom command that I've wrote that requires access to the CommandSession that it doesn't seem to work properly. The command is basically a text base wizard presenting the user with a question and asking for an input. In the command, I've attempted the following; 1. get the ConsoleReader from the CommandSession - which isn't available when using executing a command via bin/client 2. tried using commandSession.getConsole() and commandSession.getKeyboard() however, this seems to hang when accepting input, it is being blocked and not returning the input i want. Looking at the org.apache.karaf.client.Main class, it takes in a ByteArrayInputStream which I've changed to System.in and the same problem is still being observed in step 2. Are there anyway to access the input and output stream to write text to it? Thanks, Ken -- View this message in context: http://karaf.922171.n3.nabble.com/executing-command-during-client-startup-tp4032203.html Sent from the Karaf - User mailing list archive at Nabble.com.