Java Keytool - how do I open and keep it open? - keytool

When I try and run keytool (and I have found many, many versions of it) I cannot get it to stay open, it seems to run something then close.
Heeellp!!
I am using Eclipse on Windows 7 64bit.

Keytool is just a utility program to assist in creation/viewing of keystores/private/public keys.
So it just executes a command from the command prompt.
Run the following command to see your options:
keytool -help
Read here for instructions on how to use it: Java Keytool

Related

Can't find Command Prompt in Terminal?

Trying to choose Command Prompt in the Terminal however I can only see Zsh, bash, and Javascript bug terminal.... I've gone in to Select Default profile as suggested in similar threads I've found and still can't find it?
How do i get Command Prompt in there?
Note: I don't have Powershell either, and I'm on a Mac
If you are referring to cmd.exe, that is a windows only program and you won't be able to use it on MacOS.
Terminal is the MacOS Equivalent and can run shells such as bash and zsh as you noted.

cant open GHCi with ghci command in command prompt

I am about to learn Haskell, (maybe, if I can get the program to work) I am working along with the book,"Learn you a Haskell for great good". I did some DOS in 80's a few weeks of COBAL in the 90's, so absolute noob.
I have loaded chocolatey into powershell in windows 10 as an administrator, that worked, entered choco install haskell-dev haskell-stack. That worked. ran refreshenv, that worked. then rebooted computer, went to command prompt and entered ghci [return] and is says no file found. then tried installing -dev and -stack with --force command, and that worked in case didnt take the first time. went to command prompt ghci nothing. reboot, command prompt then ghci [return] cant find file. ugh. any ideas?
My Haskell notes say a fresh installation goes like this:
Install chocolatey as administrator. There should be no errors returned. Run 'choco' to ensure that the installation worked.
Install stack
choco install haskell-dev
refreshenv
On Windows, the new compiler is stored here: C:\ProgramData\chocolatey\lib\ghc\tools\ghc-8.10.1\bin.
If it does not work as the default compiler, it could be masked by an earlier entry in the path list.
When you run which, PowerShell get-command what does it return? What is your path set to?
If no joy, you could search for an online Haskell REPL. Try this one:
https://replit.com/languages/haskell. You can enter code on the left hand side, and run it, or start the REPL with ghci on the right hand side. It's a bit clunky by comparison to a full IDE, but perhaps enough to get started with.

ionic install fails on fsevents on Windows

I have tried to install ionic on Windows but installation has failed. What should I do?
I have tried more than 20 times but still I got the same problem.
Here I have attached the screenshot for this
Entered commands:
npm install -g cordova
npm install -g ionic
Note: this one windows server machine
My guess is that the NPM global path has not been added to your windows path.
These are the steps to try:
First verify that the command just installed can run. The output contains the full path to the command installed, just copy and paste it to the command line. In your case it might be something like this %APPDATA%\Roaming\npm\iconic -v
Lets assume that works. That means that the command was successfully installed and will run, now we need to add it to your PATH so you can run it from the command line.
Next, Press Windows key and type "path" and select "Edit environment variables for your account". From here. Add or append the path %APPDATA%\Roaming\npm to your PATH variable, and save the results.
Once it is on your PATH you can run it from any command shell window.
Next, start a new command shell (e.g., Windows+R, cmd, Enter) and then type the command iconic -v. Viola, it should work without requiring the full path to the script.
I'm doing most of this from memory so hopefully it's correct. But if it needs some tweeks, let me know and I'll update the answer.
For completness, this install didn't actually fail. The lines with fsevents are warnings. The fsevents package is only designed to work on Mac Unix so these warnings can be safely ignored.
As Suraj Rao mentioned, also see Nodejs cannot find installed module on Windows?.

cURL command failure

I am attempting to use curl commands in a batch file I am writing. I have downloaded the latest curl executable and run it but I cannot use the command "curl" What steps should I take to use it correctly? The Command line still says
"curl is not recognized as an internal or external command, able program or batch file"
I am not interested in doing anything else with cURL
You will have to add the directory containing curl.exe to your path, probably the bin directory.
In Windows XP you can do this by:
Right click your computer and choose properties
Click the advanced tab
Click environmental variables
Find path in the list and add the path to your curl directory
Steps to install curl in windows
Install cURL on Windows
There are 4 steps to follow to get cURL installed on Windows.
Step 1 and Step 2 is to install SSL library.
Step 3 is to install cURL.
Step 4 is to install a recent certificate
Step One: Install Visual C++ 2008 Redistributables
Download Visual C++ 2008 Redistributables.
Step Two: Install Win(32/64) OpenSSL v1.0.0k Light
Also from http://www.shininglightpro.com/products/Win32OpenSSL.html
For 64bit systems
Win64 OpenSSL v1.0.0k Light
For 32bit systems
Win32 OpenSSL v1.0.0k Light
Step Three: Install cURL
Depending on if your system is 32 or 64 bit, download the corresponding** curl.exe.**
For example, go to the Win64 - Generic section and download the Win64 binary with SSL support (the one where SSL is not crossed out).
Visit http://curl.haxx.se/download.html
More specific Link: http://curl.haxx.se/latest.cgi?curl=win64-ssl-sspi
Copy curl.exe to C:\Windows\System32
Step Four: Install Recent Certificates
Do not skip this step.
Download a recent copy of valid CERT files from http://curl.haxx.se/ca/cacert.pem
Copy it to the same folder as you placed curl.exe (C:\Windows\System32) and rename it as curl-ca-bundle.crt
If you have already installed curl or after doing the above steps, add the directory where it's installed to the windows path:
1 - From the Desktop, right-click My Computer and click Properties.
2 - Click Advanced System Settings .
3 - In the System Properties window click the Environment Variables button.
4 - Select Path and click Edit.
5 - Append ;c:\path to curl directory at the end.
5 - Click OK.
6 - Close and re-open the command prompt
Looks like its not on your path - try opening a new console window.
You need to add it to the path environment variable. If you want to do it through batch then you can update the reg key it stores the directories in with curl.exe like this:
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v Path /t REG_EXPAND_SZ /d "curlpath\curl.exe";%path%" /f
Or if the exe isn't dependent on any other files you could copy it to of paths existing directories like C:\Windows\system32.
Hope this helps!

Two problems with sbt in cygwin / vista

I am using cygwin 1.77 on windows vista.
I'm facing problems with the output from sbt in the shell.
Some relevant environment vars:
TERM=cygwin
CYGWIN=server
LANG=C.UTF-8
(1) When I type sbt test the shell contains a lot of unprintable characters:
How can I fix this ?
My sbt shell script looks like this:
dir=`dirname $0`
stty -icanon min 1 -echo > /dev/null 2>&1
java -Djline.terminal=jline.UnixTerminal -Xmx512M -jar
`cygpath -w $dir`/sbt-launch-0.7.4.jar "$#"
stty icanon echo > /dev/null 2>&1
(2) The sbt command cannot find the scalatest jar & I don't know how to configure it to download it via ivy. It works if I drop the jar into the lib folder.
Regarding 1):
The way the Cygwin console works is that there's a part of the Cygwin DLL that maps Unix terminal control sequences to Windows console API calls. Since that terminal emulation is part of the Cygwin DLL, it is not available to non-Cygwin programs such as the Java runtime. Instead, java will be talking directly to the Windows console, which doesn't understand escape sequences. Hence they appear directly on screen.
There are a few ways you could address this:
Tell Java/Scala to use the Windows console API instead of Unix control sequences. I guess removing the -Djline.terminal=jline.UnixTerminal option would do that.
Set the CYGWIN=tty option. With that, programs invoked in the Cygwin console have their I/O connected to a "pseudo terminal" (pty) device instead of being connected directly to the console window. This makes the terminal emulation features available to non-Cygwin programs, but it means that programs that use the Windows console API will no longer work correctly.
Use one of Cygwin's other terminal emulators: mintty, xterm, rxvt(-unicode). These offer better terminal emulation and more sensible user interfaces than the default console, but again at the cost of not supporting programs that use the Windows console API.
(Btw, the CYGWIN=server option is obsolete; the feature that it enabled is always on anyway.)