-
Notifications
You must be signed in to change notification settings - Fork 0
Getting started
nero edited this page Jan 21, 2019
·
4 revisions
Download the .jar from the github release page. Then import it to your project as an external library.
Add these lines to maven:
<dependency>
<groupId>io.github.n3roo</groupId>
<artifactId>nero-engine</artifactId>
<version>**Engine still not released**</version>
</dependency>
To start the engine you only need one line of code. Then you can use everything you want with the engine.
public static void main(String[] args){
NeroEngine.start();
// Your code
}
If you want to log, you should use the log4j2 logger since the engine already uses this one, and it is already configurated. To use it you need to add these lines to maven:
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.11.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.11.1</version>
</dependency>
Then, you need to use:
private static final Logger LOGGER = LogManager.getLogger(NeroEngine.class.getName());
private void foo(){
LOGGER.info("some info");
LOGGER.warn("some warning");
// and so on
}