A spider solitaire game written in Java
This is the game of Spider Solitaire. I started writing this back in 1996 using Java 1.0. Originally it was created as a Java Applet which is what Java was mainly used for back then. Over the years, it has been only slightly modified to also be usable as a Java standalone Swing Application. Under the covers, though, it is still a Java Applet that uses the ancient Java 1.0 event model. It is rather amazing that it even still works in 2023. This game will run as either a standalone Java application, or as an Applet.
- clone this repo
- Install Java 8 on your computer
- run from a command line:
$ cd spider-solitaire
$ java -jar lib/spiderapplet-1.0-SNAPSHOT.jar
- Make sure you can run the game as a standalone app shown above.
- run it:
$ cd spider-solitaire
$ appletviewer lib/spider.html
- Make sure you can run the game as a standalone app shown above.
- edit
spider.desktop
file to reflect the absolute path of the Exec and Icon keys. - edit
runspider.sh
to reflect the absolute path of your installed Java 8 - install the desktop entry:
$ cp spider.desktop ~/.local/share/applications/spider.desktop
Now, you should be able to find your application in the application menu, and clicking it will launch the Java application using the specified JAR file. The icon you specified should also be displayed in the menu.
Back in the day, this game used be played inside a browser window. However, modern browsers no longer support the Java plugin necessary for running Java Applets like this. It might be possible to run this game inside a browser if you are willing to jump through many hoops to find an old browser with a working Java plugin. If your browser is old enough to support running Java Applets, you should see it running automatically below here:
Bonus: If you find a browser that can run this Applet, open an issue and describe how you did it. What hoops did you jump through?
At one point, this game was also runnable in a browser using Java Web Start. It is unlikely your modern browser will know how to do this.
https://github.com/gclayburg/spider-solitaire/blob/master/spider.jnlp
raw version https://raw.githubusercontent.com/gclayburg/spider-solitaire/master/spider.jnlp
$ ./build.sh