Click here to Skip to main content
15,506,025 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Java
TileManager.class.getResourceAsStream("maps/Level_0.json")
works fine if I compile everything, but when I put it in a jar, it returned
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/JsonDeserializer
	at tile.TileManager.loadMap(TileManager.java:76)



My code for loading the JSON file is:
Java
InputStream is = TileManager.class.getResourceAsStream(src);

    assert is != null;
    content = new BufferedReader(new InputStreamReader(is))
            .lines().collect(Collectors.joining("\n"));

    System.out.println(content);
    data = Converter.fromJsonString(content);


Java
data = Converter.fromJsonString(content);

this is line 76.

What I have tried:

I do not know what this error means, so I don't know what to try.
Posted
Updated 4-Sep-22 23:04pm

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900