Main Page | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

main.c

Go to the documentation of this file.
00001 /*!
00002  * @file jvm/src/main.c
00003  *
00004  * @brief Entry point for bootstrap Java Virtual Machine
00005  *
00006  * The normal invocation of the JVM is very simple: just pass
00007  * the main() parameters into the JVM entry point, then call
00008  * @c @b exit(2) with the return code from it.  That's all there
00009  * is to it from the top level.
00010  *
00011  *
00012  * @section Control
00013  *
00014  * \$URL: https://svn.apache.org/path/name/main.c $ \$Id: main.c 0 09/28/2005 dlydick $
00015  *
00016  * Copyright 2005 The Apache Software Foundation
00017  * or its licensors, as applicable.
00018  *
00019  * Licensed under the Apache License, Version 2.0 ("the License");
00020  * you may not use this file except in compliance with the License.
00021  * You may obtain a copy of the License at
00022  *
00023  *     http://www.apache.org/licenses/LICENSE-2.0
00024  *
00025  * Unless required by applicable law or agreed to in writing,
00026  * software distributed under the License is distributed on an
00027  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
00028  * either express or implied.
00029  *
00030  * See the License for the specific language governing permissions
00031  * and limitations under the License.
00032  *
00033  * @version \$LastChangedRevision: 0 $
00034  *
00035  * @date \$LastChangedDate: 09/28/2005 $
00036  *
00037  * @author \$LastChangedBy: dlydick $
00038  *         Original code contributed by Daniel Lydick on 09/28/2005.
00039  *
00040  * @section Reference
00041  *
00042  */
00043 
00044 #include "arch.h"
00045 ARCH_COPYRIGHT_APACHE(main, c, "$URL: https://svn.apache.org/path/name/main.c $ $Id: main.c 0 09/28/2005 dlydick $");
00046 
00047 
00048 #include <stdlib.h>
00049 
00050 #include "jvmcfg.h"
00051 #include "classfile.h"
00052 #include "jvm.h"
00053 
00054 
00055 /*!
00056  * @brief Example of invoking the main JVM entry point
00057  *
00058  * The arguments to @link #jvm() jvm()@endlink are identical in
00059  * format and presentation to those used to enter a 'C' main program.
00060  *
00061  *
00062  * @param argc  Number of parameters being passed in @b argv
00063  *
00064  * @param argv  Array of null-terminated strings, @b argv[0] being the
00065  *              program name, @b argv[1] being the first argument, etc.
00066  *
00067  * @param envp  Environment pointer
00068  *
00069  *
00070  * @returns exit code from @link #jvm() jvm()@endlink
00071  *
00072  */
00073 int main(int argc, char **argv, char **envp)
00074 {
00075     /* Run the JVM and retrieve its return code */
00076     int rc = jvm(argc, argv, envp);
00077 
00078     /* Report the return code to the OS shell */
00079     exit(rc);
00080 
00081 } /* END of main() */
00082 
00083 
00084 /* EOF */
00085 

Generated on Fri Sep 30 18:49:05 2005 by  doxygen 1.4.4