How To Parse The Command Line?

Hello,dear. When I writing a C/S mode application,which performing download and upload files between the FTP server and the clients, I encountered the problem of parsing the command line.
I intend to download file from the server side ,using this following format ,which is composed by four arguments:
ftp>receive server's IPaddress portnumber filename
The problem is I don't know how to parse the command line and store them to some objects and using it.
I'm right here waiting for the nice problem-shooter.
Thanks for reading my poor expression.

In your console application main class
public static void main(String[] args)
// code
args is a sting array with the command
line itemsI think you missed the point or forgot the ":-)". This is the "Socket", not the "New to Java" forum.

Similar Messages

  • How can hide the command line of a t.code in the portal

    Dear Experts.
    I have the following doubt:
    How can hide the Command Line of a Report that is called with a T.Code in the portal?
    Attach Image:
    [Image T.Code|http://www.freeimagehosting.net/uploads/eab3b6a03c.jpg]
    When I created a service using the T.Code SICF for the T.Code , I can hide buttons and the filed command line  using
    ~webgui_simple_toolbar
    ~singletransaction
    ~NOHEADEROKCODE
    With notes 1010519, "SAP GUI for HTML: Simplified Title Area Without Menu and OK Code" and 959417.
    But the problem is that when I create the service in the T.Code SICF, I also have that create an Iview IAC in the portal.
    The Question is : How can hide this fields and buttons if I want Publish the T.code using an Iview Transaction in the portal?
    In this moment I have used the two options:
    1 option) I created a service using the t.Code SICF for my Transaction and I also created an Iview IAC in the portal for call the service.
    RESULT:
    SAP Web Application Server
             500 Connection timed out
            Error: -5
           Version: 7000
           Component: ICM
           Date/Time: Sat Jun 12 20:26:39 2010 
           Module: icxxthr_mt.c
           Line: 2698
           Server: xyxab...
    Error Tag: {-}
    Detail: Connection to partner timed out after 60s
    2)  created an Iview Transaction  in the portal and  call my transaction.
    RESULT.
    [Image T.Code|http://www.freeimagehosting.net/uploads/eab3b6a03c.jpg]
    But not can hide the field Command Line and other buttons.
    I think that the command :
    ~webgui_simple_toolbar
    ~singletransaction
    ~NOHEADEROKCODE
    Only can be used if I create a service using the T.Code SICF .
    Best Regards
    Carmen.

    Hi Carmen,
    The bottom line is that this cannot be done for transaction iviews without modifying the standard webgui service in SICF, which is probably not a good idea (since it affects everyone using SAP GUI for HTML). (You could hack the appintegrator to add the ~webgui_simple_toolbar parameter to the transaction URL template in the portal, but again its not a recommended thing to do ...). Better to create an IAC service in SICF with ~webgui=1 where you set the required appearance using an appropriate value for ~webgui_simple_toolbar, and then create an IAC iview to point at this service.
    You can even override the ~transaction value configured in the new service in individual IAC iviews by entering the appropriate value in the application parameter of the iview, for example:
    ~okcode=/nSU01
    And you can pass parameters in the same way:
    ~okcode=/nSU01 USR02-BNAME=xyz;USREFUS-USERALIAS=abc;
    By the way, it would not be recommended to create a URL iview to access an IAC, since you are likely to encounter session management issues in this scenario - better to use an IAC iview.
    Regards, Rory

  • How to break the command line in SAP scripts

    Hi,
      Can any one Please guide me how to continue the command line( /: ) of SAP SCPRIPT into multiple lines.
    Regards
    Kiran

    Hi Kiran,
    U can continue in the same line itself by pressing SHIFT+F8
    If u want it in the next line then u can give space in the tag column.
    Thanks,
    Vinod.

  • How to hide the command line arguments from solaris process

    Hi All,
    When I execute a JAR application from a java file using the Runtime.getRuntime, the command line arguments (user ID and Password details) which I passed for executing the application displayed on Solaris process (ps -ef).
    Could anybody please help me, how can I hide either the process or the command line arguments from the Solaris process?
    I cannot pass any asterix or any special character in place of password, because the executing application doesn't have any functionality to retreive the password which send as asterix characters.
    Please help me
    SumodeV

    Thanks for all the response.
    I have created a design and implement the functionality which executes the JAR application in Solaris environment without showing any details in the process details.
    I have used the Java Reflection method, which invokes the JAR application. I am sharing the details here for all those who looking for it.
    1, Inside the Customer application [Jar File is running for it], collect the necessary session details [Using System.get property method]
    2, Create an independent Java file, which should be used to invoke the JAR application
    3, Create the ProcessBuilder object and use a command - execute the Java file [a wrapper code] using normal Java command
    4, Pass the necessary session details to the ProcessBuilder using the environment() function.
    5. Collect the environment values in the independent Java file (Which was invoked by ProcessBuilder) and set details for its environment using System.setProperty.
    6, Use reflection technique to invoke the JAR plugin [which you want to run]. You can use the standard Java functionality to read the MANIFEST file of JAR and load the main class using URLClassLoader.
    7, Invoke the main method of the JAR file, which run the JAR application in Solaris window
    This solution will make sure that the process cannot display any session details in the Solaris Environment.
    Note: Use String[] array while create the command. Otherwise the JAR application cannot pop-up.
    Regards
    Sumode

  • How to uninstall the command line tools?

    I installed the command line tools in Xcode 4.5 from the preferences : downloads : command line tools.
    If i want to uninstall this component, what should I do?
    PS:
    I saw an answer in the Apple Support Communities about how to uninstall the Xcode 4.3 and later versions.
    This is the original: " If You want to uninstall completely XCode go to launchpad and push Xcode icon for two
    seconds, so click on the upper left checkbox.".
    I don't know what means "push Xcode icon for two seconds, so click on the upper left checkbox".

    There is no easy way to uninstall the command line tools. The following article has a script to uninstall them:
    You Don’t Need The Xcode “Command Line Tools”
    Read the comments in the article. I have not tested the script, but this is the first result when searching Google for "xcode 4.5 uninstall command line tools".

  • How to get the command line interface for WRT160NL router

    hi,
    How can I get the command line interface for WRT160NL router. please suggest.

    If you’re trying to access the web-based interface of your router, just use its default IP address (192.168.1.1). The Username is left blank and the Password is "admin". Here’s a quick link on how to do that.

  • What happens when a program name is typed on the command line?

    I mean I know what HAPPENS but I need to know the sequence of events. How would I describe it?
    i.e. java MyProg

    What is this? Are you taking a take-home exam on basic computer operation? You're asking very similar questions about broad things.
    Anyway:
    1) the shell parses the command line. it gets a sequence of tokens which are basically just individual strings
    2) the shell identifies which tokens on the command line are executables, and which are arguments to those executables. It also figures things out like how to chain the output of one program to the input of another, although this doesn't apply in the example you gave. In your example, "java" is the executable and "MyProg" is a string to pass to the executable as an argument.
    3) The shell then searches for the actual program file corresponding to the token that refers to an executable. The shell looks at the PATH environment variable to find a list of directories; it then looks in each directory until it finds the program file. So the program file here would be "java.exe" on a windows system.
    4) It then spawns off a new process to run the java program, passing the MyProg string to it as an argument.
    Does that help?

  • How can I open a PDF file and enter a word in the Find field from the command line?

    Hi,
    I want to use a PDF file as the help file of another program.
    I have found somewhere an incomplete description of the command line parameters of Acrobat Reader.
    It described how to open a file and jump to its given page.
    I have written the following batch file based on that.
    rem Open pdf (prm1) with Acrobat reader at given page (prm2)
    "%adobe_rdr%\AcroRd32.exe" /N "zoom=73&page=%2=OpenActions" %1
    The following batch file opens the search dialog:
    rem Open pdf (prm1) with Acrobat reader
    rem and search for something (prm2)
    "%adobe_rdr%\AcroRd32.exe" /N "zoom=73&navpanes=1=OpenActions&search=%2" %1
    I need the simple find field instead of the complicated search window.
    Regards
                   Ferenc

    Not possible.

  • How do I open a PDF to a specific page via the command line?

    Several questions about opening PDFs from the Mac OS X command line:
    1) How do I use the "open" command to open a PDF to a specific page? (I know I can open a document via: open doc_name.pdf)
    2) How do I use the "open" command to pass multiple arguments (page no, zoom scale, view mode, etc...) to open a PDF file in a specific manner?
    3) Does Preview handle the same parameters as Acrobat Reader? If not, what are the differences in options?
    I've spent hours searching for this answer and have come up dry. I've downloaded Adobe's "PDF Open Parameters" document -- it lists all of the parameters I need, however I can't get any of them to work from the command line.
    My goal: Open a PDF from the command line to a specific page. At first glance, I thought this would be simple to do and find -- however, after a lot of searching I haven't found an example on how to do it.
    Anyone have any experience doing this, and care to share?
    Much appreciated! ---> Kelsey

    I don't know of any way to do what you want using the 'open' command. It can probably be done with Applescript, which you could call from a shell script. The Preview application doesn't seem to be scriptable. I don't use Acrobat, so I can't tell you anything about that. Looking through the dictionaries of the apps I do have, it seems that Skim (another PDF viewer) has an AS 'page' class. Below are a couple of links that may get you started. Look for more specific guidance in Applescript forums.
    http://sourceforge.net/apps/mediawiki/skim-app/index.php?title=AppleScript
    http://links.tedpavlic.com/shell_scripts/skim

  • How can I start System Preferences from the command line?

    Hello All,
    I have an issue I'm not quite sure how to solve. I have been tasked within my business environment  with tightening security on a Mac Leopard system and I've been granted Admin Rights to do this on a temporary basis.
    The problem is as follows:
    1) The original Sys Admin that set up this system is gone, no longer available.
    2) He was a Dvorak Keyboard fan and set up the system for a Dvorak Keyboard.
    3) The system actually has a standard Apple keyboard and is marked accordingly, i.e., qwerty (Most Users in the building have stopped using this system altogether - a terrible waste of a good system - even though some of their apps can be run normally (US style qwerty settings). The command line is useless, as is texteditor.app and a few others unless you know Dvorak layout)
    5) When I open System Preferences, the Dvorak keyboard checkbox is grayed out and I cannot change it. There is no lock at the bottom of that particular screen for me to unlock.
    6) Even though I select the US Keyboard at Login, and some apps work accordingly (like MatLab for example) the terminal is borderline useless. I spent over 2 hrs yesterday doing what should have been able to be done in about 30 minutes. I estimate a frustrating and mistake prone additional 8 to 10 hours to do what is normally a a 4 hour job at the command-line.
    7) I do not have the time or desire to re-mark all the keys on the keyboard, particularly since it is not my call to do so, nor do I have the time to re-learn Dvorak touch-typing, and finally I do not want to re-load the entire system. I just want to change the darn keyboard to a standard qwerty keyboard that is somewhat useful in a terminal environment with vi, command line, etc. It's either that or I go mildly insane
    This is frustrating as all get-out. The new Admin logged in and was able to uncheck his Dvorak settings (he is not a UNIX guy, nor is he comfortable om Macs), and we were hoping this was a system wide setting, but No. We re-booted the system, I logged in, still Dvorak, and the checkbox was still grayed out.
    So I figure, short of re-loading the entre system and all the applications necesary, I can either start the Systems Preferences GUI using sudo and hopefully that will change system-wide settings, or I can delete the .AppleSetupDone file and resetup the system (if the keyboard settings are part of the setup) without spending a couple of days reloading everything and re-setting up users, networks, etc.
    Needless to say, I am hoping for the easiest and quickest solution to this extremely frustrating and  aggravating problem.
    Thanks.

    For my situation the following C# code does the job:
        Process.Start(
           @"c:\Program Files\National Instruments\CVI71\cvi.exe",
           @"c:\temp\experiment.c" );
    The file must already exist.

  • How do I create a local account from a network login from the command line?

    I am connecting to my organization's domain using 3rd party software which doesn't allow for using the GUI for creating local accounts.  How can I do this through the command line or is there a better way to script it?  Thanks in advance!

    What you're looking for, I think, is mobile accounts with portable home directories.
    Portable Home Directories in 10.8...: Apple Support Communities
    Configuring OS X Server 10.8 – Open Directory and PHD

  • How do i create a database template from the command line?

    Hi,
    As part of implementing a backup and recovery strategy for a client (including disaster recovery) I want to automate the creation of a database template From an Existing Database (Structure as well as data) via a script that will run every night.
    The background to this is that we will also be using RMAN to take backups of the database concerned but the client does not want to wait while an RMAN backup is restored and so wants an additional level of insurance in the form of a ‘standby’ clone database.
    The idea is that nightly we will run a script that creates a database template from the Existing Database (Structure as well as data) and then transfers the 2 files involved e.g. DB_data_included.dbc and DB_data_included.DFB across to a standby server where they can be used to recreate the database in the event of us needing to after e.g. a complete server failure.
    So I have a couple of questions about this that I would be very grateful if something could answer for me:
    1)     Is it possible? That is, can a database template be created from some utility by supplying a series of parameter=value pairs on the command line?
    2)     If yes how do I go about it, what utility do I use (the emca utility?). and what parameters do I need to supply on the command line to create the template?
    3)     The intention is that the script to create the template will run in the early hours of the morning when no-one is using the database but what state does the database need to be in when the template creation script runs i.e. up, down, mounted and does the creation of a template affect the state of an already up database i.e. if I kick off the template creation script and the database is up will it switch it into mount mode or anything like that? My concern here is that I want to make sure I understand exactly what is going on so that no users or connected external systems are affected?
    Thanks in anticipation of someone being able to guide me on what to do or what documentation to read.
    Also if you require any clarification on what i'm asking please post up your query and i'll respond ASAP.
    Kind Regards,
    George Johnston
    OCP 9i DBA

    Sybrandb,
    Firstly thanks for you reponse.
    However, I don’t agree that dbca only creates empty databases otherwise why does the option to create a template from an existing database (structure as well as data) exist in the dbca wizard?
    I have performed a test case where I have a created a database template including data on one 10g server. I have then used the files generated to recreate that database on a separate server. When the new database is started it is an exact copy of the original. So it’s not empty at all , it’s exactly what the client wants.
    So I don’t agree that I’m gaining zero.
    Why is this approach doomed to fail?
    There a number of reasons why I “just set up a proper standby database”
    1.     Time – I’m on a customer site in a tight engagement where the customer wants maximum value for money. I don’t have standby database skills and the customer isn’t willing to pay for me to learn on the job so please understand the tight circumstances I’m working in.
    2.     Availability – As far as I know the client is running 10.2.0.3.0 standard edition. Correct me if I’m wrong but is standby db available in that edition. Where do I look to check V$OPTION.
    On the RMAN duplicating a database front it’s an area I haven’t used before but I will take a look at it.
    Also please revisit the context of my original posting where I state
    The background to this is that we will also be using RMAN to take backups of the database concerned but the client does not want to wait while an RMAN backup is restored and so wants an additional level of insurance in the form of a ‘standby’ clone database.
    So please understand that this a quick fix that the client wants developed in the minimum time possible in ADDITION to a full nightly RMAN backup being taken.
    In an ideal world I’d have the time to follow best practice but in the real world of on-site customer support I just need to get the job done operating under the customer imposed constraints.
    Many Thanks,
    George Johnston
    OCP 9i DBA

  • How can I start a second window of a second profile through the command line?

    I have two profiles set up, 'default' and 'second'. If both are already running how can I start a second window of profile 'second'?
    firefox -p 'second' : opens a new window of the default and,
    firefox -p 'second' -no-remote : tells me that firefox is already running.

    I don't think that this is possible.<br />
    You need to open this second instance (Firefox profile folder) with the -no-remote command line switch and that makes it impossible to open external links via the command line or via a double-click.<br />
    You can only open a link in such an instance by dragging the link on the tab bar of that Firefox window.

  • How can I put a "esc" character in the command line of the Iinstrument I/O Assistant?

    Hello
    I'm trying to prepare a VI for a device (Ultrasonic detector) connected to my RS-232 serial port, and which requires commands and enquires in the format
    The problem is very simple....since is a non printable character, how can I put it in the command line of the Instrument I/O Assistant???
    Best regards
    Massimiliano

    Hello Massimiliano,
    Thanks for contacting National Instruments.
    To answer you question, the best way to do what you are looking to do is to use the instrument I/O Assistant to generate whatever you want the code to do without the non-displayable characters, then once the Instrument I/O Assistant block is on the block diagram, then right click on the Assistant block and select to open the front panel. You will want to choose to convert it to a standard VI, which will allow you to change the code that has been auto generated. In order to add non-displayable characters to this code you follow the knowledgebase link below.
    http://digital.ni.com/public.nsf/websearch/77c8f61d36f5a23086256634005acb38
    Hope this helps!
    Regards,
    Steven B.
    Applications
    Engineering
    National Instruments

  • How to pass in variables using the command line when starting ActionScript native app

    How do I pass in variables or startup arguments using the command line when starting an ActionScript native app? For example, I have my app call MySweetWidget and it has been compiled with Adobe AIR captive runtime so now I have MySweetWidget.exe.
    In the command line, I am calling MySweetWidget.exe and would like to pass in variables or properties to the application. I would assume that those variables are then read from the loaderInfo.parameters object.
    Please let me know if the Adobe AIR runtime supports passing in parameters to the native runtime. If so, I would like help determining the correct format of how to pass in the variables. Then would you read those from the loaderinfo.parameters object?
    Thanks,
    Jeff

    I found the answer to my own question:
    Yes it is a supported feature. It is documented on the following page:
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/desktop/NativeApp lication.html#event:invoke
    When you subscribe to the invoke event of the NativeApplication it will subsequently dispatch the event and you read the e.arguments Array object to get the startup arguments passed into the native application.

Maybe you are looking for

  • Questions on sending audio tracks from a short film into Audition for mastering

    Ok so basically I have a 4 minute film in which i need to master the audio. I have a few quesions as to how to best go about this. 1: Some of the clips came with 2 tracks off the camera yet they are both labeled channel 1 on the beginning of the clip

  • How do I uninstall site scout malware?

    Not sure how it happened, but I've picked up site scout malware that opens Safari windows upon reboot. iMac running OS X Yosemite, Safari 8.

  • How is the Mailing Agent permit generated on a mail.dat

    The business I work for has multiple permits, and they all appear to be associated with our CRID. I can change the Permit Holder's permit as needed, but I can't seem to change the Mailing Agent permit, and I'm not sure where the information is pulled

  • How to hide the parameters in the url

    Hi, Can anyone help me to hide the parameters being passed in the url. For example, when a link is clicked i want to pass few parameters to it, but i dont want to display those parameters in the url. Can anyone help me figure out how can i achieve th

  • Empty page in browser after i run my application

    Hi OTN When i try to run my application in the browser, it shows an empty page in the browser, i have try to rebuild my application and there's no error, im currently using Build JDEVADF_11.1.1.1.0_GENERIC_090615.0017.5407 studio edition of jdevelope