Hi Edwin,
I am happy to hear that you found the root cause of the problem. [:)]
Normally the .jar files are turned into .zip packages as a fallback.
This is controlled by the web-server you download the .jar file from. If
the server configuration does not contain the JAR MIME type, then the
.jar file will per default be turned into a .zip file. This is a classic
problem. But of course you can easily solve it by renaming the file
extension from .zip into .jar. You could also use another mirror server,
when downloading Robocode.
Now, the second part of the problem seems to be the Java installation
installation itself, if it is not able to start the Robocode installer
when you double-click the robocode-setup.jar file. Again, this is a
somewhat classic problem. If Java is installed properly, and you
double-click on the .jar file (robocode-setup.jar file), then Java is
automatically launched. The Java VM will look into the
/META-INF/Manifest.mf file in the .jar file, where it will find
robocode.AutoExtract as the main application class, which is then
launched and hence starts installing Robocode. (It will ask you where to
install Robocode).
It seems like your Java installation does not do this, and normally this
is due to a bad installation. Your Tech guys should follow the
guidelines provided by Sun (if you use Sun's JRE or JDK) to make sure
that Java is correctly installed throughout the network. These are
provided here:
http://java.sun.com/javase/6/webnotes/install/index.html<
http://java.sun.com/javase/6/webnotes/install/index.html>
It is not enough "just" to install Java in order to let it run properly.
At least not always, that is.
Best regards,
- Flemming
--- In
Robocode@..., "Edwin Pilobello" <e_pilobello@...>
wrote:
>
> Another of our IT Techs was installing robocode on laptops and got
> the "Failed to load Main-Class". He reports that the way to solve this
> issue is thusly:
>
> 1. After downloading from sourceforge, rename the downloaded robocode-
> setup-1.6.0.1 file and change .zip extension to .jar
> 2. Click on the new .jar file to install robocode
>
> The download process does say that the source is a .jar. However, upon
> saving, it turns into a .zip Double clicking the .zip in Windows XP
> unpackages using .zip format. Clicking on the resulting "extract" file
> to load robocode will produce the "Failed to load Main-Class" error.
>
> So the question is why the original jar file changed to .zip?
>
> --- In
Robocode@..., "flemmingnlarsen"
> flemming.n.larsen@ wrote:
> >
> > I am sorry about that, but very happy to hear that the problem is
> > solved now. :-)
> >
> > --- In
Robocode@..., "Edwin Pilobello" <e_pilobello@>
> > wrote:
> > >
> > > The IT techs here at PSU figured it out. I'm told it was a corrupt
> > > Robocode extract file. I'll be able to use robocode on the next
> > > class.
> > >
> > > Now all I need to do is get it up on my home computer.
> > >
> > >
>