Use Java external library for the time being

prologue

Anything is fine, so I'll try using the library.

manner

Get the library file. This time I will use slf4j, which is famous for log operations.

Download the jar file from slf4j-api-1.7.25.jar at here. 1.png

Right-click the target project in Eclipse and open "Add External Archive" in "Build Path". 3.png

Select the target library and open "Build Path Configuration" under "Build Path". 4.png

Click "Apply and Close". 5.png

Write the code for execution.

package test1;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Test1 {

	public static void main(String[] args) {

		Logger logger = LoggerFactory.getLogger("testLoger");
		logger.info("test");
		//TODO auto-generated method stub
		System.out.println("Hello World");

	}

}

When I ran it, I got an error, though it has nothing to do with the main story. Apparently, "slf4j-simple-1.7.25.jar" is also required, so I downloaded the jar and added it to the build path as well.

When I ran it again, it ran normally. 6.png

Now that I know how to use the library, I would like to continue using it.

Recommended Posts

Use Java external library for the time being
Run Dataflow, Java, streaming for the time being
I want you to use Scala as Better Java for the time being
Hello World with Ruby extension library for the time being
Introduction to java for the first time # 2
[Java] Use cryptography in the standard library
Learning for the first time java [Introduction]
Use the l method for time notation
Java14 came out, so I tried record for the time being
Java12 came out, so I tried the switch expression for the time being
For the time being, run the war file delivered in Java with Docker
[First Java] Make something that works with Intellij for the time being
Install Amazon Corretto (preview) for the time being
[Deep Learning from scratch] in Java 1. For the time being, differentiation and partial differentiation
How to use Truth (assertion library for Java / Android)
Learn for the first time java # 3 expressions and operators
Try running Spring Cloud Config for the time being
Learning memo when learning Java for the first time (personal learning memo)
Command to try using Docker for the time being
[Java] Use ResolverStyle.LENIENT to handle the date and time nicely
Spring Boot for the first time
java (use class type for field)
Welcome to the Java Library Swamp! !!
Spring AOP for the first time
Building a DLNA server on Ubuntu (just move for the time being)
[Java] How to use the File class
[Java] How to use the hasNext function
Glassfish tuning list that I want to keep for the time being
Java Artery-Easy to use unit test library
[Java] How to use the HashMap class
[Beginner] Java method / class / external library [Note 23]
About the procedure for java to work
[Java] How to use the toString () method
Studying how to use the constructor (java)
Java Programming Style Guide for the Java 11 Era
[Processing × Java] How to use the loop
[Processing × Java] How to use the class
[Socket communication (Java)] Impressions of implementing Socket communication in practice for the first time
[Java] How to use the Calendar class
Programming for the first time in my life Java 1st Hello World
Impressions and doubts about using java for the first time in Android Studio
The training for newcomers was "Make an app!", So I made an app for the time being.
I tried using Docker for the first time
Check the options set for the running Java process
[Java] How to use Thread.sleep to pause the program
ChatWork4j for using the ChatWork API in Java
[Java] Set the time from the browser with jsoup
Use Java7 try-with-resources statement for Cursor close processing
Android Studio development for the first time (for beginners)
[Java] (for MacOS) How to set the classpath
I tried touching Docker for the first time
How to use the replace () method (Java Silver)
The date time of java8 has been updated
Let's use Java New FileIO! (Introduction, for beginners)
2017 IDE for Java
A memo to do for the time being when building CentOS 6 series with VirtualBox
[Java] Use Collectors.collectingAndThen
[Android studio / Java] What you don't understand when you touch it for the first time
[Rails] N + 1 is evil! If it does occur, resolve it for the time being! !! Is dangerous
Java for statement
Use fast Mapping library MapStruct with Lombok and Java 11