Java IDEã«ããããããããã©ãããããã®ç¹æ§ã¨ãã¦IDEãã©ãã ãJavaãç¥ã£ã¦ãããã¨ãããã¨ã§æ±ºã¾ãã¨ãããã¨ãTwitterã«æ¸ããã®ã§ãã¡ãã£ã¨å
·ä½çã«æ¸ãã¦ã¿ã¾ãã
IDEã®ä½¿ããããã«ã¤ãã¦ããã®IDEãã©ãã ãã¡ããã¨è¨èªãç¥ã£ã¦ãããä¾åãããã ãã©ãIntelliJ IDEAãä¸çªJavaè¨èªãç¥ã£ã¦ãã¦ãNetBeansã¯Javaã®ã¨ã³ã·ã¹ãã ãç¥ã£ã¦ãã¦ãEclipseã¯Javaãã¸ãã¹ãç¥ã£ã¦ããã»ã»ã»
— ããã ൠ(K8S(Kishidades)) (@kis) 2020å¹´10æ30æ¥
VS Codeã¯ã¾ã¨ããµã¤ãã§è¦ãã¬ãã«ã§Javaãç¥ã£ã¦ãæ
ã¡ãªã¿ã«ãå ¨ä½ã¨ãã¦NetBeansæ¨ãã§ãã
使ãåãã¨ãã¦ã¯ãããªãã¨æ¸ãã¦ã¾ãã
Java IDEã®é¸ã³æ¹
— ããã ൠ(K8S(Kishidades)) (@kis) 2020å¹´5æ19æ¥
æ©è½ããããã©ä½¿ããããã¦å®å®ããã®ãããâIntelliJ IDEA CE
æ©è½å¤ãã®ããããã©èª²éããã»ã©ã§ã¯ãªãâNetBeans
課éãã¦ã¢ãªã¢ãªãã£ã¦ãããâIntelliJ Ultimate
Javaã¨ããã¾ã«æ¸ãã ãããâVS Code
ã ããã«ä½¿ãã¦è¨ãããâEclipse
è¬ã®åãåããâJDeveloper
IntelliJ IDEAã¯Javaã³ã¼ãã£ã³ã°ã¨ã¨ã³ã¸ãã¢å ±éã®ä½æ¥ã«ã¤ãã¦ããç¥ã£ã¦ã
IDEAã®Javaã¨ãã£ã¿ã¯Javaã®ã³ã¼ããæ¸ããã¨ã«ã¤ãã¦ããç¥ã£ã¦ãã¦ããããµãã¼ãããã¦ããã¾ãã
ãã¨ãã°æååã®é
åã«ã¤ãã¦è£å®ãããã¨ããã¨ãé
åããã£ã¦ãããã£ã¼ã«ãã»ã¡ã½ããã ãã§ã¯ãªãã¦ãStreamã«é¢ãããã®ãæ示ãã¦ããã¾ãã
ãã§ãStreamã«é¢ãããã®ãé¸ã¶ã¨Arrays.stream
ãèªåçã«ããã¦ãããã
ãã¨GitHubé£æºã¨ãå ±åä½æ¥ã®æ©è½ã¨ããJavaã«é¢ä¿ãªãããã°ã©ãã³ã°ä¸è¬ã«å¿ è¦ãªãã¨ã«ã¤ãã¦ããç¥ã£ã¦ãã
ãã ãã³ã¼ã以å¤ã®Javaç¥èã¯ãã¾ããªãããã§ããã¨ãã°Mavenããã¸ã§ã¯ããä½ã£ã¦Hello worldãæ¸ãã¨ã¨ããããã¨ã©ã¼ã«ãªãã
(2020.3ã§ãªãããã)
Module Settingsã«é
ç®ããããªã£ã¦è¨å®ãã¦ã¿ã¦ãå¤ãããªãã
æ£è§£ã¯ãããã£ã¦æ¬¡ã®ãããªã³ã¼ããã¿ã¤ãã¦pom.xmlã«è²¼ãä»ãã¦reload projectããã¨ãããåå¿è ãèªåã§ã½ã¡ã½ã¡ããã«ã¯ãã¼ãã«ãé«ãããæä½ãå¿ è¦ãªã®ã§ãæ·å± ããããã»ã»ã»
<build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>15</source> <target>15</target> </configuration> </plugin> </plugins> </build>
ã¾ãã§ãããµã ã©ã¤ãºã ã«ãæãã¦ããï½ãã£ã¦è¨ãã°ä¸å¯§ã«æãã¦ããããã®ã§å®å¿ã
NetBeansã¯Javaã®ã¨ã³ã·ã¹ãã ãããç¥ã£ã¦ã
NetBeansã¯Javaã§ã¢ããªã±ã¼ã·ã§ã³ãéçºããã¨ãããã¨ãããç¥ã£ã¦ãã¦ãµãã¼ããã¦ãããã
ããã¸ã§ã¯ãä½æç»é¢ãè¦ãã¨ããããããã¨æãã
ããã©ã«ãã§Mavenã®ããã¸ã§ã¯ãã«ãªãã以åã¯Antããã¸ã§ã¯ããããã©ã«ãã ã£ãã
ããã¦ãã©ãããããã¸ã§ã¯ããä½ããã¨ããã®ãããããããä¸è¦§ã«ãªã£ã¦ããã
ããã¸ã§ã¯ãã®è¡¨ç¤ºãå¿
è¦ãªãã®ãè¦ããããã«ãªã£ã¦ã¦ããããããã
Dependencyãadd dependencyãã¦æ¤ç´¢ãã¦é¸ãã§è¿½å ã£ã¦ãªã£ã¦ãã
ã¾ããDependencyã¯çµå±ããã£ã¦ã¢ã¸ã¥ã¼ã«åã¨ãã¯ç¢ºèªããªãã¨ãããªããã ãã©ãã©ãã«è¿½å ãããã¨ãã¯å
¨é¨NetBeansã管çãã¦ãããã®ã§ããããããããã¡ãã¡Reload
projectããªãã¦ããããã
ã¨ãã«Tomcatã使ã£ã¦ãµã¼ãã¬ããã»JSPã使ãå ´åããJAX-RSãªããã®Java EE APIã使ãã¨ãã®ãµãã¼ããããªãããã§ãã
ãã ãSpring FrameworkãããªãJava EE使ãããã¿ãããªææã®åæ®ããã£ããããã®ã§ãSpringã«ã¤ãã¦ã®ãµãã¼ãã¯ããã¾ã§ãã£ãããã¦ãªãæãããã©ã°ã¤ã³ã¯ãã¨ããã¤ã³ã¹ãã¼ã«ããå¿ è¦ãããã
ãããããªããimportããã§ã«ããç¶æ ã§importè£å®ã®ãã¤ã¢ãã°ãã§ãã¨javaã¨ãç¡æå³ãªé¸æãåºãã¿ãããªãããããããã®ãåºãããè£å®ããã¯ãã®ã³ã¼ããæ¶ããã¨ãä¸å ·åãã¡ããã¡ãããã£ã¦ãå®å®æã«æ¬ ããã»ã»ã»
Eclipseã¯Javaãã¼ã«ãã¸ãã¹ãç¥ã£ã¦ã
ãªãããããã«ã¦ã§ã¢ãä½ã£ã¦ããç¨ã®ãã©ã°ã¤ã³ãä½ã£ã¦å²ãè¾¼ãã§ãããã¿ãããªãã¸ãã¹ãããç¥ã£ã¦ãæãããã
ããã°ã©ãã«é¢ä¿ãªãã®ã§ãã£ããã£ã¨ãã®ä¾ç¤ºãªãã
ãããã£ãå²ãè¾¼ã¿ããªãã®ã§ããã°ããã¾ãã使ãå§ãããã¼ã«ã§ã¯ãªãã¨æã£ã¦ãã
mavenããã¸ã§ã¯ãä½ã£ã¦ãããªãã¨ã©ã¼åºããã¯ããªãã¨ãããã¸ã§ã¯ãã®æ§é ã®è¡¨ç¤ºã¨ãã¯IntelliJ IDEAãããããã ãã©ã
VS Codeã¯ã¾ã¨ããµã¤ãã§ããç¥èæ
VS Codeã¯ããã¨ãã£ã¿ã§ãæ¡å¼µããã¦ããã°Java IDEã®ããã«ã使ãããã©ãæ¡å¼µéã®é£æºã¨ããèããã¨ããªããããããããéããã¾ã¨ããµã¤ãæããã
Java以å¤ã主ã«ä½¿ãã¨ã³ã¸ãã¢ãããªããã®äºæ
ã§Javaã³ã¼ãããããæ©ä¼ã«ééããã¨ãã«ä½¿ãæãã
ã¾ã¨ã
NetBeansãJavaã®IDEã¨ãã¦æ¹åæ§ã¯ä¸çªãããã ãã©æå ¥ããããªã½ã¼ã¹éã§IntelliJ IDEAã«å¤§ããè»é ãããããããã«ãããIDEAã®æ¬ ç¹ã®ãããªãã®ãããã®ãã¡è§£æ¶ãããã§ã¯ãªãããã