Skip to content

Latest commit

ย 

History

History
554 lines (362 loc) ยท 16.9 KB

README.md

File metadata and controls

554 lines (362 loc) ยท 16.9 KB


Link


sdkman(Java๋ฒ„์ ผ ๊ด€๋ฆฌ)

https://sdkman.io/

source "/home/gyoung/.sdkman/bin/sdkman-init.sh"

Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true

  • ์˜ค๋ฅ˜ ํ•ด๊ฒฐ ํ•˜๊ธฐ .bashrc์— ๋„ฃ์–ด์ฃผ๋ฉด ๋œ๋‹ค.

  • vi /root/.bashrc

  • or vi .zshrc

  • ๋‚œ zshrc์— ๋„ฃ์—ˆ๋”๋‹ˆ ํ•ด๊ฒฐ๋จ.

// Scroll Down and COPY / PAST THIS 3 LINES Of COMMAND INTO YOUR .bashrc :
*************

_SILENT_JAVA_OPTIONS="$_JAVA_OPTIONS"
unset _JAVA_OPTIONS
alias java='java "$_SILENT_JAVA_OPTIONS"'

*************

์ถœ์ฒ˜ : Permanently Fix Problem : Picked Up _JAVA_OPTIONS | Best Linux

export _JAVA_OPTIONS='-Xms64m -Xmx128m -Dawt.useSystemAAFontSettings=lcd'

https://stackoverflow.com/questions/9677346/java-system-environment-variable/9677804#9677804


Make sample(Java)-LinuxOS[๐Ÿ”]

echo "# Result\xa\xa\x60\x60\x60\xa\xa\x60\x60\x60" >> README.md &&

echo "# A collection of useful .gitignore templates " >> .gitignore &&
echo "# https://github.com/github/gitignore\xa" >> .gitignore &&
echo "# General" >> .gitignore &&
echo ".DS_Store" >> .gitignore &&
echo "dir/otherdir/.DS_Store\xa" >> .gitignore &&

echo "r:\xa\x09\x09rm -rf out\xa\x09\x09mkdir out\xa\x09\x09javac -cp src src/Main.java -d out" >> Makefile &&
echo "\x09\x09java -cp out Main\xa" >> Makefile &&
echo "b:\xa\x09\x09javac -cp src src/Main.java -d out" >> Makefile &&
echo "\x09\x09java -cp out Main\xa" >> Makefile &&
echo "d:\xa\x09\x09wget https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/1.9.3/junit-platform-console-standalone-1.9.3.jar\xa" >> Makefile &&
echo "t:\xa\x09\x09java -jar ./junit-platform-console-standalone-1.9.3.jar --class-path out --scan-class-path\xa" >> Makefile &&
echo "clean:" >> Makefile &&
echo "\x09\x09rm -rf *.jar ./out\xa" >> Makefile &&
echo "init:\xa\x09\x09mkdir src" >> Makefile &&
echo "\x09\x09echo \x22public class Main {\x22 >> src/Main.java" >> Makefile &&
echo "\x09\x09echo \x22\x09public static void main(String[] args) {\x22 >> src/Main.java" >> Makefile &&
echo "\x09\x09echo \x22\x09\x09System.out.println(\42Hello World. Java\42);\x22 >> src/Main.java" >> Makefile &&
echo "\x09\x09echo \x22\x09}\x22 >> src/Main.java" >> Makefile &&
echo "\x09\x09echo \x22}\x22 >> src/Main.java" >> Makefile

echo๋กœ Result๋งŒ ๋งŒ๋“ค๊ธฐ[๐Ÿ”]

echo "# Result\xa\xa\x60\x60\x60\xa\xa\x60\x60\x60" >> README.md

Java Makefile(macOS)[๐Ÿ”]

echo "# Result\xa\xa\x60\x60\x60\xa\xa\x60\x60\x60" >> README.md &&

echo "# A collection of useful .gitignore templates " >> .gitignore &&
echo "# https://github.com/github/gitignore\xa" >> .gitignore &&
echo "# General" >> .gitignore &&
echo ".DS_Store" >> .gitignore &&
echo "dir/otherdir/.DS_Store\xa" >> .gitignore &&

echo "r:\xa\x09\x09rm -rf out\xa\x09\x09mkdir out\xa\x09\x09javac -cp src src/Main.java -d out" >> Makefile &&
echo "\x09\x09java -cp out Main\xa" >> Makefile &&
echo "b:\xa\x09\x09javac -cp src src/Main.java -d out" >> Makefile &&
echo "\x09\x09java -cp out Main\xa" >> Makefile &&
echo "d:\xa\x09\x09wget https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/1.9.3/junit-platform-console-standalone-1.9.3.jar\xa" >> Makefile &&
echo "t:\xa\x09\x09java -jar ./junit-platform-console-standalone-1.9.3.jar --class-path out --scan-class-path\xa" >> Makefile &&
echo "clean:" >> Makefile &&
echo "\x09\x09rm -rf *.jar ./out\xa" >> Makefile &&
echo "init:\xa\x09\x09mkdir src" >> Makefile &&
echo "\x09\x09echo \x22public class Main {\x22 >> src/Main.java" >> Makefile &&
echo "\x09\x09echo \x22\x09public static void main(String[] args) {\x22 >> src/Main.java" >> Makefile &&
echo "\x09\x09echo \x22\x09\x09System.out.println(\\\"Hello World. Java\\\");\x22 >> src/Main.java" >> Makefile &&
echo "\x09\x09echo \x22\x09}\x22 >> src/Main.java" >> Makefile &&
echo "\x09\x09echo \x22}\x22 >> src/Main.java" >> Makefile

Makefile[๐Ÿ”]

r:
		rm -rf out
		mkdir out
		javac -cp src src/Main.java -d out
		java -cp out Main

b:
		javac -cp src src/Main.java -d out
		java -cp out Main

d:
		wget https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/1.9.3/junit-platform-console-standalone-1.9.3.jar

t:
		java -jar ./junit-platform-console-standalone-1.9.3.jar --class-path out --scan-class-path

clean:
		rm -rf *.jar ./out

init:
		mkdir src
		echo "public class Main {" >> src/Main.java
		echo "	public static void main(String[] args) {" >> src/Main.java
		echo "		System.out.println(\"Hello World. Java\");" >> src/Main.java
		echo "	}" >> src/Main.java
		echo "}" >> src/Main.java

Java .gitignore[๐Ÿ”]

# A collection of useful .gitignore templates 
# https://github.com/github/gitignore

# General
.DS_Store
dir/otherdir/.DS_Store

out/

# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

Google Java Style Guide[๐Ÿ”]

https://google.github.io/styleguide/javaguide.html

์Šคํ”„๋ง ๋””๋ฒ„๊น…VSCodeโค๏ธRun and debug a Spring Boot project in Visual Studio Code[๐Ÿ”]

https://youtu.be/fTgmRyxCGF0?si=4sSJf4bltg5ex6C3

Helix Java LSP์„ธํŒ…[๐Ÿ”]

Helix( Java LSP Install ) jdtls์„ค์น˜ํ•˜๊ธฐ ๊ทธ๋ƒฅ github ๋•ก๊ธฐ๊ณ  installํ•˜๋ฉด ์„ค์น˜ ๋œ๋‹ค. ์ตœ๊ณ ..[๐Ÿ”]

https://github.com/eruizc-dev/jdtls-launcher

git clone https://github.com/eruizc-dev/jdtls-launcher.git 
Cloning into 'jdtls-launcher'...
remote: Enumerating objects: 241, done.
remote: Counting objects: 100% (85/85), done.
remote: Compressing objects: 100% (52/52), done.
remote: Total 241 (delta 43), reused 50 (delta 28), pack-reused 156
Receiving objects: 100% (241/241), 48.74 KiB | 9.75 MiB/s, done.
Resolving deltas: 100% (125/125), done.


$ cd jdtls-launcher 

 
$ ls
CONTRIBUTING.md  install.sh  jdtls-launcher.sh  LICENSE  README.md


$ ./install.sh 
INFO: Downloading JDTLS-LAUNCHER
-#O=#   #     #
INFO: Extracting JDTLS-LAUNCHER
INFO: Creating symlink at /home/gy/.local/bin/jdtls
Installing jdtls...
jdt-language-server-1.28.0-202309221544 is going to be installed
########################################################################################################################### 100.0%########################################################################################################################### 100.0%
Installing lombok...
########################################################################################################################### 100.0%
Lombok installation succesfull
JDTLS installation succesfull
INFO: Installation successful
INFO: Ensure /home/gy/.local/bin is in path

Helix Debugger-Configurations[๐Ÿ”]

https://github.com/helix-editor/helix/wiki/Debugger-Configurations#configure-debuggers

This page can provide additional debugger configurations beyond the ones shipped by default in Helix.

helix-editor/helix#2510


LSP ์ด๊ฒŒ ์ ค ํฐ๋“ฏ? ์—ญ์‹œ Eclipse์ดํด๋ฆฝ์Šค[๐Ÿ”]

https://github.com/eclipse-jdtls/eclipse.jdt.ls


https://docs.gradle.org/8.1.1/samples/

https://docs.gradle.org/8.1.1/samples/sample_building_java_applications.html

์™ธ๋ถ€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๊ฒ€์ƒ‰ํ•˜๊ธฐ[๐Ÿ”]

https://mvnrepository.com/

-build.gradle

// https://mvnrepository.com/artifact/junit/junit
testImplementation group: 'junit', name: 'junit', version: '4.13.2'
  • gradle build
gradle build --scan

https://kotlinworld.com/321


Eclipse

https://www.eclipse.org/

Eclipse Vim Setting (.vrapperrc)[๐Ÿ”]

Eclipse ์ž์ฃผ ์“ฐ๋Š” Vimํ‚ค ์ •๋ฆฌ[๐Ÿ”]


// ์ž๋™์™„์„ฑ
(Control + Space)

๋น”์œผ๋กœ ์„ธํŒ…ํ•ด์„œ ๊ทธ๋Ÿฐ๊ฐ€
Control + I ๋ˆ„๋ฅด๋ฉด ๋ฐ”๋กœ ๋ฐ‘ ์„ ํƒ๋˜๊ณ  ๋ฐ‘์— ๋‚ด๊ฐ€ ์›ํ•˜๋Š” ์ž๋™ ์™„์„ฑ์€ Control ๋ˆ„๋ฅธ ์ƒํƒœ๋กœ ์•ŒํŒŒ๋ฒณ ์ฒซ ๊ธ€์งœ ์„ ํƒ๋จ. ๊ทธ ๋‹ค์Œ ์—”ํ„ฐ
Control +y ๊ฐ€ ๋น ๋ฅด๊ณ  ์ข‹์€๋ฐ ์ด๊ฑฐ๋ž‘ ๊ฐ™์ด ๊ธฐ๋Šฅ์€  ๋ชจ๋ฅด๊ฒ ์Œ

// Reformat code
To reformat code according to the current code style settings, select Code
| Reformat Code from the main menu or press
โŒฅย ย ย โŒ˜ย ย ย Lย ย 
option + command + L


// Comment and uncomment code
Use shortcuts to comment and uncomment lines and blocks of code:
ย ย โŒ˜ย ย ย /ย ย : for single line comments (ย ย //...ย ย )
ย ย โŒฅย ย ย โŒ˜ย ย ย /ย ย : for block comments (ย ย /*...*/ย ย )

// The Rename refactoring
You can easily rename your classes, methods, and variables with automatic correction of all places where they are used.
Position the caret at the symbol you want to rename, and press
โ‡งย ย ย F6ย ย  (Refactor | Rename).
Type the new name and press ย ย โ†ฉย Returnย ย .


// Preview search results
You can use the Preview area of the Find in Files dialog 
(ย ย โ‡งย ย ย โŒ˜ย ย ย Fย ย )
for quicker search without leaving the dialog. The Preview dialog displays the first 100 results. 





  • ์ž๋™์ •๋ ฌ(์ฝ”๋“œ ๊ฐœํŒ์œผ๋กœ ์น˜๊ณ  fmt ํ•ด์„œ ์ •๋ ฌํ•˜๊ธฐ !!! ๊ผญ ํ•„์š”ํ•œ ๊ฑฐ)
On Windows and Linux : Ctrl + Shift + F

On Mac : โŒ˜ + โ‡ง + F

(Alternatively you can press Format in Main Menu > Source)

https://stackoverflow.com/questions/15655126/how-to-auto-format-code-in-eclipse

  • ๋‚˜์˜ .vrapperrc ์„ธํŒ…
" ~~~~~ General Settings
imap jk <esc>
set autoindent
set ignorecase
set smartcase
set nonum

"" Content-Assist Mode ~~~~~~~
set contentassistmode 

" ~~~~~~~~~~~~~~

The application โ€œEclipseโ€ canโ€™t be opened. (macOS Monterey)

sudo codesign --force --deep --sign - /Applications/Eclipse.app

https://stackoverflow.com/questions/70725347/the-application-eclipse-can-t-be-opened-macos-monterey

Java Module ์„ค๋ช…์„œ

https://openjdk.org/projects/jigsaw/quick-start


Java Full Course for free โ˜•(12์‹œ๊ฐ„์งœ๋ฆฌ)[๐Ÿ”]

https://youtu.be/xk4_1vDrzzo

Java Programming - Course for Absolute Beginners | freeCodeCamp.org[๐Ÿ”]

https://youtu.be/GoXwIVyNvX0


Java Tutorials Series | freeCodeCamp.org[๐Ÿ”]

https://youtube.com/playlist?list=PLWKjhJtqVAbnRT_hue-3zyiuIYj0OlpyG

์ž๋ฐ” ์ฝ”๋”ฉ ๋ฌด๋ฃŒ ๊ฐ•์˜ (๊ธฐ๋ณธํŽธ) - 9์‹œ๊ฐ„ ๋’ค๋ฉด ์—ฌ๋Ÿฌ๋ถ„๋„ ๊ฐœ๋ฐœ์ž๊ฐ€ ๋  ์ˆ˜ ์žˆ์–ด์š” | ๋‚˜๋„์ฝ”๋”ฉ[๐Ÿ”]

https://youtu.be/NQq0dOoEPUM

[๋‚˜์šฐ์บ ํผ์Šค]java[๐Ÿ”]

https://youtube.com/playlist?list=PLEk6DN9YLL6c_Dy-3yJhIKFP0AktqZVeE&si=LKZwqtWBhup8gY1k


Free University of Bolzano/Bozen | Faculty of Computer Science - Bachelor in Applied Computer Science | Bachelor in Production Engineering

https://www.inf.unibz.it/~calvanese/teaching/06-07-ip/lecture-notes/


ํ•œ๊ธ€์„ค๋ช…[Java] ์ž๋ฃŒ๊ตฌ์กฐ01 : ์ž…์ถœ๋ ฅ, ๋ณ€์ˆ˜, ๋ฐฐ์—ด, ๋ฐ˜๋ณต๋ฌธ [๐Ÿ”]

https://ccomrung-programming.tistory.com/m/39

์ž๋ฐ”์˜ ์ •์„(2020๋…„ver)[๐Ÿ”]

https://youtube.com/playlist?list=PLW2UjW795-f6xWA2_MUhEVgPauhGl3xIp

์ž๋ฐ”FX ๊ฐ•์ขŒ[๐Ÿ”]



Java tutorials(ORACLE)

https://docs.oracle.com/javase/tutorial/index.html



Java for Beginners[๐Ÿ”]

https://www.youtube.com/playlist?list=PLlrxD0HtieHgX3ExVDMlKjdN8LJsks2CM


Jave_Lang[๐Ÿ”]

  • Learning Java Language - Compiled from StackOverflow Documentation (PDF)

https://riptutorial.com/Download/java-language.pdf



ORACLE __ Java Tutorials[๐Ÿ”]

https://docs.oracle.com/javase/tutorial/index.html


๋ชจ๋“  ์–ธ์–ด๋ฅผ ๋ฌด๋ฃŒ๋กœ ๊ณต๋ถ€ํ•  ์ˆ˜ ์žˆ๋‹ค.[๐Ÿ”]

์ถœ์ฒ˜ : stackoverflow.com ์•Œ๊ฒŒ ๋œ ๋งํฌ

์—ญ์‹œ ๊ฐ“ ์Šคํƒ ์˜ค๋ฒ„ํ”Œ๋กœ์šฐ

https://stackoverflow.com/questions/38683512/why-git-shallow-clone-can-have-more-commits-than-depth/38683775#38683775

Github ์ฃผ์†Œ https://github.com/EbookFoundation/free-programming-books

EbookFoundation https://ebookfoundation.github.io/free-programming-books/

Java Windows Settings

  • Java ๊ฐœ๋ฐœ์ž ๊ธฐ๋ณธ ์„ธํŒ…

https://skypacific.github.io/2019/01/24/kang.heehun@dev-env-setting.html

choco install javaruntime

Java Vim Setting (WindowsOS)[๐Ÿ”]

:LspInstall

Installed eclipse-jdt-ls

Install(Eclipse)[๐Ÿ”]

https://www.eclipse.org/downloads/packages/installer

macOS

https://formulae.brew.sh/cask/eclipse-ide WindowsOS

choco https://community.chocolatey.org/packages/eclipse

eclipse & tomcat[๐Ÿ”]

PS C:\Users\user> choco install tomcat
Chocolatey v1.2.1
Installing the following packages:
tomcat
By installing, you accept licenses for the packages.
Progress: Downloading Tomcat 9.0.74... 100%

Tomcat v9.0.74 [Approved]
tomcat package files install completed. Performing other installation steps.
The package Tomcat wants to run 'chocolateyInstall.ps1'.
Note: If you don't run this script, the installation will fail.
Note: To confirm automatically next time, use '-y' or consider:
choco feature enable -n allowGlobalConfirmation
Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint): a

Extracting 64-bit C:\ProgramData\chocolatey\lib\Tomcat\tools\apache-tomcat-9.0.74-windows-x64.zip to C:\ProgramData\chocolatey\lib\Tomcat\tools...
C:\ProgramData\chocolatey\lib\Tomcat\tools
C:\ProgramData\Tomcat9
Installing the service 'Tomcat9' ...
Using CATALINA_HOME:    "C:\ProgramData\chocolatey\lib\Tomcat\tools\apache-tomcat-9.0.74"
Using CATALINA_BASE:    "C:\ProgramData\Tomcat9"
Using JAVA_HOME:        "C:\Program Files\OpenJDK\jdk-19.0.2"
Using JRE_HOME:         "C:\Program Files\OpenJDK\jdk-19.0.2"
Using JVM:              "C:\Program Files\OpenJDK\jdk-19.0.2\bin\server\jvm.dll"
The service 'Tomcat9' has been installed.
Environment Vars (like PATH) have changed. Close/reopen your shell to
 see the changes (or in powershell/cmd.exe just type `refreshenv`).
 ShimGen has successfully created a shim for tomcat9.exe
 ShimGen has successfully created a shim for tomcat9w.exe
 The install of tomcat was successful.
  Software installed to 'C:\ProgramData\chocolatey\lib\Tomcat\tools'

Chocolatey installed 1/1 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Apache Tomcat Server Tutorial for Beginners

https://youtu.be/u_InEBgRVcc