When we convert code to jar file we get this error. the code works with IDE
public String getwordleString() {
Path path = Paths.get("..\\termproject\\word_database.txt");
List<String> wordList = new ArrayList<>();
try {
wordList = Files.readAllLines(path);
} catch (IOException e) {
e.printStackTrace();
}
Random random = new Random();
int position = random.nextInt(wordList.size());
return wordList.get(position).trim().toUpperCase();
}
Error part is : https://ibb.co/z6vZLW5