Use Java external library for the time being


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


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");"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
[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
Access Web API on Android with Get and process Json (Java for the time being)
Spring Boot for the first time
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
Glassfish tuning list that I want to keep for the time being
[Beginner] Java method / class / external library [Note 23]
[Java] How to use the toString () method
Studying how to use the constructor (java)
Java Programming Style Guide for the Java 11 Era
2018 Java Recommended library for easily creating microservices
[Processing × Java] How to use the loop
[Java] How to set the Date time to 00:00:00
[Processing × Java] How to use the class
[Socket communication (Java)] Impressions of implementing Socket communication in practice for the first time
[Processing × Java] How to use the function
[Java] How to use the Calendar class
Programming for the first time in my life Java 1st Hello World
Check the options set for the running Java process
[Java] What should I use for writing files?
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
Walls hit by Rspec for the first time
Feel the passage of time even in Java
What is the volatile modifier for Java variables?
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
The date time of java8 has been updated
Let's use Java New FileIO! (Introduction, for beginners)
Introducing the library
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
Try implementing the Eratosthenes sieve using the Java standard library
How to use java non-standard library on IntelliJ IDEA