Cov txheej txheem:

Kuv yuav sau Java li cas?
Kuv yuav sau Java li cas?

Video: Kuv yuav sau Java li cas?

Video: Kuv yuav sau Java li cas?
Video: Yog zoo ces lawv yuav lawm 11/13/2018 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 ua program (MyFirstJavaProgram. java ua ).
  2. Ntaus 'javac MyFirstJavaProgram. java ua 'thiab nias nkag mus rau sau ua ke koj kod.
  3. Tam sim no, ntaus ' java ua MyFirstJavaProgram ' kom khiav koj qhov program.
  4. Koj yuav tuaj yeem pom cov txiaj ntsig luam tawm ntawm lub qhov rais.

Hauv qhov no, kuv yuav sau Java li cas hauv Windows 10?

Yuav ua li cas khiav Java program hauv Windows 10

  1. Kauj ruam 1) Mus saib lub vev xaib oracle thiab tom qab ntawd nyem rau ntawm rub tawm.
  2. Kauj ruam 2) Tam sim no, nyob rau nplooj ntawv tom ntej, nyem rau ntawm Txais Daim Ntawv Pom Zoo thiab rub tawm cov ntaub ntawv.exe ntawm JDK rau windows.
  3. Kauj ruam 3) Tom qab rub tawm cov ntaub ntawv, pib lub installation txheej txheem los ntawm txhaj rau ntawm cov ntaub ntawv.

Ib sab saum toj, koj puas tuaj yeem suav Java program hauv notepad? Notepad ++ yog cov ntawv nyeem dawb thiab qhov chaw code editor. Kab lus no qhia koj hauv yuav sau li cas thiab khiav Java program siv Notepad ++. Nws yog ib txoj hauv kev zoo rau sau ua ke thiab khiav koj Java program yooj yim thiab txhua lub sijhawm, tsis tas yuav mus rau kev siv cov software nyuaj xws li dab noj hnub lossis NetBeans.

Thiab cov lus nug yog, dab tsi compile txhais tau tias Java?

Sau ntawv a Java qhov kev pab cuam txhais tau tias noj cov ntawv programmer-nyeem tau hauv koj cov ntaub ntawv program (tseem hu ua qhov chaws) thiab hloov nws mus rau bytecodes, uas yog cov lus qhia hauv platform-ywj siab rau Java VM.

Kuv yuav ua li cas khiav Java ntaub ntawv hauv Terminal?

Tsuas yog ua raws li cov kauj ruam yooj yim no:

  1. Los ntawm Terminal nruab qhib jdk sudo apt-mus nruab openjdk-7-jdk.
  2. Sau ib qho java program thiab txuag cov ntaub ntawv raws li filename.java.
  3. Tam sim no los suav siv cov lus txib no los ntawm lub davhlau ya nyob twg javac filename. java ua.
  4. Txhawm rau khiav koj qhov program uas koj nyuam qhuav tso ua ke ntaus cov lus txib hauv qab no hauv lub davhlau ya nyob twg: java filename.

Pom zoo: