You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@locus.apache.org on 2000/08/18 06:12:05 UTC
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup Main.java
costin 00/08/17 21:12:05
Modified: . build.xml
src/share/org/apache/tomcat/startup Main.java
Added: src/build manifest
Log:
Added the manifest, now java -Dtomcat.home=... -jar tomcat.jar
should do it.
Revision Changes Path
1.62 +4 -4 jakarta-tomcat/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-tomcat/build.xml,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -r1.61 -r1.62
--- build.xml 2000/08/18 03:42:13 1.61
+++ build.xml 2000/08/18 04:12:04 1.62
@@ -104,11 +104,11 @@
<exclude name="org/apache/tomcat/util/XMLParser.class" />
<exclude name="org/apache/tomcat/util/XMLTree.class" />
</jar>
- <!-- minimal set of classes needed to start up tomcat
- XXX add manifest !!-->
+ <!-- minimal set of classes needed to start up tomcat -->
<jar jarfile="${tomcat.build}/lib/tomcat.jar"
- basedir="${tomcat.build}/classes" >
- <include name="org/apache/tomcat/startup/Tomcat.class" />
+ basedir="${tomcat.build}/classes"
+ manifest="src/build/manifest" >
+ <include name="org/apache/tomcat/startup/Main.class" />
<include name="org/apache/tomcat/util/SimpleClassLoader**" />
</jar>
<jar jarfile="${tomcat.build}/lib/facade22.jar"
1.1 jakarta-tomcat/src/build/manifest
Index: manifest
===================================================================
Manifest-Version: 1.0
Main-Class: org.apache.tomcat.startup.Main
1.2 +16 -1 jakarta-tomcat/src/share/org/apache/tomcat/startup/Main.java
Index: Main.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/startup/Main.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Main.java 2000/08/18 03:42:15 1.1
+++ Main.java 2000/08/18 04:12:04 1.2
@@ -148,6 +148,21 @@
}
}
+ URL getURL( String base, String file ) {
+ try {
+ if( ! base.endsWith( "/" ) )
+ base=base + "/";
+
+ File f = new File(base + file);
+ String path = f.getCanonicalPath();
+ return new URL( "file", null, path );
+ } catch (Exception ex) {
+ ex.printStackTrace();
+ return null;
+ }
+ }
+
+
public String getPackageDir() {
String tcHome=System.getProperty("tomcat.home");
// XXX process args, find if -install is specified
@@ -194,7 +209,7 @@
int jarCount=cpComp.length;
URL urls[]=new URL[jarCount + 1 ];
for( int i=0; i< jarCount ; i++ ) {
- urls[i]=new URL( "file", null, getLibDir() + cpComp[i] );
+ urls[i]=getURL( getLibDir() , cpComp[i] );
System.out.println( "Add to CP: " + urls[i] );
}