Tabbas, ga tsarin da aka tsara na dogon labarin bisa ga buฦatarku.
Samar da ษan taฦaitaccen haske game da manufar echo_home, wannan rubutun na nufin bayyana yadda ake echo_home a cikin Windows cmd. Tsarin sake maimaitawa gida yana tattare da samar da kayan aiki wanda galibi ana amfani da shi don gyara kuskure wanda kuma ana iya haษa shi cikin rubutun kuma.
Amfani da echo_home a Window CMD
Umurnin Umurnin Windows, wanda aka sani da cmd.exe ko cmd, yana ba masu amfani damar yin hulษa tare da tsarin aiki ta layin umarni. Yana ba da umarni da fasali iri-iri, amma wannan jagorar da farko tana mai da hankali kan echo_home a cikin Windows cmd.
Don aiwatar da aikin echo_home, kuna buฦatar saita shi. Windows cmd ba shi da aikin echo na gida daidai kamar Linux. Madadin haka, muna amfani da umarnin "echo% USERPROFILE%". Wannan umarnin yana maimaita hanyar jagorar mai amfani na yanzu, wanda yayi daidai da echo_home a cikin tsarin Unix.
echo %USERPROFILE%
Yanke lambar Echo_HOME
Da farko da fahimtar 'echo,' shine, a zahiri, umarni mai sauri a cikin Windows (cmd) wanda ake amfani dashi da farko don nuna rubutu ko saฦo akan allo. Bugu da ari, 'USERPROFILE' wani yanayi ne mai sauyin yanayi a cikin Windows wanda ke adana hanyar bayanan bayanan mai amfani na yanzu.
A cikin lambar, alamar kaso (%) an naษe ta da USERPROFILE shine don tantance cewa canjin yanayi ne. Ta hanyar aiwatar da umarnin da ke sama a cikin Windows cmd, zai nuna hanyar zuwa adireshin mai amfani na yanzu.
Fahimtar Rubutun Windows CMD da Java
Windows cmd tsoho ne mai fassarar layin umarni don tsarin aiki na Windows. Yana iya aiwatar da fayil ษin tsari ko rubutun, da ayyuka na sarrafa kansa waษanda ke da mahimmanci a fagen haษakawa. Kayan aiki ne mai ฦarfi wanda masu haษakawa ke amfani da su don ฦaddamar da rubutun ko shirye-shirye da kuma magance matsala a cikin Windows.
A daya bangaren kuma, Java wani yare ne na shirye-shiryen da ake amfani da shi wajen samar da hadaddun aikace-aikace. Duk da yake ba a yawanci amfani da shi tare da cmd don rubutawa saboda nau'ikan shirye-shirye daban-daban, iliminsa yana da fa'ida kuma yana iya taimakawa sosai wajen fahimtar yadda tsarin ke aiki a ฦaramin matakin.
Haษa Shirin Java a cikin Windows CMD
Ana amfani da umarnin 'javac' don haษa shirye-shiryen Java, yayin da 'java' ake amfani da su don aiwatar da su. Don yin waษannan ayyuka, dole ne a shigar da kayan haษaka Java (JDK) kuma a saita masu canjin yanayi. A ฦasa akwai matakan tattara shirin Java a cikin cmd.
- Kewaya ta amfani da cmd zuwa directory inda fayil ษin .java yake.
- Yi amfani da umarnin 'javac' don haษa shirin ku. Sauya 'MyProgram.java' tare da ainihin sunan fayil ษin ku.
javac MyProgram.java
- Idan babu kurakurai a cikin lambar ku, cmd zai ฦirฦiri sabon fayil na 'MyProgram.class' a cikin directory iri ษaya.
- Kuna iya amfani da umarnin 'java' don aiwatar da shirin ku. Sauya 'MyProgram' da sunan ajin wanda ya ฦunshi hanyar 'babban' ku.
java MyProgram
Sakamakon shirin Java ษinku zai yi ฦara akan allon cmd. Haษin kai da fahimtar waษannan layin umarni da shirye-shiryen Java suna taka muhimmiyar rawa wajen haษaka software da sarrafa tsarin.