Cov txheej txheem:

Kuv yuav ua li cas khiav Java program tom qab kev teeb tsa?
Kuv yuav ua li cas khiav Java program tom qab kev teeb tsa?

Video: Kuv yuav ua li cas khiav Java program tom qab kev teeb tsa?

Video: Kuv yuav ua li cas khiav Java program tom qab kev teeb tsa?
Video: Tsis Muaj Peev Xwm Yuav Ua Li Cas 2024, Kaum ib hlis
Anonim

Yuav ua li cas khiav java program

  1. Qhib lub qhov rais hais kom ua thiab mus rau cov npe uas koj khaws cia java program (MyFirstJavaProgram. java ua ).
  2. Ntaus 'javac MyFirstJavaProgram. java ua 'thiab nias nkag mus rau sau ua ke koj code .
  3. Tam sim no, ntaus ' java ua MyFirstJavaProgram ' khiav koj qhov kev pab cuam .
  4. Koj yuav tuaj yeem pom cov txiaj ntsig luam tawm ntawm lub qhov rais.

Raws li txoj cai, Kuv yuav nruab thiab khiav Java li cas?

1. Yuav ua li cas rau nruab JDK ntawm Windows

  1. Kauj ruam 0: Un-Install Older Version(s) ntawm JDK/JRE.
  2. Kauj ruam 1: Download JDK.
  3. Kauj ruam 2: Nruab JDK.
  4. Kauj Ruam 3: suav nrog JDK's "bin" Directory hauv PATH.
  5. Kauj ruam 4: Txheeb xyuas qhov kev teeb tsa JDK.
  6. Kauj ruam 5: Sau qhov Hello-World Java Program.
  7. Kauj ruam 6: Sau thiab khiav qhov Hello-World Java Program.

Tsis tas li ntawd, kuv puas xav tau JRE yog tias kuv muaj JDK? Koj tsis muaj xav tau rau nruab JRE ces, JDK feem ntau muaj ob qho tib si kev txhim kho & kev khiav haujlwm ib puag ncig hauv nws. Yog koj nruab JDK ces JRE yuav nyob rau hauv nws thiab ntsia tau nrog JDK . java ua > koj xav tau rau muaj JDK qe xa muaj JRE hauv nws. rau ua java filename koj xav tau nkaus xwb JRE.

Kuj kom paub, Kuv yuav ua li cas khiav Java program los ntawm kab hais kom ua hauv Windows 10?

2 Teb

  1. Tshawb xyuas koj txoj hauv kev javac ntawm Windows siv Windows Explorer C:Program FilesJavajdk1. 7.0_02in thiab luam qhov chaw nyob.
  2. Mus rau Control Vaj Huam Sib Luag. Environment Variables thiab Ntxig qhov chaw nyob ntawm qhov pib ntawm var.
  3. Kaw koj cov lus txib tam sim thiab rov qhib nws, thiab sau cov cai rau kev suav sau thiab ua tiav.

Kuv yuav ua li cas thiaj paub tias Java raug teeb tsa?

Hauv Search bar, ntaus Control Vaj Huam Sib Luag. Nyem Programs. Yog tus Java icon tam sim no, ces Java tau nruab.

Hauv Windows, peb tuaj yeem pom nws hauv Daim Ntawv Thov:

  1. Nias lub Start Button.
  2. Scroll cia hauv daim ntawv thov rau J.
  3. Qhib Java folder.
  4. Nyem Txog Java.

Pom zoo: