Java Reference
In-Depth Information
Ifallgoeswell,youshouldseea HelloWorld.class fileinthecurrentdirectory.
Nowexecute java HelloWorld torunthisclassfile's main() method.Don'tspe-
cifythe“ .class ”fileextensionor java willcomplain.Youshouldobservethefol-
lowing output:
Hello, world!
Congratulations! YouhaverunyourfirstJava-basedapplication. You'llhaveanop-
portunity to run more applications throughout this topic.
Installing and Working with NetBeans 7
Forsmallprojects,it'snobigdealtoworkatthecommandlinewithJDKtools.Because
you'llprobablyfindthisscenariotedious(andevenunworkable)forlargerprojects,you
should consider obtaining an Integrated Development Environment (IDE) tool.
Three popular IDEs for Java development are Eclipse ( ht-
tp://www.eclipse.org/ ) , IntelliJ IDEA ( http://www.jetbrains.com/
idea/ ) ,whichisfreetotrybutmustbepurchasedifyouwanttocontinuetouseit,and
NetBeans( http://netbeans.org/ ).IfocusontheNetBeans7IDEinthissection
because of its JDK 7 support. (IntelliJ IDEA 10.5 also supports JDK 7.)
Note For a list of NetBeans 7 IDE enhancements that are specific to JDK 7,
check out the page at http://wiki.netbeans.org/NewAndNote-
worthyNB70#JDK7_support .
ThissectionshowsyouhowtoinstalltheNetBeans7IDE.Itthenintroducesyouto
this IDE while developing HelloWorld .
Note NetBeansismorethananIDE.It'salsoaplatformframeworkthatletsdeve-
lopers create applications much faster by leveraging the modular NetBeans architec-
ture.
Installing NetBeans 7
Pointyourbrowserto http://netbeans.org/downloads/ andperformthefol-
lowing tasks:
1. Select an appropriate IDE language (English is the default).
2. Select an appropriate platform (Windows is the default).
3. ClicktheDownloadbuttonunderneaththenext-to-leftmost(JavaEE)columnto
initiatethedownloadprocessfortheappropriateinstallerfile.Ichosetodown-
Search WWH ::




Custom Search