A file system for organising java stuff ?

J.P.Lewis zilla at idiom.com
Sun Jan 17 13:07:46 PST 1999


An additional thought:

Suppose one writes a control panel or system utility
using java. Conventionally this should be installed in 
/usr/bin or /usr/sbin.

- Linux has the kernel facility that launches a .class path 
  when it's name is typed.  So one could install the .class
  in /usr/bin.  One could install all the needed files for
  the program (including icons) into the .jar.  The kernel
  java launching should be able to launch a .jar file rather
  than just a .class file, setting the CLASSPATH to the jar.

- we should be able to install things like standard jpeg parsing
  librarys as .jars in /usr/lib, and some 1.1 programs will need to
  set the CLASSPATH to include swing. Java programs that uses these
  will require a separate script to set the classpath.
  Propose instead that the kernel java facility should look inside
  the .jar for a file _CLASSPATH_ or something and set the
  classpath to this before running.

- Is there some way to distinguish between a .jar file and a 
  plain .zip file?  I don't know.  One way would be to 
  look for the _CLASSPATH_ file in the zip and only try to
  launch the file as a java .jar if this file exists
  (and maybe only if it contains a magic number before the
  classpath)
  
With this approach, for linux at least, the problem seems
pretty easy - just install everything in the same places
it would go if it were a C program.

/usr/bin/diff           c program
/usr/bin/jdiff          java .jar diff with a nice gui,
                        jar file contains mos

/usr/lib/libjpeg.*so    c library   
/usr/lib/libjpeg.jar    java library

-----------------------------------------------------------------------
j.p.lewis                                               zilla at idiom.com
012 345 6789                                     //www.idiom.com/~zilla



More information about the kaffe mailing list