Cov txheej txheem:

Kuv yuav ua li cas khiav Java program hauv Windows 10 siv cov lus hais kom ua?
Kuv yuav ua li cas khiav Java program hauv Windows 10 siv cov lus hais kom ua?

Video: Kuv yuav ua li cas khiav Java program hauv Windows 10 siv cov lus hais kom ua?

Video: Kuv yuav ua li cas khiav Java program hauv Windows 10 siv cov lus hais kom ua?
Video: Tsis Muaj Peev Xwm Yuav Ua Li Cas 2024, Hlis ntuj nqeg
Anonim

2 Teb

  1. Xyuas koj javac txoj hauv Windows siv Windows Explorer C: Program Cov ntaub ntawv Java jdk 1. 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 lus txib thiab rov qhib nws, thiab sau cov ntawv code rau kev sau thiab ua tiav.

Tsis tas li ntawd, kuv yuav ua li cas khiav Java program hauv Windows 10 hais kom ua sai?

Txheeb xyuas koj qhov teeb tsa Java Installation C: tsav -> cov ntaub ntawv program -> java ua -> jdk 1.8. 0_71 -> bin, lib thiab idk folders muaj nyob rau hauv qhov system. Tam sim no khiav tus Java siv cov Command prompt . Khiav cov lus txib thiab hom Java -version thiab nias lub pob nkag.

Qhov thib ob, Kuv yuav ua li cas khiav Java ntawm Windows? Txhawm rau khiav Java los ntawm Command Prompt, koj yuav tsum ntxiv Java rau koj qhov chaw ib puag ncig hloov pauv:

  1. Xaiv Pib -> Computer -> System Properties -> Advanced system settings -> Environment Variables -> System variables -> PATH.
  2. Prepend C:Program FilesJavajdk1.
  3. Nyem OK peb zaug.

Tom qab ntawd, lo lus nug yog, Kuv yuav ua li cas khiav Java program los ntawm kab hais kom ua?

Yuav ua li cas khiav java program

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

Koj ua li cas program hauv Java?

Cov kauj ruam yooj yim los tsim qhov Hello World program yog: sau qhov program hauv Java, sau cov lej code, thiab khiav qhov program

  1. Sau Java Source Code.
  2. Txuag cov ntaub ntawv.
  3. Qhib lub qhov rais Terminal.
  4. Java Compiler.
  5. Hloov cov directory.
  6. Sau Koj Qhov Kev Pabcuam.
  7. Khiav qhov Program.

Pom zoo: