PDA

View Full Version : Error: could not find main class | Can't open or launch bot



RiD
02-08-2010, 11:04 PM
1) This error may indicate you are using Java to execute the wrong file, a file that isn't a valid 'jar' file.

The bot download is a compressed file and you need to decompress it before you can run it. Make sure you've extracted the download and are executing the correct file HERE (http://www.robotzindisguise.com/forum/showthread.php?195-I-downloaded-the-bot-but-how-do-I-open-it) For example, you should be running 'RiD.jar' NOT 'RiD.rar'.

2) This error can also indicate a problem with your Java setup.

A) To fix your Java setup, first go to Start Menu > Control Panel > Add or Remove programs and remove all versions of Java(TM).
Then go to http://www.java.com/en/download/manual.jsp and download and install the latest version of Java. You will be guided through the installation process, and once the latest Java is setup, you should be able to run the bot by double-clicking.

B) If that doesn't fix it, try right-clicking the file, select open with, and choose C:\Program Files\Java\jre8\bin\javaw.exe ( "Program Files (x86)" for 64bit users with 32bit Java)

C) If that didn't work...
Go to Start > Control Panel > Java to open the Java Options menu.
Click the 'Java' tab, and under 'Java Run-time Environment Settings' click 'view'.

A window will popup, listing all your Java Run-time versions. (You should only have one, the latest version (currently 1.8) - if you have more than one, then delete the others from Control Panel > Add & Remove Programs).

Underneath the 'Path' option, make sure the path to javaw.exe is set correctly. (Unless for some reason your Java folder isn't under Progam Files, the default) The correct path is 'C:\Program Files\Java\jre8\bin\javaw.exe'.


D) If you're still getting the error at this point, try the following solution:
First open "notepad" - Start Menu > Run then type "notepad" and push enter to open notepad. http://puu.sh/2ffXC/c36e18b1cc

1) enter the following into notepad:
java -jar RiD.jar
This is CASE SENSITIVE, so make sure you enter the name of the file correctly eg "RiD.jar" is correct, "rid.jar" is incorrect.

2) In Notepad got File > Save As
3) click on Save As Type and select All Files *don't forget this step

http://puu.sh/2ffTj/2c3e25ab21
4) go to the folder where RiD.jar is
5) Name the file run.bat and click Save
run must be saved in the same folder as RiD.jar

Now double-click run to start the bot!

http://puu.sh/2ffYA/b9623a65c2


3) For further problems >>
If the bot doesn't open at this point, you will get a detailed error message.

1) If you get a "Could not find main class" error message, to fix this right-click run.bat and select Edit then change it to following:
set CLASSPATH=
java -jar RiD.jarThen click Save and double-click run to run the bot!


2)For any other error message, please contact us with the error message, and we will resolve it for you shortly after. Thanks

iconicate
06-30-2010, 10:01 AM
Nice RiD, I considered studying java language as a hobbie back when i was doing my Diploma in IT, didn't follow through with it unfortunately. Maybe I'll sub it in now with my Bachelor in IT..

kweeny
07-07-2010, 08:41 PM
Hello, I tried all the things, but still got that problem.
I also opened it with javaw.ex:S

R A Z T A
07-14-2010, 01:52 AM
i also have this problem... using java.exe i got the same error as he did but when switching to javaw.exe i got this...
http://i26.tinypic.com/2pqwcvk.jpg

rockit doc
07-29-2010, 06:59 AM
i have team veiwer if u could help me :)

Kriojenic
09-05-2011, 02:55 AM
thanks rid

TR0LLI
11-20-2011, 08:35 PM
Omg! Tysm<3! :)

tenshiket
01-01-2012, 12:55 PM
when i double click run a black box opens then closes. help please.

borg360
01-02-2012, 09:44 PM
^ exact same thing for me

----------

I used this guide for the problem I was having:
http://www.robotzindisguise.com/forum/showthread.php?197-Doesn-t-start-upon-double-click-Error-could-not-find-main-class.

I did all steps from 1) to 2)d).

Once I tried running the jar.bat file, it quickly flashed a command box (black box or whatever).

I did a printscreen to try and see what it was saying and when I copied it into paint it said "Java is not recognized as an internal or external command, operable program or batch file."

What do I do?

(this is my support ticket but i thought id post it here as well)

Sicko Zone
02-02-2012, 07:09 PM
This guide at the top by RiD works everytime for me, when i need to set the client up and unzip it, i gotta change the name of the file.. Runs like a dream :)

----------

Works spot on when i do this. tysm :)

Whatnew
02-17-2012, 01:14 AM
ty m88888888888

cloroxwipes
05-24-2012, 11:07 PM
Go to Start > Control Panel > Java to open the Java Options menu
i have no idea how to get from control panel to java. the only way i see is to go to add or remove programs but you can only uninstall but cant go into a java file. i dont get it at all

Ethan
03-10-2013, 03:35 PM
Guide was a bit outdated so I updated it. Seems a few of the new members are having an issue where when they double click the RiD.jar file NOTHING happens at all. Even if Javaw is selected. Having them Follow step 2 part D as seemed to fix this issue. I also added a few images to help explain how to make the batch file.

lool123
03-19-2013, 11:50 AM
When i double click too open it comes up 'unable to access jarfile'
any idea's on this?

rothus450
04-22-2013, 04:01 PM
after i extract RiD- i open the folder in the folder i also have to extract two more files RiD and Substance
when i extract these they turn into fle folders instead of them being jar.files

this is also my ticket

Solar
04-22-2013, 04:19 PM
after i extract RiD- i open the folder in the folder i also have to extract two more files RiD and Substance
when i extract these they turn into fle folders instead of them being jar.files

this is also my ticket

Are you sure you've followed this part of this guide?
http://www.robotzindisguise.com/forum/showthread.php?13263-RiD-New-User-Guide&p=181592#post181592
You shouldn't extract RiD and substance, they are the jar files to begin with.

rothus450
04-22-2013, 07:35 PM
yes i followed these instructions ut gives me file folder

rothus450
04-22-2013, 07:38 PM
also when i extract downloaded file i also then have to extract RiD and Substances seperatly

partyguardjr
05-15-2013, 07:18 PM
Extracted RiD 'here' into RiD.jar and this is what came up:

file:///C:/Users/Alex/Desktop/RiD1.JPG

And this is what happens when I double click RiD.jar:

file:///C:/Users/Alex/Desktop/RiD2.JPG

Edit: I thought those would show up, guess not. Basically the first picture shows:
..
Log
Methods
RiD.jar
substance.jar
README.txt

And the second picture (after double clicking RiD.jar) shows:
..
META-INF
images
(and all the .class files)

Now when I double click RiD.jar, it should open the program, but it's not allowing me to do that. Why not? Am I not extracting it properly?

Trent!
05-15-2013, 10:30 PM
Extracted RiD 'here' into RiD.jar and this is what came up:

file:///C:/Users/Alex/Desktop/RiD1.JPG

And this is what happens when I double click RiD.jar:

file:///C:/Users/Alex/Desktop/RiD2.JPG

Edit: I thought those would show up, guess not. Basically the first picture shows:
..
Log
Methods
RiD.jar
substance.jar
README.txt

And the second picture (after double clicking RiD.jar) shows:
..
META-INF
images
(and all the .class files)

Now when I double click RiD.jar, it should open the program, but it's not allowing me to do that. Why not? Am I not extracting it properly?

You extracted the RiD.jar file; that's why you have .class files and the images and whatnot. Once you have a RiD folder with RiD.jar, Substance.jar, README.txt, Methods Folder, and Log folder, right click the RiD.jar INSIDE the RiD folder, and choose Open With -> Choose default program -> browse -> Java -> jre7 -> bin -> javaw.exe and then hit Ok, then Ok again. That will reassign Java programs to Java, and NOT Winrar

partyguardjr
05-16-2013, 03:19 AM
You extracted the RiD.jar file; that's why you have .class files and the images and whatnot. Once you have a RiD folder with RiD.jar, Substance.jar, README.txt, Methods Folder, and Log folder, right click the RiD.jar INSIDE the RiD folder, and choose Open With -> Choose default program -> browse -> Java -> jre7 -> bin -> javaw.exe and then hit Ok, then Ok again. That will reassign Java programs to Java, and NOT Winrar

It's not giving me the option to open with anything.

Ridnamex
06-04-2013, 01:15 AM
I am getting error unable to access rar filed rid.jar

Trent!
06-04-2013, 01:52 AM
I am getting error unable to access rar filed rid.jar

Make sure you right clicked the download (RiD.rar) and choose "Extract Here"
This will create a RiD folder in the same directory. Open it, and right click the RiD.jar file inside and choose "Open with -> choose default program" -> browse-> Program Files -> Java -> jre7 -> bin -> javaw.exe

That should solve the issue if you have the proper Java installed.

seoulcurry
02-16-2018, 02:28 AM
Tried the .bat file. Came up with this

|Javax.net.ssl.sslhandshakeexception: sun.security.validatorExceptiuon: PKIX path valdiation

Any advice?

Trent!
02-16-2018, 05:08 PM
Tried the .bat file. Came up with this

|Javax.net.ssl.sslhandshakeexception: sun.security.validatorExceptiuon: PKIX path valdiation

Any advice?
seoulcurry;

Is that the entire error? This is the first time I've seen such an error, and usually it involves incorrectly configured certificates. What's weird though is that from a user's standpoint, there's no need to involve yourself with certificates.

Trying going to Start Menu -> Configure Java -> Security tab -> set Security level to High instead of Very High. Also make sure that Enable Java content for browser and Web Start applications is checked.

turboo
09-14-2018, 12:52 PM
:carrot: YOURE AWESOME!! THNX

axino
01-27-2020, 11:56 AM
ty, run.bat solution worked. looking forward to using rid again.

iHateHats
12-08-2020, 09:13 AM
edit: got it