JDK - Java Development Kit
1. Download JDK
- Go to www.oracle.com, select [Download] - [Java SE]
2. Check JDK version and click 'download'
3. Select "Accept License Agreement" and download "jdk-****-windows-x**.exe"
4. Execute *.exe file and click "Next"
5. Select option and installing path
- select all, without any special reason
- remember installing path, it need to setting environment variable
- click Next
6. JRE is installed automatically just click "Next"
7. Setting Environment Variable
** Setting Environment Variable
1. Click on "Advanced" tab on "System Properties"
2. Click on "Environment Variables" button
3. Create a new class path for JAVA_HOME (system variables)
- set Variable name as JAVA_HOME and value as c:\Programfiles\Java\jdk-*.*\bin
4. Modify "Path" in "System Variables"
- add ;%JAVA_HOME%\bin;
- Do not miss semicolon
5. Execute cmd and check installing completly
- type in "java -version" and "javac -version"
ref : http://recipes4dev.tistory.com/50#23-java-%EC%8B%A4%ED%96%89-%ED%99%98%EA%B2%BD-%EB%B3%80%EC%88%98-%EC%84%A4%EC%A0%95
Wednesday, June 7, 2017
Monday, July 25, 2016
3, 6, 9 게임 - Java (korean)
임의의 양의 정수를 정하고 그 수까지 3, 6, 9 게임을 수행
* 해당 숫자에서 3, 6, 9를 포함하고 있는 개수만큼 박수를 침
* 해당 숫자에서 3, 6, 9를 포함하고 있는 개수만큼 박수를 침
import java.util.ArrayList;
import java.util.List;
public class dateTest1 {
public static void main(String[] args) {
int a = 372;
List tsn = new ArrayList();
tsn.add(3);
tsn.add(6);
tsn.add(9);
boolean clap = false;
for(int i=1 ; i<=a ; i++) {
int temp = i;
while(temp > 0) {
if(tsn.contains(temp%10)){
System.out.print("짝!");
clap = true;
}
temp = temp/10;
}
if(clap) {
System.out.println();
clap = false;
continue;
} else
System.out.println(i);
}
}
}
--> 결과 숨기기
1
2
짝!
4
5
짝!
7
8
짝!
10
11
12
짝!
14
15
짝!
17
18
짝!
20
21
22
짝!
24
25
짝!
27
28
짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
40
41
42
짝!
44
45
짝!
47
48
짝!
50
51
52
짝!
54
55
짝!
57
58
짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
70
71
72
짝!
74
75
짝!
77
78
짝!
80
81
82
짝!
84
85
짝!
87
88
짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
100
101
102
짝!
104
105
짝!
107
108
짝!
110
111
112
짝!
114
115
짝!
117
118
짝!
120
121
122
짝!
124
125
짝!
127
128
짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
140
141
142
짝!
144
145
짝!
147
148
짝!
150
151
152
짝!
154
155
짝!
157
158
짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
170
171
172
짝!
174
175
짝!
177
178
짝!
180
181
182
짝!
184
185
짝!
187
188
짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
200
201
202
짝!
204
205
짝!
207
208
짝!
210
211
212
짝!
214
215
짝!
217
218
짝!
220
221
222
짝!
224
225
짝!
227
228
짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
240
241
242
짝!
244
245
짝!
247
248
짝!
250
251
252
짝!
254
255
짝!
257
258
짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
270
271
272
짝!
274
275
짝!
277
278
짝!
280
281
282
짝!
284
285
짝!
287
288
짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!짝!
짝!짝!
짝!짝!
짝!짝!짝!
짝!짝!
짝!짝!
짝!짝!짝!
짝!짝!
짝!짝!
짝!짝!짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!짝!
짝!짝!
짝!짝!
짝!짝!짝!
짝!짝!
짝!짝!
짝!짝!짝!
짝!짝!
짝!짝!
짝!짝!짝!
짝!
짝!
짝!
1
2
짝!
4
5
짝!
7
8
짝!
10
11
12
짝!
14
15
짝!
17
18
짝!
20
21
22
짝!
24
25
짝!
27
28
짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
40
41
42
짝!
44
45
짝!
47
48
짝!
50
51
52
짝!
54
55
짝!
57
58
짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
70
71
72
짝!
74
75
짝!
77
78
짝!
80
81
82
짝!
84
85
짝!
87
88
짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
100
101
102
짝!
104
105
짝!
107
108
짝!
110
111
112
짝!
114
115
짝!
117
118
짝!
120
121
122
짝!
124
125
짝!
127
128
짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
140
141
142
짝!
144
145
짝!
147
148
짝!
150
151
152
짝!
154
155
짝!
157
158
짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
170
171
172
짝!
174
175
짝!
177
178
짝!
180
181
182
짝!
184
185
짝!
187
188
짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
200
201
202
짝!
204
205
짝!
207
208
짝!
210
211
212
짝!
214
215
짝!
217
218
짝!
220
221
222
짝!
224
225
짝!
227
228
짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
240
241
242
짝!
244
245
짝!
247
248
짝!
250
251
252
짝!
254
255
짝!
257
258
짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
270
271
272
짝!
274
275
짝!
277
278
짝!
280
281
282
짝!
284
285
짝!
287
288
짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!짝!
짝!짝!
짝!짝!
짝!짝!짝!
짝!짝!
짝!짝!
짝!짝!짝!
짝!짝!
짝!짝!
짝!짝!짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!
짝!
짝!짝!
짝!짝!
짝!짝!
짝!짝!
짝!짝!짝!
짝!짝!
짝!짝!
짝!짝!짝!
짝!짝!
짝!짝!
짝!짝!짝!
짝!
짝!
짝!
Sunday, July 24, 2016
Import Project from Bitbucket to Eclipse
how to import project to eclipse (by clone),
when you already have project repository on bitbucket
1. File -> Import -> Git -> Project from Git
2. select URI
3. get URI from bitbucket
4. ctrl+v
5. select branches
6. select local directory
7. choose option you want (choose second in my case)
8. following steps are like 'Create Java Project'
9. restart eclipse, check repository and branches
10. right click on project -> Team -> Commit
- select changed files and drag&drop like direction
- summary or memo on commit message
- click 'Commit and Push'
11. OK
when you already have project repository on bitbucket
1. File -> Import -> Git -> Project from Git
2. select URI
3. get URI from bitbucket
4. ctrl+v
5. select branches
6. select local directory
7. choose option you want (choose second in my case)
8. following steps are like 'Create Java Project'
9. restart eclipse, check repository and branches
10. right click on project -> Team -> Commit
- select changed files and drag&drop like direction
- summary or memo on commit message
- click 'Commit and Push'
11. OK
Tuesday, July 19, 2016
Create Bitbucket Repository and Connect Eclipse
Ubuntu 14.04
Eclipse Mars 4.5.2
1. join bitbucket and create repository
- dashboard -> repositories -> create repository
- create (can create private repositories only five)
2. install git plug-in on eclipse
- Help -> Install New Software
- fill in ' Work with: http://download.eclipse.org/egit/updates ' or just hit 'git'
- check the box 'Eclipse Git Team Provider'
- next -> next -> I accept the terms of license agreement -> finish (take few minute.....)
- restart eclipse and can see in import menu
3. create project and connect with bitbucket
- create project and right click on it
- Team -> Share Project
- check 'Use or create repository in parent folder of project'
- choose project you want (already existed....)
- if you can not check, click 'Create Repository' and choose again
4. commit and push
- right click on project -> Team -> Commit
- select and move source files from 'unstaged changes' to 'staged changes'
- commit message is optional
- commit, maybe get error
- right click on project -> Team -> Push Branch 'master'
- fill clone url in ' Location -> URI : ', get from bitbucket
- hit user and password -> next
- next -> finish
- refresh dashboard of bitbucket
- can find commits
ref : http://embedded.kookmin.ac.kr/lectureMobile/index.php/Eclipse_%2B_Github_%EC%82%AC%EC%9A%A9%EB%B2%95
Eclipse Mars 4.5.2
1. join bitbucket and create repository
- dashboard -> repositories -> create repository
- create (can create private repositories only five)
2. install git plug-in on eclipse
- Help -> Install New Software
- fill in ' Work with: http://download.eclipse.org/egit/updates ' or just hit 'git'
- check the box 'Eclipse Git Team Provider'
- next -> next -> I accept the terms of license agreement -> finish (take few minute.....)
- restart eclipse and can see in import menu
3. create project and connect with bitbucket
- create project and right click on it
- Team -> Share Project
- check 'Use or create repository in parent folder of project'
- choose project you want (already existed....)
- if you can not check, click 'Create Repository' and choose again
4. commit and push
- right click on project -> Team -> Commit
- select and move source files from 'unstaged changes' to 'staged changes'
- commit message is optional
- commit, maybe get error
- right click on project -> Team -> Push Branch 'master'
- fill clone url in ' Location -> URI : ', get from bitbucket
- hit user and password -> next
- next -> finish
- can find commits
ref : http://embedded.kookmin.ac.kr/lectureMobile/index.php/Eclipse_%2B_Github_%EC%82%AC%EC%9A%A9%EB%B2%95
Monday, July 18, 2016
Install Git on Ubintu
2 ways are installing git on ubuntu
A. Installation
1. Using apt-get - it's simple, but not latest version.
2. Download and install manually - it can use latest version.
- install libraries
Kernel.org( https://www.kernel.org/pub/software/scm/git/ )
GitHub mirror( https://github.com/git/git/releases )
- compile and install
B. Configuration setting
- user
C. Generate project
- generate folder
D. Clone remote repository
- follow command makes directory named "libgit2" and generate .git in "libgit2". And clone repository
E. other commands
- check state of repository
ref : https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
ref : http://yokang90.tistory.com/47
A. Installation
1. Using apt-get - it's simple, but not latest version.
$ sudo apt-get install git
2. Download and install manually - it can use latest version.
- install libraries
$ sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext \
libz-dev libssl-dev
- if you want various documents format, need to these libraries$ sudo apt-get install asciidoc xmlto docbook2x- download latest release version from follows
Kernel.org( https://www.kernel.org/pub/software/scm/git/ )
GitHub mirror( https://github.com/git/git/releases )
- compile and install
$ tar -zxf git-1.9.1.tar.gz $ cd git-1.9.1 $ make configure $ ./configure --prefix=/usr $ make all doc info $ sudo make install install-doc install-html install-info
B. Configuration setting
- user
$ git config --global user.name "user name" $ git config --global user.email emailaddress@email.com- editor
$ git config --global core.editor editorname- checking config settings
$ git config --list- usage help
$ git help$ git --help $ man git- ex) $ git help config
C. Generate project
- generate folder
$ mkdir testGitProject- generate git repository in above folder
$ git init- add and commit
$ git add *.c $ git add LICENSE $ git commit -m 'message about this project version'
D. Clone remote repository
- follow command makes directory named "libgit2" and generate .git in "libgit2". And clone repository
$ git clone https://github.com/libgit2/libgit2- only differ name of directory "mylibgit", others are same
$ git clone https://github.com/libgit2/libgit2 mylibgit
E. other commands
- check state of repository
$ git status- commit
$ git commit- view log
$ git log- fetch or pull remote repository (pull = fetch + merge)
$ git fetch [remote-name] $ git pull [remote-name]- push
$ git push origin master
ref : https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
ref : http://yokang90.tistory.com/47
Thursday, July 14, 2016
Ubuntu Commands and Tips #2
Memo - commands and tips in ubuntu
1. Network setting on ubuntu : when you can't connect lan(wired) network
- open follows
ref : http://promobile.tistory.com/300
2. Error : " ubuntu wired network unmanaged "
- open follows
3. Activate workspaces
- System Settings -> Appearance -> Behavior
- check "Enable workspaces"
4. 우분투 한글 및 한글 키보드 설정
- System Setting -> Language Support -> Language Support install
- System Setting -> Text Entry -> 왼쪽 하단에 '+'를 이용해서 'Korean(Hangul)' 이라고 되어있는 항목을 추가
(되도록이면 영어 - 한국어 순으로 설정)
- System Setting -> Keyboard -> Shortcuts -> Typing -> Compose Key를 'Disabled'에서 'Right Alt'로 변경
- terminal에 아래의 내용을 입력 (한/영 키 사용 위함)
1. Network setting on ubuntu : when you can't connect lan(wired) network
- open follows
$ sudo gedit /etc/network/interfaces- text in file
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback- case1_auto : add as follows under text in file
auto eth0 iface eth0 inet dhcp- case2_manual : add as follows
auto eth0
iface eth0 inet static
address 192.168.0.2
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers ~~~~~
- save and network restart$ sudo ifdown eth0 $ sudo ifup eth0ref : http://blog.iolate.kr/89
ref : http://promobile.tistory.com/300
2. Error : " ubuntu wired network unmanaged "
- open follows
$ sudo gedit /etc/NetworkManager/NetworkManager.conf- file contains, set "managed=true"
[main] plugins=ifupdown,keyfile [ifupdown] managed=false- save and restart network manager
$ /etc/init.d/network-manager restartref : https://wishkane.wordpress.com/2013/07/11/ubuntu-network-manager-wired-networks-are-unmanaged/
3. Activate workspaces
- System Settings -> Appearance -> Behavior
- check "Enable workspaces"
4. 우분투 한글 및 한글 키보드 설정
- System Setting -> Language Support -> Language Support install
- System Setting -> Text Entry -> 왼쪽 하단에 '+'를 이용해서 'Korean(Hangul)' 이라고 되어있는 항목을 추가
(되도록이면 영어 - 한국어 순으로 설정)
- System Setting -> Keyboard -> Shortcuts -> Typing -> Compose Key를 'Disabled'에서 'Right Alt'로 변경
- terminal에 아래의 내용을 입력 (한/영 키 사용 위함)
$ sudo apt-get install dconf-editor- 설치가 완료되면 org -> gnome -> desktop -> wm -> keybindings -> switch-input-source의 값을 'Hangul'이라고 입력
Wednesday, July 13, 2016
Ubuntu Commands and Tips #1
Memo - commands and tips in ubuntu
1. Check protocol / ip / port/ program id
2. Process Termination
ref : http://zetawiki.com/wiki/%EB%A6%AC%EB%88%85%EC%8A%A4_%EA%B2%8C%EC%9D%B4%ED%8A%B8%EC%9B%A8%EC%9D%B4_%ED%99%95%EC%9D%B8
ref : http://kjvvv.kr/14174
ref : http://linuxism.tistory.com/48
3. Change the command-line prompt color
want to further changes.
ref : https://ubuntugenius.wordpress.com/2011/07/11/how-to-change-the-command-line-prompt-colour-in-the-ubuntulinux-terminal/
4. Back-up application : TimeShift
- installation
5. Error : " Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release Unable to find expected entry ‘main/binary-i386/Packages’ in Release file (Wrong sources.list entry or malformed file) "
- sol
6. Error : " W: There is no public key available for the following key IDs: 1397BC53640DB551 "
- sol
7. Error : " W: GPG error: http://http.debian.net wheezy-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010 "
- sol.1
do same as above process
- sol.2
do as follows(reference)
ref : http://askubuntu.com/questions/13065/how-do-i-fix-the-gpg-error-no-pubkey
1. Check protocol / ip / port/ program id
$ sudo netstat -tnlp*options : -t(connected TCP protocol) -n(numeric address) -l(port, state : 'LISTEN') -p(program id)
2. Process Termination
$ sudo kill PID
ref : http://zetawiki.com/wiki/%EB%A6%AC%EB%88%85%EC%8A%A4_%EA%B2%8C%EC%9D%B4%ED%8A%B8%EC%9B%A8%EC%9D%B4_%ED%99%95%EC%9D%B8
ref : http://kjvvv.kr/14174
ref : http://linuxism.tistory.com/48
3. Change the command-line prompt color
$ sudo gedit ~/.bashrcand find this line
#force_color_prompt=yesremove hash -> 'force_color_prompt=yes'
want to further changes.
ref : https://ubuntugenius.wordpress.com/2011/07/11/how-to-change-the-command-line-prompt-colour-in-the-ubuntulinux-terminal/
4. Back-up application : TimeShift
- installation
$ sudo apt-add-repository -y ppa:teejee2008/ppa $ sudo aptitude update $ sudo aptitude install timeshiftref : https://launchpad.net/timeshift
5. Error : " Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release Unable to find expected entry ‘main/binary-i386/Packages’ in Release file (Wrong sources.list entry or malformed file) "
- sol
$ sudo gedit /etc/apt/sources.list.d/google-chrome.listand find the line add [amd64] like follows, Do not edit or replace any other text in this file
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
$ sudo apt-get updateref : http://www.omgubuntu.co.uk/2016/03/fix-failed-to-fetch-google-chrome-apt-error-ubuntu
6. Error : " W: There is no public key available for the following key IDs: 1397BC53640DB551 "
- sol
$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 1397BC53640DB551
$ sudo apt-get updateref : http://askubuntu.com/questions/520718/no-public-key-available-while-upgrading-using-update-manager
7. Error : " W: GPG error: http://http.debian.net wheezy-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8B48AD6246925553 NO_PUBKEY 7638D0442B90D010 "
- sol.1
do same as above process
- sol.2
do as follows(reference)
ref : http://askubuntu.com/questions/13065/how-do-i-fix-the-gpg-error-no-pubkey
Subscribe to:
Posts (Atom)































