#378 Generate Custom drjava.jar

open
Other (46)
5
2014-08-10
2010-04-19
No

There have been some requests (I believe from the media computation people at Georgia Tech; http://coweb.cc.gatech.edu/mediaComp-plan/101 ) for a feature that can generate a customized DrJava jar file that already includes user-specified jar libraries.

This functionality would take the current DrJava jar (it should work with EXE and Mac applications too) and add a number of user-specified jar files to it. Then it will write out a new drjava.jar file. The libraries included in the new jar file will then automatically be included in the classpath and be usable without adding them to a classpath somewhere. It will ONLY write a jar file, not an EXE file or a Mac application.

There is no functionality to remove the libraries again.

Issues to consider:
1. We should probably disable automatic updates for modified drjava.jar files. Otherwise a user may download an updated version that doesn't have required libraries anymore.
2. We should check whether an added library interferes with a class already included in DrJava.
3. What kind of debugging information can we print out to distinguish a modified version from an original version?

Discussion

  • Mathias Ricken

    Mathias Ricken - 2010-04-24

    As of revision 5232, this has been implemented and merged into the trunk.

    - There is a Tools/Advanced/Generate Custom drjava.jar menu item that takes the current DrJava executable file and a number of user-specified files to generate a new jar file.
    - The user can select any number of jar and zip files or directories to be added. When a directory is added, all files in that directory and its subdirectories will be added recursively.
    - When the "Generate" button is pressed, DrJava then performs a check to see if the added libraries could interfere with DrJava itself and perhaps with each other. This is done using MD5 hashes.
    - DrJava will write out a new drjava.jar file to the file specified by the user.
    - The libraries included in the new jar file will then automatically be included in the classpath and be usable without adding them to a classpath somewhere.
    - This works for the Windows exe file, the jar file, and the Mac application.
    - DrJava will ONLY be able to write a jar file, not create an exe file or a Mac application.
    - There is no functionality to remove the libraries again from the modified jar file.
    - Generating a custom DrJava jar file disables the check for updated versions. Otherwise a user may download an updated version that doesn't have required libraries anymore.
    - The added files and directories appear in the version line of DrJava to provide minimal help, e.g. "DrJava Version : drjava-20100423-r5230 with foo.jar, bar.jar"

    I'll still have to do more specific tests with the Media Computation classes:
    " Right now, we include jmusic, javazoom, and various class files into our classes -- see http://mediacomputation.org for either the Java CS1 or Data Structures classes."

     
  • Mathias Ricken

    Mathias Ricken - 2010-04-24
    • assigned_to: nobody --> mgricken
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks