Tutorial The Coding Chronicles - Chapter Two: Hello, World!

Discussion in 'Tutorials & Resources' started by Party, May 12, 2016.

  1. Party

    Party The Favourite

    Joined:
    Oct 12, 2015
    Messages:
    3,150
    Likes Received:
    1,434

    Attached Files:

    blahberrys and Swiss396 like this.
  2. Fittstock

    Joined:
    Oct 10, 2015
    Messages:
    51
    Likes Received:
    4
    This is perfect, trying to learn all i can :)! Hopefully i'll be able to make a bot soon enough
    Just hoping the 3hour limit won't kill me haha
     
  3. Derk

    Derk 12 year old normie

    Joined:
    Jan 8, 2015
    Messages:
    1,988
    Likes Received:
    730
    Every sane person wouldn't print out 'Hello world!' for 3 hours straight, I hope. ;-;
     
    BirdShapedTurd likes this.
  4. Fittstock

    Joined:
    Oct 10, 2015
    Messages:
    51
    Likes Received:
    4
    Haha, more like 2 hours, going insane over here!
     
  5. snoipa

    Joined:
    Feb 21, 2016
    Messages:
    53
    Likes Received:
    9
    @Party Where did I go wrong?
     

    Attached Files:

  6. Party

    Party The Favourite

    Joined:
    Oct 12, 2015
    Messages:
    3,150
    Likes Received:
    1,434
    My guess is that you either A. haven't compiled your code upload_2016-11-14_9-39-2.png , or B. haven't given the correct path in your manifest or client settings.
     
  7. snoipa

    Joined:
    Feb 21, 2016
    Messages:
    53
    Likes Received:
    9
    I have compiled the code, umm, based on the picture can you tell if my manifest is correct? or even if the main class is correct?
     
  8. Party

    Party The Favourite

    Joined:
    Oct 12, 2015
    Messages:
    3,150
    Likes Received:
    1,434
    Actually your path is wrong within your Spectre config:

    upload_2016-11-14_11-2-3.png
     
  9. Jaakkol

    Joined:
    May 19, 2015
    Messages:
    262
    Likes Received:
    58
    I'm getting the following error while trying to run the Spectre.

    Code (Text):
    1.  
    2. "C:\Program Files (x86)\Java\jdk1.8.0_111\bin\java" -Didea.launcher.port=7534 -Didea.launcher.bin.path=C:\Users\MyName\AppData\Local\JetBrains\Toolbox\apps\IDEA-C\ch-0\163.12024.16\bin -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\Java\jdk1.8.0_111\lib\ant-javafx.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\lib\dt.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\lib\javafx-mx.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\lib\jconsole.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\lib\packager.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\lib\sa-jdi.jar;C:\Program Files (x86)\Java\jdk1.8.0_111\lib\tools.jar;C:\Users\Jake\IdeaProjects\TestProject\out\production\TestProject;C:\Program Files (x86)\RuneMate\RuneMate.jar;C:\Users\Jake\AppData\Local\JetBrains\Toolbox\apps\IDEA-C\ch-0\163.12024.16\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain com.runemate.boot.Boot -sdk
    3. Exception in Application start method
    4. Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
    5.    at nul.IIIiIIiIIiiI.enum(qta:5943)
    6.    at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
    7.    at java.security.AccessController.doPrivileged(Native Method)
    8.    at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
    9.    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    10.    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    11.    at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
    12.    at java.lang.Thread.run(Thread.java:745)
    13. Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
    14.    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
    15.    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
    16.    at java.lang.Thread.run(Thread.java:745)
    17. Caused by: java.lang.NoSuchMethodError: sun.jvmstat.perfdata.monitor.AbstractPerfDataBufferPrologue.for(Ljava/lang/String;)Ljava/lang/String;
    18.    at nul.iiIIiiIIiIII.<clinit>(cyb:23)
    19.    at nul.iiIiIiIIiIii.for(cyb:6440)
    20.    at nul.iIIIiiIiiIii.<init>(uq:22458)
    21.    at nul.iiIIIiIIIiiI.<init>(uq:8522)
    22.    at nul.iiIiIiIIiIii.for(cyb:24439)
    23.    at nul.IiiiIIiIiIII.<init>(bsb:60)
    24.    at nul.iIiIIIiiiiIi.<clinit>(pqb:191)
    25.    at nul.iIIiiIiIiiIi.<clinit>(sna:27)
    26.    at nul.IIIiIIiIIiiI.initialize(qta:19697)
    27.    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548)
    28.    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
    29.    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2409)
    30.    at nul.iiIIIIiiIiIi.for(pwa:115)
    31.    at nul.iiIIIIiiIiIi.<init>(pwa:203)
    32.    at nul.iiIIIIiiIiIi.<init>(pwa:71)
    33.    at nul.IIIiIIiIIiiI.<init>(qta:144)
    34.    at nul.IIIiIIiIIiiI.for(qta:20801)
    35.    at com.runemate.boot.Boot.start(wlb:146)
    36.    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
    37.    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
    38.    at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
    39.    at java.security.AccessController.doPrivileged(Native Method)
    40.    at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
    41.    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    42.    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    43.    at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
    44.    ... 1 more
    45.  
     
  10. chris121

    Joined:
    May 27, 2016
    Messages:
    733
    Likes Received:
    122
    I greatly appreciate this party thank you.
     
  11. dogetrix

    Joined:
    Feb 18, 2017
    Messages:
    179
    Likes Received:
    43
    I'm getting this error:
    `
    java.lang.UnsupportedOperationException: Only a Thread within a bot's ThreadGroup may eavesdrop on the game client. Current Thread=Thread[pool-12-thread-1,5,[t-g]10364 - Tutorial bot]
    at nul.iIIIIiiIiIiIi.super(kyb:132)
    at com.runemate.game.api.hybrid.Environment.getGameType(ldc:4)
    at com.runemate.game.api.hybrid.Environment.isOSRS(ldc:24)
    at nul.iiiiIiiIIIiii.super(vgb:18)
    at nul.iiiiIiiIIIiii.<init>(vgb:114)
    at com.runemate.game.api.script bot.framework.rws.WebServices.<init>(sab:59)
    at com.runemate.game.api.script bot.framework.rws.WebServices.associate(sab:102)
    at com.runemate.game.api.script bot.framework.AbstractBot.super(qhb:24410)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    `

    My code is exactly the same as the tutorial. what could be the problem?
     
  12. Qosmiof2

    Qosmiof2 Qosidog3 - I write bots not tragedies.

    Joined:
    Aug 5, 2014
    Messages:
    2,248
    Likes Received:
    666
    restart the bot. This is a known client sided bug. NOthing to worrry about.
     
    dogetrix likes this.
  13. Sinning

    Joined:
    Aug 9, 2017
    Messages:
    23
    Likes Received:
    0
    Found this very helpful as someone just starting to develop bots in Java. @Party I think it's about time for tutorial #3
     
  14. Party

    Party The Favourite

    Joined:
    Oct 12, 2015
    Messages:
    3,150
    Likes Received:
    1,434
    When I have time I'll start from scratch with video tutorials and open-source code examples. The Prime extension API is available here.
     
  15. Sinning

    Joined:
    Aug 9, 2017
    Messages:
    23
    Likes Received:
    0
    Coming from PHP I'm completely new to Java, but absolutely loving it so far, will be cranking out a few bots here soon. Cheers!
     
  16. shayta

    Joined:
    Jul 10, 2017
    Messages:
    6
    Likes Received:
    1
    Right in the end, after building the project and trying to run it, the console says: Error: Could not find or load main class com.runemate.boot.Boot

    Where did i go wrong?
     
  17. Furor

    Joined:
    Jun 21, 2014
    Messages:
    346
    Likes Received:
    102
    Please update 3) Execution to instruct developers to click on debug instead of run. There is currently a problem for some users where bots are not reloaded correctly by IntelliJ, which may result in frustration. @Party
     

Share This Page

Loading...