Become An Awesome Java Professional [w/ subs]



00:00:06 – before we start or not you need to learn
00:00:15 – the java programming language i will
00:00:17 – give you a very brief introduction to
00:00:19 – the language itself its history and some
00:00:22 – very basic minds we will talk to you
00:00:26 – about the origins of the java
00:00:28 – programming language how to setup the
00:00:31 – our development and winding your machine
00:00:33 – and also introduce you to some of the
00:00:35 – core java commands the java programming
00:00:40 – language was created at Sun Microsystems
00:00:42 – which is not oracle the cortical had
00:00:45 – acquired this company programming
00:00:48 – languages create in 1991 but the first
00:00:51 – public release just called Java 1.0 came
00:00:55 – out in 1995 java gave us promise of that
00:01:00 – once on anywhere
00:01:02 – let's see what that means for fall java
00:01:06 – is an object-oriented programming
00:01:07 – language
00:01:08 – we'll see what that means a little later
00:01:12 – in our course java is platform
00:01:16 – independent which means that if you
00:01:18 – write a Java program and compile it the
00:01:22 – same compiled output can be used and run
00:01:26 – on many different operating systems do
00:01:29 – not have to change it you do not have to
00:01:32 – recompile the cord java is an
00:01:35 – interpreted language and what the java
00:01:37 – compiler does is it translates the java
00:01:40 – source code to what we called bytecode
00:01:43 – the bytecode is a kind of intermediate
00:01:46 – program cord is integrated and run when
00:01:50 – the java virtual machine runs before the
00:01:53 – introduction of Java C and C++ with the
00:01:57 – programming language is used most
00:02:00 – commonly develops software now when you
00:02:03 – write C++ sport or C or C++ cord it is
00:02:08 – first compiled into machine language
00:02:12 – to compile it for example on a windows
00:02:15 – computer you will need windows c++
00:02:18 – compiler to compile it on aux platform
00:02:21 – you will need a unity + + compiler which
00:02:24 – would convert it to the corresponding
00:02:27 – UNIX machine code etc and then that wild
00:02:31 – code is executed
00:02:33 – another problem is it's not just a
00:02:35 – matter of compilation your source code
00:02:38 – itself the aps the application
00:02:41 – programming interface but very this
00:02:44 – presented us with two main problems for
00:02:47 – fall
00:02:48 – let us say that you are a software
00:02:50 – vendor now if you have to distribute
00:02:54 – your software for people platforms then
00:02:58 – you would have to compile software and
00:03:01 – make people packages one for windows and
00:03:04 – for unix and one for any other platform
00:03:07 – that you want to target the other
00:03:11 – problem that post was that the c++
00:03:15 – programming interfaces are not uniform
00:03:19 – and come across platforms so there are
00:03:21 – certain calls which are very specific to
00:03:24 – windows are the specific to unix
00:03:27 – platforms and therefore you could not
00:03:30 – even mending a single chords to target
00:03:33 – people platforms
00:03:35 – now let us see how r tries to solve this
00:03:38 – problem now this is for the java
00:03:41 – compliation process takes place you have
00:03:44 – java program let's say it's called my
00:03:48 – program dot java it is compiled by the
00:03:52 – other compiler which translates into
00:03:55 – what we caught the bytecode this is the
00:03:58 – compiled code and it has a part class
00:04:02 – extension you can distribute this my
00:04:07 – program got class file and expected to
00:04:10 – run exactly the same be on multiple
00:04:14 – platforms
00:04:16 – our virtual machine on each of this
00:04:18 – platform us it interprets the c-class
00:04:22 – files dynamically translates it to the
00:04:24 – corresponding machine code for that
00:04:26 – platform and execute it
00:04:28 – the end result as far as the user is
00:04:31 – concerned is exactly similar or very
00:04:35 – similar
00:04:37 – so let us see this once again we have
00:04:40 – java program let's say our standard
00:04:43 – introductory program which is the hello
00:04:45 – world program and we call this
00:04:49 – helloworld dot java it's compiled into
00:04:53 – java bytecode and let's see the out of
00:04:56 – that is called helloworld dot class now
00:05:00 – this my cord is distributed on a windows
00:05:03 – machine on a UNIX machine or Macintosh
00:05:06 – change the corresponding JPM's on each
00:05:10 – of these millions it would separate the
00:05:12 – same class file the same bytecode and
00:05:16 – reduce the same output on all three
00:05:19 – machines let us look at some of the
00:05:21 – common terminology associated with java
00:05:24 – one of the most common terms and the
00:05:27 – term you have already heard during
00:05:29 – session also is called a vm we chance
00:05:33 – for the Java Virtual Machine now this is
00:05:36 – an infrastructure program which
00:05:38 – interprets the bytecode which is the
00:05:41 – compiler output of any java program and
00:05:45 – runs it on the specific platform
00:05:47 – you will also hear a term called gk or
00:05:51 – GRE DK stands for jarred development
00:05:55 – toolkit is the java environment or the
00:05:59 – java infrastructure used by developers
00:06:02 – to create our programs are our software
00:06:05 – the Java Runtime environment convince
00:06:10 – the Java Virtual Machine and some other
00:06:13 – liabilities which are necessary to run
00:06:15 – the java programs when you install GDK
00:06:20 – on your system
00:06:21 – I dr e is automatically installed but
00:06:25 – you do not need to install the JDK if
00:06:27 – you are just a consumer of java programs
00:06:29 – if you're not develop and the term you
00:06:33 – hear very often associated with our
00:06:36 – programs is dark which stands for java
00:06:40 – archive but this is a packaging utility
00:06:45 – to package multiple java class funds
00:06:48 – into a common collection so that a
00:06:52 – single file can be distributed to be
00:06:55 – done on the platform java archive is
00:06:59 – very very similar to as a party so just
00:07:02 – because the park i've been created by
00:07:04 – people finds a java are I've can also
00:07:07 – contain multiple files which typically
00:07:11 – consists of compiled it cord the job
00:07:15 – class files and images once in a while
00:07:19 – you will also see that would even the
00:07:21 – source code in the same job which is
00:07:24 – quite common when you download jobs of
00:07:28 – one source software
00:07:31 – when you get a java program you compile
00:07:35 – it with the concord java see Josie is
00:07:38 – automatically available to you if you
00:07:40 – have installed the JDK on your system
00:07:43 – and once you have compile the code you
00:07:48 – can run it with a command called Java
00:07:51 – Java is available to you even if you
00:07:57 – have installed grd but the GRE does not
00:08:01 – view the Java Sea command only comes
00:08:04 – with the JD likes into you you get an
00:08:10 – archive of java class files with the jar
00:08:14 – command you say job- CBF you give name
00:08:20 – to the job and you also specify all the
00:08:24 – class once that you want package to in
00:08:26 – this file you can extract the jar files
00:08:30 – using a job minus f DF command and you
00:08:34 – can also execute programs in a jar by
00:08:37 – the java minus josh and the dot name
00:08:40 – come on we will see all these comments
00:08:45 – practically in this session indecision
00:08:48 – we will install a java environment on
00:08:51 – our machine around this month's and see
00:08:54 – how they work before we do that a very
00:08:59 – quick look at the structure for jar file
00:09:01 – a java RFI is a packaging class files
00:09:05 – along with visual information are also
00:09:07 – things like images that could go with
00:09:11 – the jail program and executing job and
00:09:14 – be done independently but it must have
00:09:17 – main method in it we will see how we
00:09:20 – specify files legis- study a job five
00:09:25 – you'll also find a phone call many fish
00:09:27 – store in that the manufacturer MF i'll
00:09:31 – convince the metadata about the jar
00:09:33 – fight which contains a location and
00:09:36 – classroom that contains in method
00:09:38 – the many-faced endemic and also contain
00:09:41 – detailed other jar files that this one
00:09:43 – refers to and such details are found the
00:09:46 – classpath variable let us now see how we
00:09:50 – can install the our virtual machine our
00:09:53 – system along with jdk the job
00:09:55 – development toolkit and start writing
00:09:58 – java programs
00:10:00 – let's start with the machine which does
00:10:04 – not have java installed on it
00:10:06 – let's confirmed first we want to command
00:10:12 – prompt on a windows machine and HR so
00:10:18 – Java is not recognized program as this
00:10:22 – machine is concerned so let's see how we
00:10:25 – can install and start running programs
00:10:28 – also start compiling job programs you
00:10:35 – can download and install java from the
00:10:37 – article seat directly you could get
00:10:40 – javed article calm and he would find a
00:10:45 – lot of information on ja technology as
00:10:48 – well as the java downwards here
00:10:52 – out of all the downloads will actually
00:10:54 – go and download java SE e returns for
00:10:57 – the java standard edition and you will
00:11:02 – download the java platform Judy the
00:11:05 – current IDK we have a GD k s7 so let's
00:11:09 – download this on our machine except
00:11:14 – license agreement and you can download
00:11:17 – the java version for whichever machine
00:11:20 – that you're running so you have java
00:11:22 – linux the jdk for madness for solidus
00:11:26 – and windows so let's download java 7 for
00:11:30 – windows our case
00:11:35 – our download is complete so let us now
00:11:38 – install this so the installation process
00:11:44 – starts here most of the times you can
00:11:47 – use the default installation folder
00:11:57 – ok so I successfully and start now to
00:12:01 – close our installation window and you
00:12:03 – try to execute the job and once again so
00:12:09 – my java here and we still see the same
00:12:13 – message we see why is not a recognized
00:12:16 – program or command to the reason for
00:12:19 – this is that java do it is installed in
00:12:23 – our filter it is not on the part of
00:12:26 – executable fights in the windows
00:12:28 – environment so evil java installed the
00:12:32 – java command is to not in the executable
00:12:35 – part of our windows environment so let
00:12:38 – us do at first let us first find with a
00:12:46 – java program decide now you can see we
00:12:53 – have at evk 107 as well as GRE let's go
00:12:58 – to jdk folder and in this go to be in
00:13:02 – under this folder you will find a lot of
00:13:05 – java commands like Java Sea ja it's a
00:13:09 – tragedy
00:13:10 – the Jacka mind so let's put this fold in
00:13:14 – our windows environment part
00:13:18 – you can you can add his part to the part
00:13:24 – of executable programs for your computer
00:13:27 – by right-clicking on the computer option
00:13:31 – here go to properties at once some
00:13:41 – settings and then when variables
00:13:53 – so there are two types of environment
00:13:55 – variables one called system variables
00:13:57 – and others which specific to the
00:13:59 – administrator or the current login that
00:14:01 – you're using
00:14:03 – let's go to the system variables and add
00:14:09 – this to the pot here so we get this
00:14:24 – at the end of it you can insert the
00:14:26 – semicolon and is the part that you had
00:14:29 – copied earlier
00:14:31 – click OK and ok we're done
00:14:44 – so when you type shower you can see the
00:14:47 – java is to coordinate as a command since
00:14:51 – you have not given any arguments this
00:14:53 – java program here the system tells you
00:14:56 – that it is a specific usage of the java
00:15:00 – command and gives you all the various
00:15:02 – options that you can use with this
00:15:04 – program so this is how you install java
00:15:09 – on everyone's machine installation on
00:15:13 – any other platform like 10x on a quest
00:15:16 – etc is very similar
00:15:18 – you can download java on the same site
00:15:22 – from articles ja standard edition
00:15:25 – download site on any of these platforms
00:15:28 – so now Lettie how the same kind behaves
00:15:31 – on a Macintosh on a mac OS system so you
00:15:34 – could see that when we type job without
00:15:36 – any arguments
00:15:38 – it gives you a kind of a h*** as to how
00:15:40 – the java program or how the job command
00:15:43 – can be used as various options let's
00:15:46 – type the same command on a Mac is also
00:15:50 – so we have a command so now we have a
00:15:55 – comment window or the terminal window
00:15:58 – for macintosh OS 10 here and I'd java
00:16:02 – here also and you can see that the
00:16:07 – output is very similar to what we had
00:16:09 – seen on the windows program so the java
00:16:12 – mind expect certain arguments and the
00:16:15 – name of a particular class file which
00:16:17 – you wait to execute now this is the same
00:16:22 – irrespective of varieties on windows or
00:16:24 – linux or OS 10 so let us now write very
00:16:30 – small java program let us first do this
00:16:33 – on a windows machine what we'll do to
00:16:37 – write a Java program is to use very
00:16:40 – simple editor and in Windows lets you
00:16:43 – sort pad and let us treat a very simple
00:16:48 – have a program our first Java program
00:16:52 – will be simple hello world program that
00:16:56 – is used as the introductory program or
00:16:58 – just want all programming languages
00:17:00 – let's type a few lines of code here
00:17:35 – at this point of time you do not bother
00:17:38 – about this intense cetera
00:17:40 – let's just look at how the compilation
00:17:43 – process and execution process happens
00:17:46 – here so we have this file and let's call
00:17:51 – it
00:17:52 – hello world or Java will call it text
00:17:57 – document
00:18:03 – ok we had riddance helloworld dot java
00:18:07 – program and have it to my desktop itself
00:18:12 – let's go to the stop and let's see what
00:18:16 – it contains so we have a programmable
00:18:18 – helloworld dot X and this is because it
00:18:21 – was written by wordpad soul we rename it
00:18:24 – to hello water java
00:18:30 – so we have a Java C compiler which can
00:18:33 – compile our source code the Java Sea
00:18:35 – command combines a program you can give
00:18:39 – it certain arguments in our case we need
00:18:42 – not with right now because you are very
00:18:43 – simple program here so let's call it
00:18:46 – java sea and we see hello world or job
00:18:51 – ok so there was no output specifically
00:18:57 – given here which means there was no
00:18:58 – error here let's list the directory and
00:19:01 – you will find that a hello world class
00:19:04 – file has been created now this is the
00:19:06 – output of the Java Sea program which
00:19:09 – combine our hello world jaw and create
00:19:12 – the helloworld class now to run this
00:19:16 – file use the Java command will Java
00:19:20 – HelloWorld so you will find the distance
00:19:26 – is it could not find or load the main
00:19:28 – class HelloWorld dot us this is because
00:19:31 – when you run a program through java you
00:19:34 – should not have the classic strain along
00:19:36 – with it so let's remove the classic
00:19:39 – station and once again at the command
00:19:42 – Java HelloWorld and you see the output
00:19:49 – that we had did it prints hello world
00:19:52 – and exists now let's do the same thing
00:19:58 – on a Macintosh machine also
00:20:05 – so here yard on the terminal window of
00:20:10 – that machine and light the same program
00:20:13 – once again on the map even exactly the
00:20:20 – same program and let's see what are the
00:20:23 – files in this directory and we see that
00:20:25 – we have a skill file called hello elder
00:20:28 – java here and you a very simple editor
00:20:32 – called VI very common Adon ux kind of
00:20:35 – machines to write this program and once
00:20:38 – again this compile this program on the
00:20:40 – mac main and we say Java Sea helloworld
00:20:43 – dot java and command comes out without
00:20:48 – any other messages which means the
00:20:50 – program has been compiled so we have a
00:20:54 – jello got class file here also and we
00:20:57 – execute this file by giving the con
00:21:00 – hello world and let's say we do
00:21:02 – helloworld class here as well be in a
00:21:06 – very similar area which is main program
00:21:08 – not found etc and we should execute it
00:21:11 – out the dot class extension and we get
00:21:15 – output as hello world
00:21:17 – so we have seen how to install a java
00:21:21 – development to get on our machine which
00:21:23 – is a windows machine is most likely
00:21:26 – going to be used by a lot of you
00:21:29 – we also saw how write a very simple java
00:21:32 – program and use any editor of your
00:21:35 – choice to write that program all you
00:21:38 – need to do is have a dart javis tension
00:21:42 – for the program combined this program
00:21:45 – using a Java Sea command to get a
00:21:49 – corresponding dark last file and you can
00:21:52 – execute that classified using a java
00:21:55 – command here now if you want to package
00:22:01 – this into a job or a java archive let's
00:22:06 – see how to do that also
00:22:07 – so let's type char- CF
00:22:14 – hello world dot job and it's packaged
00:22:19 – board class as well as the dot java file
00:22:23 – here so let's say hello world dot style
00:22:27 – and what we have here is now an
00:22:33 – additional file all helloworld dot java
00:22:36 – no hello world Arshad can be
00:22:39 – introspective you can see what the
00:22:41 – context of it using the kind jar minus
00:22:45 – TF hello world our jar and we see that
00:22:52 – Delaware jar file contains many face or
00:22:56 – MF in a folder called men's it also
00:22:59 – contains the two files that you had
00:23:02 – helloworld class as well as hello world
00:23:04 – java you need not packaged source code
00:23:07 – into your files but in this particular
00:23:10 – case i have done it just to show that is
00:23:13 – possible to do that now let's extract
00:23:17 – the jar file into a different folder or
00:23:21 – directory
00:23:22 – let's make another degree or temp and go
00:23:26 – to that folder and let extract this
00:23:29 – chart five john- xpf and you will find
00:23:38 – that in this folder now we have
00:23:40 – extracted the files the dark cloud file
00:23:43 – our file and also directly connected and
00:23:47 – so now let's see what the content of
00:23:51 – java file it is our original source
00:23:54 – could if we execute our class file then
00:24:00 – we get our hello world message which is
00:24:04 – what the program is supposed to do and
00:24:08 – let us also see what is the kind of the
00:24:10 – Marion files met the many-faced start my
00:24:13 – file so so in this particular case it is
00:24:21 – quite an empty fight it says
00:24:23 – many first version 1.0 and some creation
00:24:26 – vision and that that's basically because
00:24:30 – we have not automatically added a main
00:24:33 – program in this as of now and we have
00:24:37 – also not added any class part
00:24:38 – information but this manifesto MF I'll
00:24:43 – is always created even though it may not
00:24:45 – contain anything other than the best
00:24:47 – headers here so indication we've seen
00:24:51 – some of the basic java commands how to
00:24:56 – run a Java program how to compile it and
00:24:59 – how to execute it
00:25:01 – how to package or extra drama java
00:25:04 – archive for a GF I'd even though i have
00:25:09 – talked to you about this interest chiral
00:25:12 – basic commands you will find that from
00:25:17 – the accession onwards we would not use
00:25:20 – command line based commands or terminal
00:25:25 – based comments for anything we would not
00:25:28 – write our programs using simple editors
00:25:31 – and we'll also have compile them come
00:25:34 – online we will use an ide which is an
00:25:39 – integrated development environment to do
00:25:42 – all of our programming the ide that we
00:25:46 – will use is called eclipse and in an
00:25:49 – equation i will explain to you how to
00:25:52 – install eclipse how to use a kiss to
00:25:56 – write and run java programs and much
00:25:59 – easier fashion thank you


Video Url:
http://youtu.be/oFzwmj5R1BY

Comments

comments