From: <bc...@wo...> - 2001-09-07 06:00:07
|
[Carlos Quiroz] >Hi folks > >I'd like to add the option to install jython in my jEdit plug in, which >embeds jython into the editor. Although I can easily add jython.jar I would >like to also includes the Lib dir. On the other hand users that already have >jython may want no to install it by default, so an optional action is >required. I'd like to be able to start the installer from inside the Java >Program > >Is that possible? >I've tried to do this > >jython-21a3.main(args) > >But this is not possible to compile. Due to an unfortunate name of the class. I simply didn't consider this situation when I picked that name. >How can I proceed? First you have to understand that jython-21a3.class is both a class file and a .jar file and for this purpose you have to see it only as a jar file. You start by adding jython-21a3.class to your CLASSPATH or through your own class loader. classpath=d:\java\jdk1.4\jre\lib\rt.jar;jython-21a3.class The you can start the installer with: public static void main(String[] args) { new net.sourceforge.liftoff.installer.Install2(args); } I'll refer you to the liftoff sources for the details of programmaticly choosing a destination dir and which bundles to install: > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/liftoff/liftoff/src/installer/net/sourceforge/liftoff/installer/Install2.java?rev=HEAD&content-type=text/vnd.viewcvs-markup regards, finn |