找了很多地方没有找到,郁闷了。也在www.sun.com上面转悠了很久,没找到。我们下的JDK安装后能给我们一点
src.zip里面只是包含了一小部分源码,还有很多都没有。
我在网上找到了一个在线的源码chm网站
http://javaresearch.gro.clinux.org/jdk140/index.html
虽然还算可以,但是还是希望能找到独立的源代码包呀。
不知道那位达人自己有或者知道在那里能下到。
谢谢了。
src.zip里面只是包含了一小部分源码,还有很多都没有。
我在网上找到了一个在线的源码chm网站
http://javaresearch.gro.clinux.org/jdk140/index.html
虽然还算可以,但是还是希望能找到独立的源代码包呀。
不知道那位达人自己有或者知道在那里能下到。
谢谢了。
楼主【maodie007】截止到2008-07-02 10:27:04的历史汇总数据(不包括此帖):
发帖的总数量:65 发帖的总分数:1095
结贴的总数量:63 结贴的总分数:1015
无满意结贴数:19 无满意结贴分:390
未结的帖子数:2 未结的总分数:80
结贴的百分比:96.92 % 结分的百分比:92.69 %
无满意结贴率:30.16 % 无满意结分率:38.42 %
值得尊敬
我的路径
我机器上的路径:C:\Program Files\Java\jdk1.6.0_03\src.zip
安装的时候选择安装源码。如果是最新版的默认安装应该在这里
C:\Program Files\Java\jdk1.6.0_10\src.zip
最新版包括C语言/*
* @(#)java.c 1.139 08/04/08
*
* Copyright 2006-2008 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*//*
* Shared source for 'java' command line tool.
*
* If JAVA_ARGS is defined, then acts as a launcher for applications. For
* instance, the JDK command line tools such as javac and javadoc (see
* makefiles for more details) are built with this program. Any arguments
* prefixed with '-J' will be passed directly to the 'java' command.
*//*
* One job of the launcher is to remove command line options which the
* vm does not understand and will not process. These options include
* options which select which style of vm is run (e.g. -client and
* -server) as well as options which select the data model to use.
* Additionally, for tools which invoke an underlying vm "-J-foo"
* options are turned into "-foo" options to the vm. This option
* filtering is handled in a number of places in the launcher, some of
* it in machine-dependent code. In this file, the function
* CheckJVMType removes vm style options and TranslateApplicationArgs
* removes "-J" prefixes. On unix platforms, the
* CreateExecutionEnvironment function from the unix java_md.c file
* processes and removes -d<n> options. However, in case
* CreateExecutionEnvironment does not need to exec because
* LD_LIBRARY_PATH is set acceptably and the data model does not need
* to be changed, ParseArguments will screen out the redundant -d<n>
* options and prevent them from being passed to the vm; this is done
* by using the machine-dependent call
* RemovableMachineDependentOption.
*/#include <stdio.h>
#include <stdlib.h>
#include <string.h>#include <jni.h>
#include <jvm.h>
#include "java.h"
#include "manifest_info.h"
#include "version_comp.h"
#include "wildcard.h"
#include "splashscreen.h"#ifndef FULL_VERSION
#define FULL_VERSION JDK_MAJOR_VERSION "." JDK_MINOR_VERSION
#endif/*
* The following environment variable is used to influence the behavior
* of the jre exec'd through the SelectVersion routine. The command line
* options which specify the version are not passed to the exec'd version,
* because that jre may be an older version which wouldn't recognize them.
* This environment variable is known to this (and later) version and serves
* to suppress the version selection code. This is not only for efficiency,
* but also for correctness, since any command line options have been
* removed which would cause any value found in the manifest to be used.
* This would be incorrect because the command line options are defined
* to take precedence.
*
* The value associated with this environment variable is the MainClass
* name from within the executable jar file (if any). This is strictly a
* performance enhancement to avoid re-reading the jar file manifest.
*
* A NOTE TO DEVELOPERS: For performance reasons it is important that
* the program image remain relatively small until after SelectVersion
* CreateExecutionEnvironment have finished their possibly recursive
* processing. Watch everything, but resist all temptations to use Java
* interfaces.
*/
#define ENV_ENTRY "_JAVA_VERSION_SET"#define SPLASH_FILE_ENV_ENTRY "_JAVA_SPLASH_FILE"
#define SPLASH_JAR_ENV_ENTRY "_JAVA_SPLASH_JAR"static jboolean printVersion = JNI_FALSE; /* print and exit */
static jboolean showVersion = JNI_FALSE; /* print but continue */
static char *progname;
jboolean _launcher_debug = JNI_FALSE;/*
* Entries for splash screen environment variables.
* putenv is performed in SelectVersion. We need
* them in memory until UnsetEnv, so they are made static
* global instead of auto local.
*/
static char* splash_file_entry = NULL;
static char* splash_jar_entry = NULL;/*
* List of VM options to be specified when the VM is created.
*/
static JavaVMOption *options;
static int numOptions, maxOptions;/*
* Prototypes for functions internal to launcher.
*/
static void SetClassPath(const char *s);
static void SelectVersion(int argc, char **argv, char **main_class);
static jboolean ParseArguments(int *pargc, char ***pargv, char **pjarfile,
char **pclassname, int *pret, const char *jvmpath);
static jboolean InitializeJVM(JavaVM **pvm, JNIEnv **penv,
InvocationFunctions *ifn);
static jstring NewPlatformString(JNIEnv *env, char *s);
static jobjectArray NewPlatformStringArray(JNIEnv *env, char **strv, int strc);
static jclass LoadClass(JNIEnv *env, char *name);
static jstring GetMainClassName(JNIEnv *env, char *jarname);
static void SetJavaCommandLineProp(char* classname, char* jarfile, int argc, char** argv);
static void SetJavaLauncherProp(void);#ifdef JAVA_ARGS
static void TranslateApplicationArgs(int *pargc, char ***pargv);
static jboolean AddApplicationOptions(void);
#endifstatic void PrintJavaVersion(JNIEnv *env);
static void PrintUsage(void);
static jint PrintXUsage(const char *jvmpath);static void SetPaths(int argc, char **argv);/* Maximum supported entries from jvm.cfg. */
#define INIT_MAX_KNOWN_VMS 10
/* Values for vmdesc.flag */
#define VM_UNKNOWN -1
#define VM_KNOWN 0
#define VM_ALIASED_TO 1
#define VM_WARN 2
#define VM_ERROR 3
#define VM_IF_SERVER_CLASS 4
#define VM_IGNORE 5
struct vmdesc {
char *name;
int flag;
char *alias;
char *server_class;
};
static struct vmdesc *knownVMs = NULL;
static int knownVMsCount = 0;
static int knownVMsLimit = 0;static void GrowKnownVMs();
static int KnownVMIndex(const char* name);
static void FreeKnownVMs();
static void ShowSplashScreen();jboolean ServerClassMachine();/* flag which if set suppresses error messages from the launcher */
static int noExitErrorMessage = 0;/*
* Running Java code in primordial thread caused many problems. We will
* create a new thread to invoke JVM. See 6316197 for more information.
*/
static jlong threadStackSize = 0; /* stack size of the new thread */int JNICALL JavaMain(void * args); /* entry point */struct JavaMainArgs {
int argc;
char ** argv;
char * jarfile;
char * classname;
InvocationFunctions ifn;
};
。