SlideShare a Scribd company logo
1 of 37
Download to read offline
開發環境
TA LESSON @ 108-1 JAVA物件導向
OUTLINE
‣ ⽂文字編輯器(Vscode, Sublime, Atom, VIM, etc.)
‣ Windows開發環境安裝
‣ MacOS開發環境安裝
‣ Linux開發環境安裝
‣ Visual Studio Code安裝
⽂字編輯器
⽂字編輯器
程式是怎麼出⽣的︖
▸ 最簡單且易易懂的說法:
▸ 原始碼(Source code) -> 編譯器(Compiler) -> 機器碼(Machine code)
▸ 即使我們使⽤用最傳統的⽂文字編譯器(記事本),只要寫出該程式語⾔言的
編譯器能看懂的格式,編譯器就會幫你處理理好並打包成執⾏行行檔
▸ 我們這學期教學會以 Visual Studio Code 為主
▸ 如果以前有寫過程式有習慣使⽤用的編輯器也可以,合你胃⼝口就好
Compiler
Source code : Machine code :
int main()
{
printf(“Hello World !”);
return 0;
}
01110000 01110010
01101001 01101110
01110100 01100110
… … … …
我們看得懂 電腦看得懂
WINDOWS
開發環境安裝
WINDOWS開發環境安裝
下載 JDK8 ( JAVA8 )
▸ https://www.oracle.com/technetwork/java/javase/
downloads/jdk8-downloads-2133151.html
▸ 下載 jdk-8u221-windows-x64.exe ( 現在⼤大多是64位元電腦 )
▸ 執⾏行行檔案,⼀一直按下⼀一步 ( 別亂裝拜偷,TA會很累== )
▸ 如果你要更更換檔案資料夾的路路徑,記得記起來來,我們待會會
⽤用這個路路徑設置你的環境變數
WINDOWS開發環境安裝
環境變數
▸ 在Unix or Unix like的系統,執⾏行行檔只要放在/usr/bin/底下,
在terminal中無論哪個資料夾我們都可以呼叫該指令(執⾏行行檔)
▸ E.g. java, javac, etc.
▸ 反之,在Windows中,我們必須⼿手動設置環境變數的路路徑來來
讓javac等指令能被我們隨時隨地呼叫 ( 所以我就說Windows
對開發者很不友善喔,⼤大家想變強趕快換系統== )
點兩兩下
找到你剛剛下載的資料夾
找到bin這個資料夾
複製路路徑
把路路徑新增到環境變數
然後狂按確定==
搜尋cmd
點開這個邪惡惡⿊黑⾊色⼩小⽅方塊==
輸入javac
有跳出⼀一堆東⻄西就完成了了
MACOS
開發環境安裝
MACOS開發環境安裝
下載 JDK8 ( JAVA8 )
▸ https://www.oracle.com/technetwork/java/javase/
downloads/jdk8-downloads-2133151.html
▸ 下載 jdk-8u221-macosx-x64.dmg
▸ 執⾏行行檔案,對⼩小盒⼦子點兩兩下,瘋狂繼續 ( 拜託別動,動了了你⼤大
概要來來找我了了 )
▸ 接下來來要設置環境變數
MACOS開發環境安裝
環境變數
▸ 前⾯面提到Unix系統只要放在/usr/bin/底下就可以隨地呼叫,
若若是MacOS使⽤用Home brew管理理套件⼯工具安裝東⻄西的話會⾃自
動幫你添加進去,但我們的JDK是⼿手動安裝的,因此照樣需要
⼿手設環境變數
▸ 接下來來講的設置都是建立在你們沒⽤用過terminal的情況下,如
果你有⽤用過terminal的話,那你應該就會⾃自⼰己裝==
▸ 待會的圖片看完以後我會給指令懶懶⼈人包,慢慢複製就好
Command + 空⽩白鍵
輸入terminal
打開
輸入這些東⻄西
儲存
輸入javac
有跳出⼀一堆東⻄西就完成了了
MACOS開發環境安裝
環境變數懶⼈包
▸ echo “” >> ~/.bash_profile
▸ open ~/.bash_profile
▸ export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/
Contents/Home
▸ export PATH=$JAVA_HOME/bin:$PATH
▸ export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
▸ source ~/.bash_profile
LINUX
開發環境安裝
LINUX開發環境教學
…….
▸ 你會⽤用Linux應該不⽤用我教你了了ㄅ==
▸ ⾃自⼰己裝
VSCODE安裝
VSCODE安裝
下載
▸ https://code.visualstudio.com/Download
好了了以後開起來來點這個
搜尋 java extension pack
安裝好以後重新開啟vscode
開啟資料夾
新增helloworld.java
開始寫你的第⼀一⽀支程式
按 Ctrl + ` 開啟terminal
javac 編譯程式
java 把程式跑起來來
第⼀一⽀支程式⼤大成功
Q&A
Q&A
▸ 108-1 Java物件導向程式設計
▸ 請⼤大家加入FB社團,之後的作業訊息、
TA課都會放在上⾯面
▸ 之後作業有問題、感情不順,請寄信到
TA信箱,或是FB敲敲我們
▸ TA群 :
▸ 資管三陳靖汯 jasphi168@gmail.com
▸ 資管三楊斯媛 joyce8805@gmail.com
▸ 資管四吳聖偉 waynewu1229@gmail.com

More Related Content

Similar to Java - TA課 - 開發環境

從頭打造 C#、.NET 與 ASP.NET Core 開發環境
從頭打造 C#、.NET 與 ASP.NET Core 開發環境從頭打造 C#、.NET 與 ASP.NET Core 開發環境
從頭打造 C#、.NET 與 ASP.NET Core 開發環境Will Huang
 
前端开发工具 - 编辑器篇
前端开发工具 - 编辑器篇前端开发工具 - 编辑器篇
前端开发工具 - 编辑器篇keelii
 
使用JetBrains Rider開發Xamarin Forms
使用JetBrains Rider開發Xamarin Forms使用JetBrains Rider開發Xamarin Forms
使用JetBrains Rider開發Xamarin FormsChen Yu Pao
 
和Android源代码一起工作 | 海豚浏览器 胡继堂
和Android源代码一起工作 | 海豚浏览器 胡继堂和Android源代码一起工作 | 海豚浏览器 胡继堂
和Android源代码一起工作 | 海豚浏览器 胡继堂imShining @DevCamp
 
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure National Cheng Kung University
 
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第一天
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第一天Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第一天
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第一天Gelis Wu
 
GNU Autoconf / Automake #4
GNU Autoconf / Automake #4GNU Autoconf / Automake #4
GNU Autoconf / Automake #4imacat .
 
An overview of virtual machine architectures
An overview of virtual machine architecturesAn overview of virtual machine architectures
An overview of virtual machine architecturesLishi He
 
jsdoc-toolkit
jsdoc-toolkitjsdoc-toolkit
jsdoc-toolkitsatans17
 
Xcode tutorial
Xcode tutorialXcode tutorial
Xcode tutorialMarch Liu
 
zhuwenlongChinese
zhuwenlongChinesezhuwenlongChinese
zhuwenlongChineseWenlong Zhu
 
搭建你的Android Studio開發環境
搭建你的Android Studio開發環境搭建你的Android Studio開發環境
搭建你的Android Studio開發環境Yuan Chiu
 
Cognos8.3安装配置For Db2
Cognos8.3安装配置For Db2Cognos8.3安装配置For Db2
Cognos8.3安装配置For Db2Franky Lao
 

Similar to Java - TA課 - 開發環境 (20)

專題-2017Linux Driver 實現
專題-2017Linux Driver 實現專題-2017Linux Driver 實現
專題-2017Linux Driver 實現
 
從頭打造 C#、.NET 與 ASP.NET Core 開發環境
從頭打造 C#、.NET 與 ASP.NET Core 開發環境從頭打造 C#、.NET 與 ASP.NET Core 開發環境
從頭打造 C#、.NET 與 ASP.NET Core 開發環境
 
前端开发工具 - 编辑器篇
前端开发工具 - 编辑器篇前端开发工具 - 编辑器篇
前端开发工具 - 编辑器篇
 
使用JetBrains Rider開發Xamarin Forms
使用JetBrains Rider開發Xamarin Forms使用JetBrains Rider開發Xamarin Forms
使用JetBrains Rider開發Xamarin Forms
 
和Android源代码一起工作 | 海豚浏览器 胡继堂
和Android源代码一起工作 | 海豚浏览器 胡继堂和Android源代码一起工作 | 海豚浏览器 胡继堂
和Android源代码一起工作 | 海豚浏览器 胡继堂
 
C++
C++C++
C++
 
LLVM introduction
LLVM introductionLLVM introduction
LLVM introduction
 
C+
C+C+
C+
 
C#
C#C#
C#
 
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
 
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第一天
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第一天Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第一天
Visual studio 2012 與 asp.net 4.5 (新功能與開發介紹) 第一天
 
GNU Autoconf / Automake #4
GNU Autoconf / Automake #4GNU Autoconf / Automake #4
GNU Autoconf / Automake #4
 
An overview of virtual machine architectures
An overview of virtual machine architecturesAn overview of virtual machine architectures
An overview of virtual machine architectures
 
jsdoc-toolkit
jsdoc-toolkitjsdoc-toolkit
jsdoc-toolkit
 
Xcode tutorial
Xcode tutorialXcode tutorial
Xcode tutorial
 
zhuwenlongChinese
zhuwenlongChinesezhuwenlongChinese
zhuwenlongChinese
 
搭建你的Android Studio開發環境
搭建你的Android Studio開發環境搭建你的Android Studio開發環境
搭建你的Android Studio開發環境
 
Jni文档
Jni文档Jni文档
Jni文档
 
Cognos8.3安装配置For Db2
Cognos8.3安装配置For Db2Cognos8.3安装配置For Db2
Cognos8.3安装配置For Db2
 
Jobforcompal
JobforcompalJobforcompal
Jobforcompal
 

More from Redhung @ Nationtal Chung Cheng University, Chiayi, Taiwan.

More from Redhung @ Nationtal Chung Cheng University, Chiayi, Taiwan. (18)

Windows Offender_ Reverse Engineering Windows Defender's Antivirus Emulator
Windows Offender_ Reverse Engineering Windows Defender's Antivirus EmulatorWindows Offender_ Reverse Engineering Windows Defender's Antivirus Emulator
Windows Offender_ Reverse Engineering Windows Defender's Antivirus Emulator
 
AEG_ Automatic Exploit Generation
AEG_ Automatic Exploit GenerationAEG_ Automatic Exploit Generation
AEG_ Automatic Exploit Generation
 
Unleashing MAYHEM On Binary Code
Unleashing MAYHEM On Binary CodeUnleashing MAYHEM On Binary Code
Unleashing MAYHEM On Binary Code
 
Firmadyne
FirmadyneFirmadyne
Firmadyne
 
Fintech Newebpay API using Flask and VueJS
Fintech Newebpay API using Flask and VueJSFintech Newebpay API using Flask and VueJS
Fintech Newebpay API using Flask and VueJS
 
TA-java-method-109
TA-java-method-109TA-java-method-109
TA-java-method-109
 
TA Lesson Web-109
TA Lesson Web-109TA Lesson Web-109
TA Lesson Web-109
 
TA Lesson Binary Exploitation (Pwn)
TA Lesson Binary Exploitation (Pwn)TA Lesson Binary Exploitation (Pwn)
TA Lesson Binary Exploitation (Pwn)
 
Java - TA課 - Array
Java - TA課 - ArrayJava - TA課 - Array
Java - TA課 - Array
 
Reverse Engineering - Assembly & Introduction
Reverse Engineering - Assembly & IntroductionReverse Engineering - Assembly & Introduction
Reverse Engineering - Assembly & Introduction
 
TA Lesson3 - Method
TA Lesson3 - MethodTA Lesson3 - Method
TA Lesson3 - Method
 
Web Introduction
Web IntroductionWeb Introduction
Web Introduction
 
Java - TA課 - Let's Begin
Java - TA課 - Let's BeginJava - TA課 - Let's Begin
Java - TA課 - Let's Begin
 
IoT Penetration Talk
IoT Penetration TalkIoT Penetration Talk
IoT Penetration Talk
 
Introduction to computer network
Introduction to computer networkIntroduction to computer network
Introduction to computer network
 
Assembly Language Redhung ( x86 ) @ TDOH
Assembly Language Redhung ( x86 ) @ TDOHAssembly Language Redhung ( x86 ) @ TDOH
Assembly Language Redhung ( x86 ) @ TDOH
 
TP-Link SR20 Zero-day attack
TP-Link SR20 Zero-day attackTP-Link SR20 Zero-day attack
TP-Link SR20 Zero-day attack
 
滲透測試入門 Penetration test - white hat hacking introduction
 滲透測試入門 Penetration test - white hat hacking introduction 滲透測試入門 Penetration test - white hat hacking introduction
滲透測試入門 Penetration test - white hat hacking introduction
 

Java - TA課 - 開發環境