launching hello world
Papá
papa at arbolone.ca
Thu Dec 3 16:40:20 UTC 2015
I am not sure if this is the mailing list I should be posting in this question, but to the lack of java-newbie mailing list this was my first choice.
Using Eclipse Java Mars.1, I wrote a programs that displays the world “Hi!” that looks like this:
------------
package ca.arbolone.jme;
public class Person {
private String name;
Person(){
name = "Hi!";
}
public String getName(){ return name; }
}
--------------
package ca.arbolone.jme;
import java.util.Scanner;
public class TotalBegginer {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner keyboard = new Scanner(System.in);
Person person = new Person();
System.out.println( person.getName() );
keyboard.nextLine();
}
}
Which creates the following directories
Directory: C:\Users\Del\Documents\Eclipse\TotalBegginer
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2015-12-02 5:40 AM .settings
d----- 2015-12-02 5:42 AM bin
d----- 2015-12-02 5:42 AM src
-a---- 2015-12-02 5:40 AM 301 .classpath
-a---- 2015-12-02 5:40 AM 389 .project
2015-12-03 11:34 AM 0 TotalBegginer.txt
Directory: C:\Users\Del\Documents\Eclipse\TotalBegginer\.settings
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2015-12-02 5:40 AM 598 org.eclipse.jdt.core.prefs
Directory: C:\Users\Del\Documents\Eclipse\TotalBegginer\bin
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2015-12-02 5:42 AM ca
Directory: C:\Users\Del\Documents\Eclipse\TotalBegginer\bin\ca
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2015-12-02 5:42 AM arbolone
Directory: C:\Users\Del\Documents\Eclipse\TotalBegginer\bin\ca\arbolone
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2015-12-02 6:47 AM jme
Directory: C:\Users\Del\Documents\Eclipse\TotalBegginer\bin\ca\arbolone\jme
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2015-12-02 7:34 PM 441 Person.class
-a---- 2015-12-02 7:34 PM 880 TotalBegginer.class
Directory: C:\Users\Del\Documents\Eclipse\TotalBegginer\src
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2015-12-02 5:42 AM ca
Directory: C:\Users\Del\Documents\Eclipse\TotalBegginer\src\ca
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2015-12-02 5:42 AM arbolone
Directory: C:\Users\Del\Documents\Eclipse\TotalBegginer\src\ca\arbolone
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2015-12-02 6:47 AM jme
Directory: C:\Users\Del\Documents\Eclipse\TotalBegginer\src\ca\arbolone\jme
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 2015-12-02 7:34 PM 159 Person.java
-a---- 2015-12-02 7:34 PM 325 TotalBegginer.java
There is nothing here with the extension “.exe”; coming from the C/C++ world I wonder,
How do I dun my program by clicking on it?
Please help me understand, do I have to write a batch file or create an executable in C?
Sent from Mail for Windows 10
More information about the jdk9-dev
mailing list