w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
How to create eclipse android project from command prompt?
try this android create project --target <target-id> --name MyFirstApp --path <path-to-workspace>/MyFirstApp --activity MainActivity --package com.example.myfirstapp source http://developer.android.com/training/basics/firstapp/creating-project.html#CommandLine

Categories : Android

How is interacting with a prompt of a third party command line program different from a Windows Command prompt?
Most likely the program starts its own shell and does no longer interact with the original one. (You would notice this if the program opens a new window) Or the program needs some specific library to be present to be able to interact with a shell (readline seems to be the case here) and that is not present in your Java Environment. As a quick hack you might try to start bash (or cmd) that then starts the tool. bash and cmd have readline library. I don't have a windows ready here but as a guess just try to call your program like cmd urjtag.exe instead of just urjtag.exe that way you start a cmd process (with that you can interact) and that cmd starts the urjtag.exe where you already know that it can interact with. Either way the problem lies in the way the program you want to call intera

Categories : Java

Execute batch file. How to call .bat file, visual studio command prompt and change directory in opened command prompt window
You've asked two questions here. You should split them up and ask them as two separate SO questions. Q1. Why is my batch file never getting past call lvsrun.bat? A1. Because call will not return until the batch file it is calling has exited. If you want to launch lvsrun.bat and continue execution immediately, use start. copy "C:dirdbfile" "C:dir1dbfile" cd c:lvsdir start "" "%comspec%" /k lvsrun.bat Q2. Why doesn't the new command window I launch run my test file? A2. Your batch file will only control its command window. If you launch another command window, that one is on its own, you can't "send" commands to it. But you could instead run the test in the current window rather than launching another: :: Use "call" here to run vcvarsall.bat to set up the environment in this pro

Categories : Visual Studio 2010

C# Increasing Length of Command Prompt when Printing to Command Prompt
Use Console.SetBufferSize() like this: class Program { static void Main(string[] args) { Console.SetBufferSize(Console.WindowWidth, 9999); } }

Categories : C#

Override "project" command in Build.scala
The best thing to do is to create a dedicated object, with its own Scala file, that would define a def Project. That way you could have something like: [your company].scala: object <your company> { def Project(name: String = "", path: sbt.File, dependencies: Seq[ModuleID] = Seq.empty, isCompanyProject: Boolean = true) = { val settings = ... val projectName = if (companyProject) { ... // [your company / your project / whatever] + "-" + name } else name val project = sbt.Project(projectName, path, settings = ...) project } } in the same folder as your ApplicationBuild.scala file: object ApplicationBuild extends Build { ... lazy val foo = <your company>.Project("foo", sbt.file("foo"), fooDependencies) } That way you could create a [your

Categories : Scala

How to build apache cordova project from command line?
You should get a more verbose output by running cordova -d build android. Alternatively, to use the underlying cordova-android scripts to build, you can: cd platforms/android ./cordova/build OR, to peel away even more layers, you can use the Android ANT script to run the build (which is what the cordova scripts shell out to anyways): cd platforms/android ant debug

Categories : Android

LLDB: Must I build it from source (XCode project) to use it from the command line?
Maybe I took the scenic route here. % /Applications/Xcode.app/Contents/Developer/usr/bin/lldb (lldb) version LLDB-179.6 (lldb) This is probably useful enough to get work done with. It's kind of unfortunate to see that the Xcode CLT and Xcode itself come with similar tools, it's a waste of disk space. See the sister question here.

Categories : Osx

How to build visual studio solution file .sln command line with selected project
You could make a solution containing just the projects you want to build. Alternatively you could make an MSBuild .proj file that collects together the projects you want to build: <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <ProjectsToBuild Include="X.csproj;ChildY.csproj" /> </ItemGroup> <PropertyGroup> <Configuration>Release</Configuration> </PropertyGroup> <Target Name="Build"> <MSBuild Projects ="@(ProjectsToBuild)" ContinueOnError ="false" Properties="Configuration=$(Configuration)"> <Output ItemName="OutputFiles" TaskParameter="TargetOutputs"/> </MSBuild> </Targe

Categories : Visual Studio 2010

Failure on build with Gradle on command line with an android studio project : Xlint error
It's a nice warning not error, to see the complete lint report you can add these lines to build.gradle: allprojects { tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:deprecation" } } If you really want to get rid of those warnings: Don't use deprecated API Use @SuppressWarnings("deprecation")

Categories : Android

Azure Project build package working from VS, failing from command line with error MSB4096
This post solved my problem: http://michaelcollier.wordpress.com/2013/01/14/multiple-sites-in-a-web-role/ A must read if you have several websites on one webrole!

Categories : C#

Visual Studio not using Visual Studio Command Prompt for post-build events
The easiest way is probably just call out to the thing the normal VSXXXX command prompt uses: Ex: CALL ""%ProgramFiles(x86)%Microsoft Visual Studio 10.0VCvcvarsall.bat"" x86 (edit: updated as per Hans's comment)

Categories : C#

How to open Command Prompt, change directory and execute a command using Java code (Windows)
If you just want to run an application with a specific working directory, the easiest way is to use a ProcessBuilder: ProcessBuilder pb = new ProcessBuilder(executable, arguments, if, any); pb.directory(theWorkingDirectory); pb.start();

Categories : Java

Using the subprocess or Command module of python for Windows command prompt
Documentation says: cmd is actually run as: { cmd ; } 2>&1 And the function getstatusoutput() is available on UNIX not on Windows.

Categories : Python

How Can Be Used the Command Line of Developer Command Prompt in Vim on Windows?
You need to setup your PATH, INCLUDE and LIB environment variables. You could do that by running D:Program Files (x86)Microsoft Visual Studio 10.0VCvcvarsall.bat (or wherever it is located on your installation) in the same prompt you're running vim, or even manually setting these environment variables (here is a list of all values for VS2008 and Windows SDK: Using Visual Studio's 'cl' from a normal command line). However, you just can't run the bat file from vim directly, because it will open another Prompt, so the environment variables will be set only for that new prompt. The other option is just to create bat file which you can put it inside your PATH, for example cvim: call "D:Program Files (x86)Microsoft Visual Studio 10.0VCvcvarsall.bat" "C:Program Files (x86)Vimvim74g

Categories : C++

Executing multiple command in command prompt using vbscript
You want the "Shell" object to run commands: strText="netsh wlan set hostednetwork mode=allow ssid=NAME key=PASSWORD" Set shll = Wscript.CreateObject("Wscript.Shell") Return = shll.Run(strText, 1, TRUE) you can add as many "shll.run" commands as you need to - the TRUE flag above will make VBScript wait for the command to finish before continuing the script. You would be better off looking at Powershell for sharing network connections.

Categories : Vbscript

Execute a command in command prompt using excel VBA
The S parameter does not do anything on its own. /S Modifies the treatment of string after /C or /K (see below) /C Carries out the command specified by string and then terminates /K Carries out the command specified by string but remains Try something like this instead Call Shell("cmd.exe /S /K" & "perl a.pl c: emp", vbNormalFocus) You may not even need to add "cmd.exe" to this command unless you want a command window to open up when this is run. Shell should execute the command on its own. Shell("perl a.pl c: emp") -Edit- To wait for the command to finish you will have to do something like @Nate Hekman shows in his answer here Dim wsh As Object Set wsh = VBA.CreateObject("WScript.Shell") Dim waitOnReturn As Boolean: waitOnReturn = True Dim windowStyle A

Categories : Shell

Different Command prompt windows does not executing the same command
You say that you checked the %PATH% variable, but you didn't say anything about how you checked it and what the result was. What do you get when you run echo %PATH% in the 2nd command window? Given the error message it's almost certain that the path to the svn executable is missing from your %PATH%. Try the following: set PATH=%PATH%;C:path osvndir svn update

Categories : Svn

Java issue command in command prompt
Your (first) while() loop never terminates: while ((line = reader.readLine()) != null) { System.out.println("Stdout: " + line); } readLine() returns null when the stream is closed, but since your sub process is still running, the stream never gets closed. To solve this, you can either move the reading part into a separate thread (which requires additional synchronization), or a simpler solution would be to see if a specific line contents is read, for example if the command line prompt was printed by cmd.exe: while ( !(line = reader.readLine()).startsWith("C:\") ) { System.out.println("Stdout: " + line); } This should work for your particular use case, and might be sufficient to do some learning - for real applications, you might want to have a look into the Apache Commons Ex

Categories : Java

How to run a command on command prompt startup in Windows
Sorry for the noob type of question. I should have given it a li'l more thought. I found my answer. I should use /K switch using which I can enter a new command on the opened command prompt. e.g. cmd /K cls will open a command prompt for me and clear it. (Answer for question 1) and cmd /K MyBatchFile.bat will start command prompt, execute the batch file and stay on the command prompt and will not exit. (Answer for question 2).

Categories : Windows

when I run Ant in cmd it is showing me error of build.xml not exist while I have build.xml file in my project folder
Thanks you all for your great help, I have resolved that error .. It was related to the path of the jar files , I provided incorrect path to the jars. This was line 70 : - <javac debug="true" destdir="${test.dest}" srcdir="${test.src}" target="1.7" classpath="${test.classpath}"> this is related to the path to the jars and in the top line of my file I did provided this path - D:All jars , while all required jars was not in this folder, now I updated the jar folder and it is working fine now.

Categories : Ant

Jenkins run batch command only at periodically build and not at polling build
If you have two sets of actions to do, then you might really want two different jobs. This is in fact how most of the projects I have setup run. There are both periodic (daily) and polled scm (commit) jobs. The heavy lifting (clean build, code analysis, extensive testing, scm metric gathering) is only done for the daily builds. The commit builds are kept light weight (incremental build, smoke tests).

Categories : Batch File

CLI php run php in command prompt
The "echo "test" line is working because echo is a bash command. You have to write your own php script, the run it by command line like this: $ php myscript.php In alternative, you can run php from your command line, then directly write or paste your script. Then press CTRL+D to run it. Remember the at the beginning and at the end. As third option, you can write a php script, putting in the first line this code: #!/usr/bin/php Obviously the php executable path must match the one in your system. This way, you can chmod +x the script, then run it directly like this: $ ./myscript.php The fourth option is the interactive shell: $ php -a Interactive shell php > echo 5+8; 13 [$ in front of commands means a command run by user]

Categories : PHP

How do I get my build agent to build a solution with external project references?
The best practice is to use project references for referencing other projects within the same solution. For references which are external to your solution you should use file references, and then check in the compiled DLL which is being referenced. Solution1 Project1 --> Project1.dll Project2 --> Project2.dll Solution2 ProjectA (references Project1.dll) ProjectB (references Project2.dll) References Project1.dll -- this DLL gets checked in here and ProjectA references from here Project2.dll -- this DLL gets checked in here and ProjectB references from here ProjectA.csproj <Reference Include="Project1.dll, Version=blah blah blah"> <HintPath>..ReferencesProject1.dll</HintPath> </Reference> ProjectB.csproj <Reference Include="

Categories : Tfs

Cabal after build command (Haskell build system)
Yes. Take a look at postInst and related types/operations. Distribution.Simple.UserHooks Here's a quick example, you can hoogle the relevant operations to figure out more. This executes the various .sh scripts, copies files etc. AFTER the cabal build. absoluteInstallDirs tells you where cabal is putting the other files, should you need it. Hope this helps! import Distribution.Simple import Distribution.Simple.LocalBuildInfo import System.Process import System.Exit main = defaultMainWithHooks fixpointHooks fixpointHooks = simpleUserHooks { postInst = buildAndCopyFixpoint } buildAndCopyFixpoint _ _ pkg lbi = do putStrLn $ "Post Install: " ++ show binDir -- , libDir) executeShellCommand "./configure" executeShellCommand "./build.sh" executeShellCommand $ "ch

Categories : Haskell

Run Command Prompt Code in Vb.net
Use the Process.Start API to do this System.Diagnostics.Process.Start( _ "Dism.exe", _ "/online /enable-feature /featurename:NetFX3 /All /Source:E:sourcessxs /LimitAccess") Note that you will possibly have to provide the full path to dism.exe

Categories : Vb.Net

Run a .bat file in command prompt using PHP
$test='main.bat $par'; exec('$test'); ... won't work. PHP only takes $variables in double quotation marks. This is bad practice also: $test = "main.bat $par";. Also windows takes backslashes instead of slashes which need to be escaped through another backslash in double quotes. Use one of these: $test = 'cmd /c C:wampwwwdemomain.bat ' . $par; or $test = "cmd /c C:\wamp\www\demo\main.bat {$par}"; run: echo shell_exec($test); Even more fails: Remove the pause from the end of your script. PHP does not get arround that automatically. Looking more at the batch file, I bet you don't even need it. Everything inside the batch file can be put into a PHP file. As Elias Van Ootegem already mentioned, you would need to pipe in STDIN to enter your option (1, 2) into the batch file.

Categories : PHP

Node.js Command Prompt
So I replicated the issue you've experienced so I've tried to simply point it to node.exe instead and seems to work pretty well ;)) Will probably end up using this as well!

Categories : Node Js

Command prompt use echoed text
You would want something like this: @echo off setlocal set target=conglomerated.tex del %target% 1>nul 2>nul echo documentclass{article} > %target% echo usepackage{pdfpages} >> %target% echo. >> %target% echo egin{document} >> %target% for /F "delims=" %%f IN ('dir /B /OD *.pdf') DO echo includepdf[pages=-]{%%f} >> %target% echo end{document} >> %target%

Categories : Windows

How to open command prompt from powershell
dir is built into PowerShell. It's an alias for Get-ChildItem. Open a PowerShell prompt from the Start Menu (All Programs --> Accessories if you're on XP, just search on higher versions of Windows), and just type dir and press Enter. It works similarly to the dir Command Prompt command. A COM object is definitely overkill. If you really, really need to use the Command Prompt within PowerShell, just run cmd. That will launch an instance of the Command Prompt in the current window.

Categories : Powershell

What are these types of VS2012 Command Prompt?
The different command prompts are shortcuts which set up paths and the like so you can build from the command line just by invoking 'cl.exe' or 'link.exe' and other associated tools. 2-5 are self explanatory - if you run cl.exe blah.cpp then the version of cl [and associated tools]invoked will be different for each window: 2) compiler that generates arm code 3) 32 bit compiler that generates 64 bit code 4) 32 bit compiler that generates 32 bit code 5) 64 bit compiler that generates 64 bit code If you don't compile from the command line just use number 1 and that will set up non platform specific tools - such as tf.exe. If you do compile from the command line, choose from 2-5 depending on what platform you're targeting [and in the case of 2 or 4 what bit'ness of Windows you're current

Categories : Visual Studio 2012

Find a program and run it through command prompt
Yes you can do that of course, but it involves searching for the file recursively in every folder of your hard drive partition(s). Another way is to add the folder containing the .exe you want to execute in the PATH environment variable but it's not recommended to add every program you own to the PATH. (It's meant to remain quite small in size).

Categories : Windows

How to start Gvim from Command Prompt?
This is because gvim.exe is not in your PATH list. If you know which directory gvim.exe resides, add this directory to your PATH list. This can be done by typing the following in an Explorer address bar: Control PanelSystem and SecuritySystem Then press Advanced system setings, then Environment Variables. The PATH is a list of directories separated by a ;.

Categories : Vim

How to make a for loop in command prompt?
I figured it out! For anyone curious, the loop is: for %a in (0 1 2 3 4 5 6 7 8 9 10 11 1 2 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39) do DebayerGPU.exe -demosaic DFPD_R -CPU -pattern GRBG -i single%a..pgm -o si ngle%a.ppm

Categories : Image

Get user Input in command prompt
To get a user Input : set /p pathName=Enter The Value:%=% @echo %pathName% p.s. this is also valid : set /p pathName=Enter The Value:

Categories : Batch File

Use Java Servlets on Command Prompt
To be accessible, a servlet must be mapped to a URL pattern. In servlet 3.0 (tomcat 7 only), it's simply done by annotating the servlet with @WebServlet("/somePath") In previous versions of the spec, you must declare the servlet in the WEB-INF/web.xml file, and also declare its mapping using a <servlet-mapping> element. So if the pattern you choose is /somePath, for example, the URL will be http://localhost:8080/myWebApp/somePath If the pattern is *.foo you can use any URL in the web app contet (/myWebApp in my example) that ends with .foo. This is stuff that is covered by every servlet tutorial. Pick one (preferrably something at oracle), and read it.

Categories : Tomcat

Prompt for computer name run the command "SMC -stop"
Your script will run the command on the local computer, not on the remote computer. For executing a command on remote computers via VBScript try WMI: computer = "..." Sub RunRemoteCommand(cmd, host) Set wmi = GetObject("winmgmts://" & host & "/root/cimv2") rc = wmi.Get("Win32_Process").Create(cmd, , , pid) If rc <> 0 Then WScript.Echo "Running '" & cmd & "' on " & computer & " failed (" & rc & ")." WScript.Quit 1 End If End Sub RunRemoteCommand "smc -stop", computer WScript.Sleep 15000 RunRemoteCommand "smc -start", computer You can prompt for a computer name by using the InputBox function: computer = InputBox("Enter computername:") It might be simpler to run a batch script via PsExec instead, though: C:>psexec \computer -c

Categories : Vbscript

What does the prompt "[master +1 ~0 -0 !]>" mean when using Git command line?
This represents the number of files: added (+) modified (~) deleted (-) conflict (!) (from alisa's answer) You can see a powershell version of that prompt here. Those represent the status before commit (added means added to the index, or 'staged') Here is a more complete version of that prompt, which also display the number of commits ahead or behind an upstream repository. When you do some changes and commit them, your state is 1 commit ahead of remote. It is very useful to know how many commits you have unpushed.

Categories : GIT

opening a raw with imagej in command prompt
Using the macro recorder (Plugins > Macros > Record...) in ImageJ, your described procedure produces the following code: run("Raw...", "open=/path/to/myfile.bsv image=8-bit width=4000 height=2672 offset=0 number=40 gap=0 little-endian"); run("Save All"); If you save this macro file e.g. as mymacro.ijm, you should be able to run ImageJ with the macro option like this (depending on your platform): -macro mymacro.ijm Hope that helps.

Categories : Image

Get osql output in command prompt
I believe you might be running into two separate problems: Set the FileName and Arguments properties like this: p.StartInfo.FileName = "osql.exe"; p.StartInfo.Arguments = @"-E -S @Server -d @Database -T -n -i ""@SqlFile""" .Replace("@Server", ConfigurationManager.AppSettings["Server"]) .Replace("@Database", Path.GetFileNameWithoutExtension(DB)) .Replace("@SqlFile", sqlFilePath); You might also encounter an encoding issue. make sure that you save you .sql file by using the Unicode Encoding (codepage 1200) (here's a question which describes the issue).

Categories : C#

How do I use a Java project that requires a 1.7 compliance level on an Android project build path?
Try to clean your project, and fix android properties. Link here and here

Categories : Android

© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.