Skip to content
/ template-java Public template

Java template πŸ‹ πŸ«–β˜•οΈπŸ˜

License

Notifications You must be signed in to change notification settings

mohsenhariri/template-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Java Project Template

This is a template for a Java project using the Makefile build system.

Structure

src/
β”œβ”€β”€ main
β”‚   β”œβ”€β”€ java
β”‚   β”‚   └── com
β”‚   β”‚       └── pokeverse
β”‚   β”‚           └── pokemon
β”‚   β”‚               └── App.java
β”‚   └── resources
β”‚       └── db.properties
└── test
    └── java
        └── com
            └── pokeverse
                └── pokemon
                    └── AppTest.java

Makefile commands

make source

This target finds all Java source files in the $(SRC) directory and saves their paths to a file named sources.txt.

make compile

This target compiles the Java source files using $(JC) (the Java compiler) and saves the compiled class files to the $(DIST) directory. It also includes the classpath of the $(DIST) directory and all JAR files in the $(LIB) directory.

make run

This target runs the main class of the project using $(JAVA) (the Java runtime) and the classpath of the $(DIST) directory and all JAR files in the $(LIB) directory.

make build

This target creates a JAR file named App.jar containing the compiled class files and all files in the $(LIB) directory, using $(JAR) (the Java archiver).

make exec

This target runs the main class of the project using the JAR file created by the build target, as well as the classpath of the$(DIST) directory and all JAR files in the $(LIB) directory.

About

Java template πŸ‹ πŸ«–β˜•οΈπŸ˜

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published