To begin with, I'm not entirely sure this is the correct question. Basically, my end goal is to produce a program that can manipulate a set of .docx files to have small changes to each of them. It seemed to me that docx4j was the best way to complete this goal. However, I've never used a library outside of the provided one. I began by attempting to decipher all the information provided in the manual, and it began by telling me I need SLF4J in order to let me use docx4j.
The SLF4J manual told me to "add the file slf4j-api-1.7.7.jar to your class path." as well as the file "slf4j-simple-1.7.7.jar"
I proceeded to go to System > Advanced System Settings > Environment Variables and I found "Path" under System variables. It seemed to me that this was the correct "class path", so I added to the end of it C:\Users\diego_000\Desktop\slf4j-1.7.7\slf4j-api-1.7.7.jar;C:\Users\diego_000\Desktop\slf4j-1.7.7\slf4j-simple-1.7.7.jar; This seemed to be what the manual told me to do and I was confident of the Hello World program (provided by their website) running successfully.
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class HelloWorld {
public static void main(String[] args) {
Logger logger = LoggerFactory.getLogger(HelloWorld.class);
logger.info("Hello World");
}
}
On compilation, I'm thrown the following errors:
Compilation completed. The following files were not compiled:
4 errors found:
File: C:\Users\diego_000\Desktop\Program\HelloWorld.java [line: 1]
Error: package org.slf4j does not exist
File: C:\Users\diego_000\Desktop\Program\HelloWorld.java [line: 2]
Error: package org.slf4j does not exist
File: C:\Users\diego_000\Desktop\Program\HelloWorld.java [line: 6]
Error: cannot find symbol
symbol: class Logger
location: class HelloWorld
File: C:\Users\diego_000\Desktop\Program\HelloWorld.java [line: 6]
Error: cannot find symbol
symbol: variable LoggerFactory
location: class HelloWorld
From this, I gather I've done something wrong. I'm fairly certain I know the pseudo logic behind the program I want to write, but I'm not really sure how to get to the point of writing it. I haven't done any research past the point I'm at, but if someone could go beyond just this question and walk me through the steps of getting to the writing code point, I would very much appreciate it.
Thanks!