Jump to content
Hybris

Json Minimal Class Error

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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 😛

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...