Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Buy OSRS Gold

Sell OSRS Gold

Search the Community

Showing results for tags 'noclassfound'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • TRiBot
    • News and Announcements
    • Old School Scripts
    • Help and Guidance
    • Development
    • Bugs and Errors
    • Tutorials
  • Scripters' Forums
    • Scripter Application
  • RuneScape®
    • General
    • Guides/Tutorials
    • Achievements
  • General
    • General
    • Questions
    • Discussions & Debates
    • Introductions
    • Suggestions
    • Feedback
  • The Black Market
    • Disputes
    • Repository Credits
    • Gold Exchange
    • Item Exchange
    • Membership Sales
    • Services
    • Other
    • Middleman Services

Blogs

  • Getting Started With TRiBot
  • The Best Way To Get Rid Of Termites
  • How to Generate Real Estate Leads Using Twitter
  • A Guide to Landing Pages
  • Dog Grooming in Sydney – 5 steps to finding a grooming salon
  • Cheap RS 2007 Gold for Spring 2020!
  • Logo Design Mistakes- Your Business Should Avoid at All Cost
  • Effective Pest Control Measures
  • В Алматы карантин из-за коронавируса: жизнь в условиях пандемии
  • Preschool Educational Toys, Helping One's Child Prepare For the Future
  • Automating Tribot
  • Payment error
  • Animal Crossing: New Horizons Cuts Player Interest Rates
  • network-security-engineer
  • SERVICES 100% BY HAND

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


Bio

Found 1 result

  1. I'm trying to add a JSON library by adding every java file from https://github.com/stleary/JSON-java to my project. But it keeps giving me the error java.lang.NoClassDefFoundError: scripts/JSONObject Which makes sense because it fails to load the JSONObject. But why? Error Loading Local Script: JSONObject! I have tried to make a package inside the scripts package called "org.json" without any luck, I have also tried to put the files directly into scripts package.(Check picture for reference) I don't think the run method has anything to do with it, but it looks like this @Override public void run() { println("Hey Test"); JSONObject json = null; try { json = JsonParser.readJsonFromUrl("url"); } catch (IOException e) { e.printStackTrace(); } assert json != null; println(json.toString()); } JsonParser.readJsonFromUrl Comes from a class which is taken from StackOverflow - https://stackoverflow.com/questions/4308554/simplest-way-to-read-json-from-a-url-in-java- And looks something like that public class JsonParser{ private static String readAll(Reader rd) throws IOException { StringBuilder sb = new StringBuilder(); int cp; while ((cp = rd.read()) != -1) { sb.append((char) cp); } return sb.toString(); } public static JSONObject readJsonFromUrl(String url) throws IOException, JSONException { InputStream is = new URL(url).openStream(); try { BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8"))); String jsonText = readAll(rd); JSONObject json = new JSONObject(jsonText); return json; } finally { is.close(); } } } Yes, I do have VIP (at least for 2 days) and I'm using IntelliJ Idea. To set my project up I have used the guide from here. Thank you for your time
×
×
  • Create New...