Anda di halaman 1dari 7

HowtoSetupEclipseandCreateaJavaSimpleProgram

Hello!WelcometoJavaProgrammingfor8thgraders.Asaprerequisite,youmusthavecompletedComputerApplicationsorpreviouslyapprovedcoursework.
DownloadingEclipseandJavaiseasyandfree.Theseinstructionswillwalkyouthroughthisprocess.Afterinstallingtheseprogramsyouwillbeabletobegin
programming.Asimpleprogrammingexampleisprovidedattheendoftheseinstructionsinordertogetyoustarted.

WhyuseJava?
Javaisthemostpopularandscalableprogramminglanguageinusetodayandwillbecoveredextensivelyforthedurationofthiscourse,especiallyon
exams.SinceJavahasbeenaroundforsolong,almostanyquestionimaginablehasalreadybeenasked,answered,indexed,criticizedandperfectedviatheinternet.
Javaisrunningjustabouteverywhereyoucanthinkof.OnceyoubecomefluentinJavatherewillbeanincredibleamountofemploymentopportunitiesforyou
becauseofJavaswidespreaduse.ForexampleallAndroidAppsarewritteninJava,andsothiscoursewillallowyoutocreatethatappyouvealwaysdreamedof.

Theseinstructionsapplyto:
Platforms:
Windows2008Server,Windows7,Windows8,WindowsXP,WindowsServer2012,WindowsVista,Windows10
JavaVersions:
7.0

Prerequisites:
ComputerwithWindows32bitor64bitoperatingsystem
JavaSDK7.0
ComputerApplications
Nopriorprogrammingskillsneeded
Timeneeded:20minutes

Resources:
https://netbeans.org/kb/articles/learnjava.html
https://docs.oracle.com/javase/tutorial/

DownloadandInstallEclipse:

STEP1:
Gotothefollowinglink
https://eclipse.org
.

STEP2:
ClickonthedownloadbuttoncircledinFigure1below.

Figure1:Eclipsehomepage

STEP3:
Clickontheappropriatedownloadlink,circledinFigure2,whichcorrespondstoyoursystem.

Figure2:Eclipsedownloadpage


STEP4:
ClickonthefinaldownloadbuttoncircledinFigure3toinitiatedownload.

Figure3:Finaldownloadbutton.

Figure4:Keepdownload

STEP5:
Clickontheeclipsefilethatwasjustdownloaded.

Figure5:Clickeclipsefile

STEP6:
Clickontherunbuttontostarttheeclipseinstaller.

Figure6:Runeclipseinstaller

STEP7:
ClickonEclipseIDEforJavaDevelopers.

Figure7:EclipseIDEinstaller

STEP8:
Clickontheinstallbuttontostartinstallingeclipse

Figure8:Install

STEP9:
ClickonLaunchtolauncheclipse

Figure9:Launch

EclipseProjectSetUp

STEP10:
Clickoktoselectaworkspace.

Figure10:Workspace

STEP11:
ClicktheXnexttowelcometoremovetheintroductionpage.

Figure11:RemoveWelcome

STEP12:
ClickonFile>New>JavaProject.

Figure12:NewProject

STEP13:
TypeHelloWorldintheprojectnametextbox.

Figure13:ProjectName

STEP14:
Clickonfinishtocreatetheproject.

Figure14:ProjectFinish

STEP15:
ClickonFile>New>Class.

Figure15:Class

STEP16:
TypeHelloWorldinthenametextbox.

Figure16:Classname

STEP17:
Clickonfinishtocreateanemptyjavafile.

Figure17:FinishClass

WritingJavaProgram

STEP18:
Typeinpublicstaticvoidmain(String[]args)inbetweenthetwobracesfollowedbytwobracesonthetwonewlines.

Figure18:Main

STEP19:
Betweenthetwobracesthatweretypedinstep19,typeSystem.out.println("Hello,World").

Figure19:Print

STEP20:
Presstheplaybuttontorunthejavafilethatwasjusttyped.

Figure20:Run

STEP21:
Pressoktosaveandlaunchthejavafilethatwastyped.

Figure21:SaveandLaunch

STEP22:
LookatthebottomofeclipsetoseethattheprogramhasoutputtedHello,World.

Figure22:Output

Anda mungkin juga menyukai