Skip to content

Commit 12d2e55

Browse files
author
Sagar Paul
committed
learn Java
1 parent d8fd928 commit 12d2e55

File tree

258 files changed

+18955
-135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

258 files changed

+18955
-135
lines changed

00-02-java-eclipse-installation.md

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
## Installing Java
2+
3+
#### Google for "java jdk download"
4+
![Image](/images/01_Java9JDKDownload.png)
5+
---
6+
#### Land on the Oracle JDK Download Site
7+
![Image](/images/02_Oracle_Site.png)
8+
---
9+
#### Accept License Agreement
10+
![Image](/images/03_AcceptLicenseAgreement_Error.png)
11+
![Image](/images/04_AcceptLicenseAgreement.png)
12+
---
13+
#### Download JDK for Your Specific Operating System
14+
![Image](/images/05_Download_JDK_9.png)
15+
---
16+
#### Launch the Downloaded file
17+
![Image](/images/06_DoubleClick_And_Start_Installation.png)
18+
---
19+
#### Java Installation Screens
20+
![Image](/images/10_Installation_First_Screen.png)
21+
---
22+
![Image](/images/11_Installation_Ready_Screen.png)
23+
---
24+
#### Choose Defaults and Copy Install Location
25+
![Image](/images/12_Installation_Features_Select_Screen.png)
26+
---
27+
![Image](/images/13_Installation_Status_Screen.png)
28+
---
29+
#### Choose Defaults and Copy Install Location
30+
![Image](/images/14_Installation_Choose_Custom_Setup.png)
31+
---
32+
![Image](/images/15_Installation_Status_Screen.png)
33+
---
34+
#### Congratulations
35+
![Image](/images/16_Congratulations.png)
36+
---
37+
38+
## Verify Java and JShell Installation
39+
40+
#### Launch Terminal or Command Prompt
41+
![Image](/images/21_Launch_Command_Prompt_Windows.png)
42+
---
43+
![Image](/images/21_Launch_Terminal_Mac.png)
44+
---
45+
##### Detailed Instructions
46+
1. If you are on Windows : Open the Command Prompt window by
47+
* Click the Start button
48+
* Select All Programs -> Accessories > Command Prompt.
49+
* Or use Ctrl + Esc, and type in cmd and launch up command.
50+
2. If you are on Mac or other OS, launch up Terminal.
51+
* cmd + space -> Type terminal -> Press enter
52+
53+
#### Java Version Successful
54+
![Image](/images/22_Java_Version_Mac.png)
55+
---
56+
![Image](/images/22_Java_Version_Windows.png)
57+
---
58+
#### JShell Version Successful
59+
![Image](/images/23_JShell_Version_Success_Windows.png)
60+
---
61+
![Image](/images/24_JShell_Version_Success_Mac_1.png)
62+
---
63+
#### Launching JShell
64+
![Image](/images/26_JShell_Launch_Screen.png)
65+
---
66+
![Image](/images/25_JShell_Example_Command.png)
67+
---
68+
#### Error In Launching JShell
69+
![Image](/images/24_JShell_Version_Error.png)
70+
---
71+
> If you are in windows, ```java -version``` is working and ```jshell -version``` is not working, directly jump to the section ```Setting PATH environment variable in Windows```
72+
73+
### Troubleshooting
74+
1. Check if there are any pre-existing Java installs. Uninstall them and reinstall again.
75+
2. Temporarily turn off firewalls and antivirus software.
76+
3. If you get file corrupt message, download the installation file again.
77+
4. Check if you are on 32-bit OS or 64-bit OS. Remember, Java 9 is not supported on 32 bit windows.
78+
5. Check if you need PATH variable to point to right Java Version - https://www.java.com/en/download/help/path.xml
79+
80+
### More Help
81+
- Windows - https://docs.oracle.com/javase/9/install/installation-jdk-and-jre-microsoft-windows-platforms.htm
82+
- Mac - https://docs.oracle.com/javase/9/install/installation-jdk-and-jre-macos.htm#JSJIG-GUID-2FE451B0-9572-4E38-A1A5-568B77B146DE
83+
- Linux - https://docs.oracle.com/javase/9/install/installation-jdk-and-jre-linux-platforms.htm#JSJIG-GUID-737A84E4-2EFF-4D38-8E60-3E29D1B884B8
84+
85+
86+
## Setting PATH environment variable in Windows
87+
88+
#### Goal - What we want to do?
89+
![Image](/images/30_JShell_In_JDK_Bin_Folder.png)
90+
---
91+
#### More Help
92+
- https://www.java.com/en/download/help/path.xml
93+
- https://www.computerhope.com/issues/ch000549.htm
94+
---
95+
96+
#### Browsing to Java Folder
97+
![Image](/images/31_Browsing_To_Java_Folder.png)
98+
---
99+
#### Browsing to JDK Bin Folder
100+
![Image](/images/32_Browsing_To_JDK_Bin_Folder.png)
101+
---
102+
#### Launch Environment Variables
103+
Two Options
104+
- Short Route - ```Click``` Start Button or ```Ctrl + Esc``` to launch start menu and type in ```Env```. Choose ```Edit System Environment Variables```.
105+
- Long Route - Select ```Control Panel``` and then ```System```. Click ```Advanced``` and then ```Environment Variables```.
106+
![Image](/images/33_Windows_Environment_Variables.png)
107+
---
108+
![Image](/images/34_Click_Environment_Variables.png)
109+
---
110+
#### Select and Edit Path Variable
111+
![Image](/images/35_Scroll_And_Select_Path_And_Edit.png)
112+
---
113+
![Image](/images/36_Default_Path_value.png)
114+
---
115+
#### Add JDK Bin Folder To Path
116+
![Image](/images/37_Add_JDK_Bin_Folder_To_Path.png)
117+
---
118+
![Image](/images/38_Click_ok.png)
119+
---
120+
![Image](/images/39_Click_ok.png)
121+
---
122+
![Image](/images/40_Click_ok.png)
123+
---
124+
125+
## Installing Eclipse
126+
127+
Eclipse is the most popular open source Java IDE.
128+
129+
Choose the latest available version of Eclipse - Eclipse Oxygen (4.7) or Later.
130+
131+
> Tip : Do not use an old eclipse version!
132+
133+
### Prerequisites
134+
- Java JDK 9
135+
136+
### Installation
137+
138+
1. Search google for “download eclipse” and choose the first result. The direct link is http://www.eclipse.org/downloads/eclipse-packages/.
139+
![Image](/images/51_google-search-download-eclipse.png)
140+
141+
2. Choose the right Operation System.
142+
![Image](/images/52_eclipse-choose-installation.png)
143+
144+
3. We recommend to choose “Eclipse IDE for Java EE Developers”. Choose 32 bit or 64 bit based on your operating system. (Right-click My Computer, and then click Properties. If "x64 Edition" is listed under System, your processor is capable of running a 64-bit version of Windows.)
145+
146+
4. Wait for the download to complete. Extract the zip file to a folder (Example : c:\eclipse).
147+
5. When you unzip Eclipse, the directory layout looks something like this:
148+
149+
```
150+
eclipse/
151+
features/ ''the directory containing Eclipse features''
152+
plugins/ ''the directory containing Eclipse plugins''
153+
eclipse.exe ''platform executable''
154+
eclipse.ini
155+
eclipsec.exe ''(windows only) console executable''
156+
epl-v10.html ''the EPL license''
157+
jre/ ''the JRE to run Eclipse with''
158+
notice.html
159+
readme
160+
```
161+
6. You can start Eclipse by running eclipse.exe on Windows or eclipse on other platforms. This small launcher essentially finds and loads the JVM. On Windows, the eclipsec.exe console executable can be used for improved command line behavior.
162+
163+
> More Details - https://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F
164+
165+
### Troubleshooting
166+
- Use 7Zip instead of windows built-in decompression utility.
167+
- Unzip to root folder (e.g. c:\) compared to a long directory path (e.g. c:\Program Files\Eclipse).
168+
- Reference - https://wiki.eclipse.org/Eclipse/Installation#Troubleshooting

00-03-path-variable.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## Setting PATH environment variable in Windows
2+
3+
#### Launch Environment Variables
4+
Two Options
5+
- Short Route - ```Click``` Start Button or ```Ctrl + Esc``` to launch start menu and type in ```Env```.
6+
- Long Route - Select ```Control Panel``` and then ```System```.
7+
8+
![Image](/images/windows10-path-01.png)
9+
10+
#### Select and Edit Environment Variable
11+
Choose ```Edit System Environment Variables```.
12+
13+
![Image](/images/windows10-path-02.png)
14+
15+
#### Select and Edit Path Variable
16+
![Image](/images/windows10-path-03.png)
17+
18+
#### Find your JDK Bin Folder on Windows Explorer
19+
![Image](/images/windows10-path-05.png)
20+
21+
#### Copy and Add it to PATH
22+
![Image](/images/windows10-path-06.png)
23+
24+
25+
## Close all command prompt windows
26+
27+
## Launch command prompt again
28+
29+
Type in
30+
```
31+
jshell --version
32+
33+
```
34+
35+
#### Launch up Java and Jshell again

0 commit comments

Comments
 (0)