App won't open on PC

37 views
Skip to first unread message

Addison Brown

unread,
Feb 2, 2022, 12:56:37 PM2/2/22
to Robocode
I have downloaded robocode, but when I try to open it, it says that I can't open this app on my PC. I am using Windows 10 on a Lenovo, and have Java downloaded. Any ideas on how to fix this issue?

fnl

unread,
Feb 2, 2022, 2:22:36 PM2/2/22
to Robocode
You should be able to simply double-click on the robocode-1.9.x.x-setup.jar file in order to start installing it running on Java on Windows, if Java is installed correctly.

You can check if java is installed and see the version by writing this in a command prompt:

java -version

This should provide you with the Java version and vendor etc.
You also need to make sure that the 'java' command is available from the PATH environment variable. Typically the PATH must include the full absolute file path to the bin directory of your Java installation containing various command-line tools for java like e.g. java.exe.

On my system PATH includes this path:

...;C:\Program Files\Eclipse Adoptium\jdk-11.0.13.8-hotspot\bin;...

And you might also need to ensure that the JAVA_HOME path is set to the root path of the Java installation. You can check JAVA_HOME from the command prompt by writing this command:

echo %JAVA_HOME%

E.g. on my system, it writes:
C:\Program Files\Eclipse Adoptium\jdk-11.0.13.8-hotspot

If Robocode won't start by double-clicking on the jar archive, you can install it from the command prompt like this:

java -jar robocode-1.9.4.4-setup.jar

Addison Brown

unread,
Feb 7, 2022, 5:36:51 AM2/7/22
to Robocode

Hello, thank you for your response. I am sure that I have the right version of java installed. When I typed in the java home command, it responded with %JAVA_HOME%, not with what yours said. How am I able to check if it is a problem with java home or path, and how do I fix it if it is? I also tried to install robocode using the command prompt and it did not work. 

fnl

unread,
Feb 7, 2022, 2:38:52 PM2/7/22
to Robocode
The important part is that you are able to run the java command from a command line, and get some response back. E.g. by writing in this from a command line:

java -version

If it writes the version number and vendor name in the console. Then it seems that java has been set up correctly on your system. And you should be able to install Robocode by this command from the command prompt:

java -jar robocode-1.9.4.4-setup.jar

If the java command does not respond correctly, then you need to set up your environment variables so the PATH and JAVA_HOME are correct.
You can get help here, and lots of other websites on the net for installing Java:

https://mkyong.com/java/how-to-set-java_home-on-windows-10/
https://www.baeldung.com/java-home-on-windows-7-8-10-mac-os-x-linux
https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html

In the end, it might depend on the java vendor, e.g. if you use Java from Oracle, OpenJDK, Adaptium etc.

I hope you manage to get it up and running

Reply all
Reply to author
Forward
0 new messages