Jump to content

Json Minimal Class Error


Recommended Posts

Posted

Hey there,

As I was making a script for myself I felt the need to have an accurate price grabber to determine my profit/hour.
After I finished the code I went on to test it on my script, but I encountered some errors. I hadn't encountered any problems with the price grabbing method when using the static main function, but when I used the exact same method in my script it gave me following errors:

java.lang.NoClassDefFoundError: com/eclipsesource/json/JsonObject
	at Utilities.Prices.getPrice(Prices.java:51)
	at Variables.Variables.setPrices(Variables.java:30)
	at Main.onStart(Main.java:66)
	at org.osbot.rs07.event.ScriptExecutor.IiiIiiiiiiII(yh:85)
	at org.osbot.rs07.event.ScriptExecutor.start(yh:42)
	at org.osbot.iA.IiiIiiiiiiII(uab:80)
	at org.osbot.vB.iiIIiiiiiiiI(ju:144)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.eclipsesource.json.JsonObject
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 10 more

 

I'm using Json Minimal (https://github.com/ralfstx/minimal-json) as a library imported with Maven. Any idea why this is happening?

Thanks in advance,
Hybris

Posted (edited)
4 hours ago, Hybris said:

Why doesn't it work like this?

I would answer you, but I can't really.

Just open the jar with a zip viewer and drag in the packages etc. in the library jar (The json one)

 

EDIT: Or even better, import the github java classes directly into your project.

Edited by Medusaa
Posted
15 hours ago, Medusaa said:

I would answer you, but I can't really.

Just open the jar with a zip viewer and drag in the packages etc. in the library jar (The json one)

 

EDIT: Or even better, import the github java classes directly into your project.

Yea I'll just pop the java classes in there, that should work 😛

Just hoped it would work with Maven since it's one less thing to look at, but ah well 😛

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...