How to give  avi filepath as command line argument

hi friends
my problem is that when i run source code seek.java at following link
"http://java.sun.com/products/java-media/jmf/2.1.1/solutions/Seek.html"
it works fine with some avi file on any website. for example
if url="http://w1.520.telia.com/~u52013932/humancopter.avi"
i.e java seek <url> will work.
but i need it with a file on my computer. how can i give path for avi file on my system. can anyone sujjest me something.
thanx

file:/C:/program files/movie.mpg
US101

Similar Messages

  • How to read -Dname=value pair command line arguments

    Hi
    iam running one program called report.java as given below
    compile:
    javac report.java
    run:
    java report -Djava.path=home/arao/jaava1.5/bin
    my problem is how to read name and value pair given in command line argument.
    System.getProperty("java.path");//not working can anybody help how to read name and value
    pair of -D option

    If you put that string after the name of the class you are running, then it's a command line parameter. Your main() method can look at args[0] to see it. However it would be better if you just put it before the name of the class, where it's supposed to go if you want it to be treated as a system property.

  • How to give command line arguments

    does anyone help me out in how to give command line arguments after run my program
    m using netbeans6.0.1

    If you want your program to take console input while it's running (as opposed to command line arguments, which are passed once, when you start your program), you can wrap a BufferdInputStream or a Scanner around System.in.
    [http://java.sun.com/docs/books/tutorial/essential/io/index.html]

  • How to run command line argument programe

    Hi guys, I am doing pass command line argument programe in java but I don't know how to run this programe. Path for this programe in my my computer is C:\Users\Desktop\Mainjava\mycode\CommandProgjava*
    {code/}
    public class CommandProg
    public static void main(String[] args)
    System.out.println("d");
    for (int i = 0; i < args.length; i++)
    System.out.println(args);
    {code/}
    Where i need to go and what command i need to give so i can execute this programe(I am using window vista). I only know i have to give
    this command some where CommandProg arg1 arg2 arg3 arg4. Output should be
    Output:
    arg1
    arg2
    arg3
    arg4
    Please help me, Thanks in advance.
    Edited by: JayVirk on Dec 30, 2007 11:33 AM

    Jay,
    Your question isn't very clear, hence Joerg's well meaning but irrelevant advise.
    Do you mean:
    I've written a simple program in java which echos
    it's command-line arguments to back to the console.
    Here's my code:
    package forums;
    public class ArgsEchoer
      public static void main(String[] args) {
        for (String arg : args) {
          System.out.println(arg);
    But can't figure out how to compile and run the program.
    I'm using winblows shista, and it's cr@p.
    Please help me, Thanks in advance.So... where are you at? Have you installed the JDK (java development kit)? Which version? Is your path set? Is your classpath set?
    Start here: http://java.sun.com/developer/onlineTraining/new2java/

  • How to run labview exe with command line

    I would like to launch a labview exe with a command line.
    I would like to get advice how to launch the Labview exe with giving values to the control parameters?
    You can view the example where x,y are the controls
    Solved!
    Go to Solution.
    Attachments:
    exe.png ‏65 KB

    There is a much more detailed guide here, which I reference below:
    1. First you will enable it in the settings:
    1. Open the properties for the application's build specification
    2. Navigate to the Advanced category
    3. Check the Pass all command line arguments to application box
    To pass the command line arguments to the application and access them in your code follow the same steps as for LabVIEW 7.x.
    2. Then you will use two hypens (--) to pass command line arguments to the VI. 
    When you launch LabVIEW or a stand-alone executable from the command line, you can pass user-defined arguments to the application. User-defined arguments start after two hyphens (– –) surrounded by spaces in the command line. For example, the following command line entry will launch LabVIEW 7.1 and open test.vi from the root of C:\ and pass 2 arguments, 1000 and sine:
    "C:\Program Files\National Instruments\LabVIEW 7.1\LabVIEW.exe" "C:\test.vi" –– 1000 sine
    You can also pass a command line argument directly to an EXE without launching LabVIEW, as long as the machine has the appropriate Run-Time Engine and necessary drivers.  For example, if test.vi was built into an executable, it could be called as follows:
    "<build directory>\test.exe" –– 1000 sine
    3. Lastly, you will use a property node to wire them to your controls:
    LabVIEW passes the arguments from the command line to the block diagram of the VI or EXE you launch. You can reference the arguments in the block diagram by using the Application:Command Line Arguments selection in a property node, as shown below.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    If someone helped you out, please select their post as the solution and/or give them Kudos!

  • How to output instructions to the command line?

    How can I make my java program give instructions to the command line, eg to execute programs with command line parameters?

    How can I make my java program give instructions to the command line, eg to execute programs with command line parameters? well you can execute the instruction directly not even going(piping through) to commandline.
    try{
    String command = "ls"; // for windows for example String command = "notepad";
    Process execCommand = Runtime.getRuntime().exec(command);
    // now if you want to pass parameters along with the  command use this
    String command2 ="ls /tmp" ; //respectively for windows
    // if there are many arguments which needs spaces then use
    String [] longCommand = new String[]{"find","whatever","path"}; // here find is the command and rest two are desired arguments.
    // now if you want to read the output from command line
    InputStream in = execCommand.getInputStream();
    int c;
    while ((c=in.read())!= -1)
    // process c the way you want
    } catch(IOException io)
    {}Edited by: KillerDev on Nov 2, 2008 12:00 AM

  • How to add command line arguments to shortcuts in the LV8.5.1 installer

    I want to create multiple shortcuts to my LV program, each with different command line arguments.
    I can do this manually.
    I want the installer to generate these shortcuts.
    I can add different shortcuts in de installer build specification, but I cannot add commandline arguments in the shortcuts.
    Does anyone know how to do this?
    Rindert 

    Hello Forum,
    Does anyone have any better data for this?  I would also like to create an installer using Labview Project Explorer tool (Build Specification->Installer), and I have a need to create some shortcuts to some EXE's (VS.NET built, not LV) which need to have some arguments passed.  I just verified that LV8.6 still does not seem to offer the option of passing arguments when creating shortcuts.  Is this correct?   Creating stub EXE's or batch files isn't a good option for my project, so I'd like to have someone confirm if LV installer tool can't create shortcuts w/ arguments before I fire up InstallShield.
    Regards!

  • How to pass a command line argument to a jsp file...

    Hi guys,
    I'm writing a jsp file in which I have some java codes. I want to pass some command line arguments to that jsp file. In other words, I have some files located somewhere on my C drive and I want to pass the path to these files to my jsp file. How can it be done? I have never done before.
    Any suggestion will be very hepful...
    Thanks....

    I dont know if I truly understand your problem...
    For instance, when you place the url of your jsp you can add, at the end some parameters. For example:
    http://myserver/myapp/myjsp.jsp?MyParameter=C:\Temp\JavaTutorial.html
    In your JSP, you can place this code on a scriplet to get the value:
    String path = request.getParameter("MyParameter");
    Hope it helps.

  • How are Windows Server Backup and Command Line Tools used in vCSHB installation?

    How are Windows Server Backup and Command Line Tools used during the installation of vCSHB?  Is it required in all types of deployments (PtoV, VtoV, PtoP)? Is it used to create the files that are put in the file share for the second node to use during vCSHB installation or is it only used during a vCSHB clone operation of a Physical to Physical deployment?  Are these tools not used in some deployments?

    You need Windows Server Backup installed on source and destination, and during the installation of vCSHB the installer will invoke the wbadmin (Windows Server Backup Utility) and will backup configuration and application data (application data is optimal but can decrease the sync time after installation of secondary node). On the secondary node you will need only run the vCSHB installer and everything will be restored.
    Check this blog entry for some more info about some problems in P2P deployment: http://www.vcoportal.de/2013/12/vmware-vcenter-server-heartbeat-restore-on-a-second-node-a-journey/

  • How To Run An External .exe File With Command Line Arguments

    Hiya, could anyone tell me how I can run an external .exe file with command line arguments in Java, and if possible catch any printouts the external .exe file prints to the command line.
    Thanks.

    Using the Runtime.exec() command. And read this:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • How to change fcalias www via command line & particular port performance status

    how to change fcalias www via command line & particular port performance status

    how to change fcalias www via command line & particular port performance status

  • Filenames as Command Line Arguments: How?

    i need to create a program that involves taking in a file name as command line argument, reads the file and then displays its contents on the screen. it needs to work with any file with a .txt extension.
    The only thing i dont fully understand is how to read the file name as a command line argument e.g.
    "java FileReaderApp myfile.txt
    ----contents of file--------
    Thanks in advance
    Carl
    P.S. I have lready read the various helps, utils etc for java and still dont really understand

    Okay, first, it will help if you don't think of "filenames as command line args." The two concepts are totally independent.
    Command line args are Strings. What you do with those Strings is up to you. Processing the command line args is the same, regardless of whether they represent file names or the turnons of the last 50 playmates.
    The args array below contains the command line args.
    public static void main(String[] args) {
    // do stuff
    } Files are generally referred to using the java.io.File. It takes a String for the file name. It doesn't matter where the String comes from.
    Look at FileReader and BufferedReader to actually read the contents of the file.
    http://java.sun.com/j2se/1.4.2/docs/api/java/io/FileReader.html
    http://java.sun.com/j2se/1.4.2/docs/api/java/io/BufferedReader.html
    For the basic command line arg stuff, one of the following should have some info and examples
    http://java.sun.com/docs/books/tutorial/
    http://java.sun.com/learning/new2java/index.html
    http://javaalmanac.com
    http://www.jguru.com
    http://www.javaranch.com
    Bruce Eckel's Thinking in Java
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java

  • How to execute ODI scenarios from command line in Unix

    Hi Friends,
    I am using ODI 11g.
    I want to execute ODI senarios using the command line argument in Unix.
    Please let me know how to proceed with this.
    Thanks,
    Lony

    Hi,
    unser the /your_ODI_HOME/agent/bin folder.
    Excute this
    sh startscen.sh REFRESH_ID 001 GLOBAL 5 -NAME=agent_ODI
    REFRESH_ID=Your Scenario name
    001:Version
    GLOBAL:Context name
    5=Log Level
    agent_ODI=Your agent name
    Regards

  • 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 pass a command line argument to the sequence?

    Hi,
    My GUI is written in VB.NET. I can read the command line argument in the GUI, using: Me.AxApplicationMgr.CommandLineArguments(). But I don't know how to pass it on to my sequence file which the GUI invokes. How do I read the command line argument from the sequence file?
    My purpose, is to have the same basic sequence execute different subsequences depending on starting conditions...
    I am using TestStand 3.0 with a VB.NET GUI, on Windows XP.
    I'd appreciate any help on the subject.
    Alan

    Hi Alan,
    One obvious way would be to add parameter(s) to the MainSequence and then modify the process model sequence file to use the new parameter(s) in the step "MainSequence Callback"  in either Single Pass or Test UUTs but I wouldn't recommend this approach.
    The sequence file to be run via the entry point can be found at "RunState.ProcessModelClient" and the lookup string to the MainSequence would be "RunState.ProcessModelClient.Data.Seq["MainSequence"] or .Seq[0] .
    Therefore you could quite easy use the SetVal method to setup a Local variable in the MainSequence of your Sequence File to receive the command line string.
    Also you could do this without altering the Process Model Sequence File by using the Callback Sequence ProcessSetup in your Sequence File.
    As an example.
    You have a string in your Locals of MainSequence called CmdLineStr.
    If you add the Callback Sequence ProcessSetup to your SequenceFile, then add an ActiveX Automation Adapter step which is setup for a PropertyObject and the reference is RunState.Caller.RunState.ProcessModel.Data.Seq[0].Locals.CmdLineStr.
    There is an extra RunState.Caller to the lookup string, that's because I am doing the work in a SubSequence of Entry Point Sequence.
    The method to use is SetValString and the parameters of the PropertyObject will be
    lookupString = ""
    options = 0 or 1
    newValue = where evey you have stored you command line string.
    Now when you run your sequence file you will find that the Locals.CmdLineStr will contain your parameter string.
    Hope this is of help to you.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

Maybe you are looking for