Thread: Seems silly but not sure why it's happening

Results 1 to 6 of 6
  1. #1 Seems silly but not sure why it's happening 
    Banned

    Join Date
    Mar 2011
    Posts
    657
    Thanks given
    105
    Thanks received
    75
    Rep Power
    0
    I know the main class to my client is Client, so I created a batch file with this inside

    Code:
    @echo off
    java Client
    pause
    and I get this error

    Error: Could not find or load main class Client
    Press any key to continue . . .
    Attached image

    Seems rather silly. Hopefully its an dumb error on my end.

    Thanks, I know Eclipse works BTW. Just want to use batch.
    Reply With Quote  
     

  2. #2  
    Banned

    Join Date
    Jul 2017
    Posts
    195
    Thanks given
    54
    Thanks received
    57
    Rep Power
    0
    Doesn't batch need the location of your jre?
    Reply With Quote  
     

  3. #3  
    Banned

    Join Date
    Mar 2011
    Posts
    657
    Thanks given
    105
    Thanks received
    75
    Rep Power
    0
    Quote Originally Posted by Kearney View Post
    Doesn't batch need the location of your jre?
    I set my environmental variables so when I type 'java' it finds my JRE personally.
    Reply With Quote  
     

  4. #4  
    ᐯᗴᑎᗝᗰ丨丅ᗴ
    AryJaey's Avatar
    Join Date
    Apr 2016
    Posts
    253
    Thanks given
    91
    Thanks received
    112
    Rep Power
    667
    If you use eclipse you prob don't have a bin folder, you'd need one if you are going to use batch files. Make bin folder and put all class files into it. Then add "-cp bin; " between Java and client in your batch file
    Reply With Quote  
     

  5. #5  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    Seems like your Client.class do not have a main function inside it.
    Are you sure that is what you run with your eclipse and not another class file?


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  6. #6  
    Registered Member
    Join Date
    Apr 2017
    Posts
    13
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    if your client.class is within a package (directory) you need to call like this:
    java org.runescape.Client
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Not sure why it's not working...
    By Lyrical in forum Help
    Replies: 1
    Last Post: 12-11-2015, 02:47 AM
  2. [508] Password bug fix [NOT SURE IF IT FIXES]
    By Encouragin in forum Tutorials
    Replies: 24
    Last Post: 11-29-2008, 05:24 AM
  3. Replies: 2
    Last Post: 08-18-2007, 05:49 PM
  4. my first try to make a sig( not sure if its a sig)
    By freddytheboy in forum Showcase
    Replies: 8
    Last Post: 05-01-2007, 10:09 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •