当前位置: 技术问答>java相关
有关jre的问题!~
来源: 互联网 发布时间:2015-01-03
本文导语: 我想了解jre的运行机理,它是怎么运行的,是否要寻找类库,是tools.jar吗? 想知道它的一个完整的运行过程!举个例子吧~! (比如说要执行一个hello.class) 例子涉及到的类库多点较好! | 你的意...
我想了解jre的运行机理,它是怎么运行的,是否要寻找类库,是tools.jar吗?
想知道它的一个完整的运行过程!举个例子吧~! (比如说要执行一个hello.class)
例子涉及到的类库多点较好!
想知道它的一个完整的运行过程!举个例子吧~! (比如说要执行一个hello.class)
例子涉及到的类库多点较好!
|
你的意思是怎么运行一个文件吧?
把所需要的class文件压缩成jar文件(java自带)。
写一个批处理文件:
eg:
C:jdk1.3binjavaw.exe -classpath "C:TServerlibTSManager.jar;C:TServerlibcommon.jar;
把所需要的class文件压缩成jar文件(java自带)。
写一个批处理文件:
eg:
C:jdk1.3binjavaw.exe -classpath "C:TServerlibTSManager.jar;C:TServerlibcommon.jar;
|
the java tutorial有些相关资料:
When the runtime environment needs to load a new class for an application, it looks for the class in the following locations, in order:
Bootstrap classes: the runtime classes in rt.jar and internationalization classes in i18n.jar.
Installed extensions: classes in JAR files in the lib/ext directory of the JRE.
The class path: classes, including classes in JAR files, on paths specified by the system property java.class.path. If a JAR file on the class path has a manifest with the Class-Path attribute, JAR files specified by the Class-Path attribute will be searched also. By default, the java.class.path property's value is ., the current directory. You can change the value by setting the CLASSPATH environment variable or by using the -classpath or -cp command-line options. These command-line options override the setting of the CLASSPATH environment variable. Note that in the Java 1.2 software, java.class.path no longer includes the bootstrap classes in rt.jar and i18n.jar.
到相关网址有更详细的介绍:
http://java.sun.com/docs/books/tutorial/ext/basics/load.html
When the runtime environment needs to load a new class for an application, it looks for the class in the following locations, in order:
Bootstrap classes: the runtime classes in rt.jar and internationalization classes in i18n.jar.
Installed extensions: classes in JAR files in the lib/ext directory of the JRE.
The class path: classes, including classes in JAR files, on paths specified by the system property java.class.path. If a JAR file on the class path has a manifest with the Class-Path attribute, JAR files specified by the Class-Path attribute will be searched also. By default, the java.class.path property's value is ., the current directory. You can change the value by setting the CLASSPATH environment variable or by using the -classpath or -cp command-line options. These command-line options override the setting of the CLASSPATH environment variable. Note that in the Java 1.2 software, java.class.path no longer includes the bootstrap classes in rt.jar and i18n.jar.
到相关网址有更详细的介绍:
http://java.sun.com/docs/books/tutorial/ext/basics/load.html