Results 1 to 7 of 7
Thread: Cleaning out the closet
- 09-10-2008, 07:49 PM #1
Cleaning out the closet
I've written dozens of utilities over the years. Some were controls to enhance missing features in AWT, some to help with various projects. Most were written while I was learning Java and OOP. Many features were added in an Ad hoc fashion to solve a current problem. They look like they were: Put together with wire and bandages and glue.
I'd like to share them so I've uploaded some of them to a site and have a link page: All files on my Google site
You'll find my email address in the Help for some of the executeable jar files.
Since I'm as lazy as the next guy, I've only minimally documented these programs, just enough to refresh my memory on how to use them.
If anyone would take some of them and add a Swing frontend, I'd appreciate it. GUI is not my thing.
There are some programs that may be useful to other at-home developers. I'll try to describe them a few at a time.
I have a dial-up connection. Doing searches online is often slow and painful. I have downloaded several sites to my PC that I want to be able to search. For example a forum used by sailboat owners that discussed maintenance problems and solutions. Some of these sites have 1000s of records. The site search is often simple and not complete. So I wrote my own.
Also I have the java Tutorial and API documents on my PC that I can search.
My search has some boolean logic for the search arg. It returns a page to the browser with links to the found pages. I've also changed the search page that is refered to by some of the downloaded html pages to use an applet version of the search program. So if I'm reading the Java tutorial and want to find all references to say DocumentListener, I can go to the seach page, do a search of the tutorial pages and then look at the results all in the browser. Those on hi-speed direct connections wouldn't see a use for this. It might be useful if you only want to search the Tutorial pages, and not the whole site. Another feature is that the links from the Tutorial to the API doc can be satisfied on my PC by using my HTTPServer as a proxy server. My server has a "redirect" table that will intercept outgoing GETs for a site and satisfy them from a local file. Another feature that I never got finished was the FileIndex file. Searching 80K files took too long, so I wrote a scan program that read the files one time and create an index file with keywords and references to where they occured. The Search program would use the index to find the files vs actually reading the files. Its a "work in progress".
If there's any interest, I'll post more.
- 09-11-2008, 05:14 PM #2
ExecuteJava and JarServer
Some more stuff:
This program executes other java programs in a single JVM. It uses a ClassLoader to implement the classpath and a Security Manager to keep System.exit() from killing the JVM.
My previous PC had a 300Mhz processor and 64M RAM. Loading a java program took seconds. If I was using more than one program they each required load time and used space. So I wrote a program to allow more than one java program to execute in the same JVM. It saved jvm startup time and hopefully used less system resources by sharing the same jvm. I have yet to see one program interfer with another. The jar file and my .ini file are in the index page mentioned above.
The source is in a zip file: ExecuteJavaSource.zip on the page mentioned above.
I've downloaded dozens of websites so that I could search them when not connected to the internet. (I traveled on a sailboat for 6 months of the year and wifi has its limits). Some of these websites are of interest to other sailors and I wanted to be able to share them with the simplest interface. I could zip the files and give the zip file to the other sailor, but would require that he have a unzip program, know how to use it, how to find the files when unzipped and know which page was the starting page to open the site. Too complicated for many PC users.
My idea was to put all the files into a jar file with an HTTP server and search. The user would open the jar file, it starts the server, starts the user's browser with a URL back to its server and when the browser did a GET to the URL, it would display the start page for the site. The rest of the session would appear to the user as if he were connected to the internet, ie links would issue GETs to the server and it would return the requested page, etc.
I gave several copies of these jar files to friends and found that they worked first time on a Mac. With Windows, I often had to fiddle something to get them to work.
The source is in a zip file: JarServerSource.zip on the page mentioned above.
- 09-19-2008, 10:00 PM #3
Still more stuff:
CheckClassRefs.jar - Searches jar file contents starting with the Main-Class: class for referenced classes and further referenced classes to insure that all referenced classes are in the jar file. Also lists unreferenced class files.
CkClasspath.jar - This program will read a class file, get its package path and checks if the class file can be found on the classpath.
CmprFolders.jar - Compares the contents of two folders/subfolders and will copy selected files from one to the other. Windows only. I use this to backup my java source files.
FindClass.jar - Searches the classpath for a class or package. Paths can be added to the classpath it searches.
FindConnectSpeed.jar - Times the reading of a file from a site. I've uploaded some 100K files to different sites to use with this program.
ShowClassInfo.jar - Read a class file and display its methods.
- 09-22-2008, 05:20 AM #4
Very nice,i tried almost all of them,i liked very much the Search application.Adorable!!!
Were Gui applications made with AWT?I assume that yes,according to their appearance at the first glance.
- 09-22-2008, 02:22 PM #5
Yes, these are all AWT. Many written when Swing was first coming and was VERY slow on my slow computer. So I wrote my own controls. Once a program is working, I rarely go back to update it.
As I said before, I don't worry much about GUI.
- 09-22-2008, 10:47 PM #6
About the last of the stuff:
I copied and enhanced this server and have found it very useful in learning how a server works.
There are 4 files listed on the site referenced above. The following page tells more about it:
Norm's HTTP Server
GPSDevComm.zip & WayPointAppsSource.zip -
These files contain the working program and its source. These programs were developed to manage the waypoints I've collected over the years while sailing in various location. They can upload and download waypoints to the ICOM GPS and some Garmin GPSs. They can convert waypoint files from one format to another to allow you to view them in different navigation software.
- 10-31-2008, 01:18 PM #7presh4u Guest
- By Ak-Emm in forum New To JavaReplies: 13Last Post: 08-22-2008, 02:40 AM