자바(JAVA)를 시작하기 전에 알아야 할 것들(4)- 프로젝트 생성, 첫 번째 자바 프로그램 작성

In the 04 module-info.java edit view, create requests java.se ; in the bracket { } block. This means that you need all the modules that Java SE (JDK) provides. Press [‘shift’ + ‘S’] to close the window.

cd C:\Path you saved\work\chap0102 The [Console] view is added at the bottom of the Eclipse, and “Hello World” is output as a result of the execution.03 In the Package Explorer view, select the ‘com.ex01’ package, right-click, and select New – Class.In the 02 [New Java Package] dialog box, type ‘com.ex01’ as the package name in the [Name] box and click the [Finish] button.H of Hello in Number 2 should be capitalized. S of String in Number 3 should be capitalized. S of System in Number 4 should be capitalized. Put a semicolon (. ) at the end of Number 4. [Execute Byte Code] It’s very simple to run a byte code file generated by this clip. 01 Select the source file Hello.java in the Package Explorer view, click the [Run] icon in the toolbar, right-click, and select [Run As] – [Java Application] to run the byte code file.Hello, I am a survivor who strives for steady growth as a developer. Lol, I made a blog for deep understanding and studying in my own way. I hope it is a good reference to make this blog with the hope that other people will also refer to my blog and study well. In the last article, I looked into installing, encoding, and changing the theme of Eclipse.The settings in the [New Java Project] dialog box are as follows. Enter the new project name ‘chap01’ in the [Project name] box. In the [Location] box, check the path to create the project folder. Check the version of Java that you want to use in [JRE]. [Project layout] is set up by default to store the Java source file (.java) and the compiled byte code file (.class). [Module] Because projects created by Eclipse are made into modules, a module-info.java, called module descriptor, is required.03 If you look at the Pakcage Explorer view, the ‘chap01’ project is created, and the module-info.java file is automatically created, as shown below.When the 02 [New Java Project] dialog box appears, type the new project name ‘chap01’ in the [Project name] box and click the [Finish] button while leaving the rest intact.[Project] To create a Java source file in this clip, you must first create a Java project.01 Select File – [New] – [Java Project] to create a Java project.Let’s try compiling the source file in the 03 src folder with the javac command to create a byte code file in the bin folder. From JDK 11 and later versions, you must also include the module descriptor (module-info.java) in the compilation target. This is because the module descriptor describes the dependency module with the requirements keyword. To compile the source file (com/ex01/*.java), the compiler refers to the dependency modules described in the module descriptor. After compiling with the javac command and executing the tree /f/a command, you can see that the module-info.class and the byte code file (com/ex01/Hello.class) have been created in the bin folder.package class01; //1public class Hello { //2public static void main(String[] args) { //3system.out.print(“Hello World”); //4}In the 04 [New Java Class] dialog box, type the class name ‘Hello’ in the [Name] box. To add the method automatically, check [Public static void main (String[] args)] and click the [Finish] button.Run the 02 command prompt and go to the chap01 folder by creating the following.06 In the edit view of Hello.java, write: After you complete the creation, save the source file and it automatically compiles. Eclipse doesn’t have a separate menu for compilation.javac -d bin src/module-info.java src/com/ex01/*.jav atree /f/ajava -p bin -m chap01/com.ex01.안녕하세요Things you need to know before starting JAVA(3) – Eclipse installation, encoding, color theme hello. I’m a survivor who strives for steady growth as a developer. lol I have a deep understanding and in my own way… blog.naver.com모듈 chap01 {java.se 필요;}05 If you look at the Package Explorer view, you can see that the Hello.java source file has been created within the com.ex01 package. And the Hello.java edit view opens automatically. (The way to grow the text is ‘shift’ + ‘ctrl’ + ‘+.’)This article is about project creation and how to execute code in different ways. It’s still going to be very difficult in the basics. (Actually, it’s hard for me, too.) It’s okay if you look at it with your eyes and try to copy it for the first time, and then pass it to the point that it’s possible in this way. I think it’s better to see it again later when you know more and have some knowledge.[Create and create source files] Let’s create a Hello.java source file and write a code that outputs “Hello.Java” to the monitor.01 Package Explorer view, select the src folder for the chap01 project, right-click, and select New – [Package].

error: Content is protected !!