java的運行環境是怎樣配置的?回貼給分!

解决方案 »

  1.   

    Java 的运行环境不需要配置,安装好之后即可使用。如果实在有问题,可以去查查注册表里 HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment 这一项中的东西。
      

  2.   

    新建java_home变量 值为X:\jsdk
    classpath:  .;%java_home%\bin;
    java_home:  E:\jdk1.3
    Path:    %java_home%\bin;
      

  3.   

    SET UP THE PATH:Windows 2000/XP:--> set their path by right-clicking on 'My Computer' and selecting 'Properties'. Under the 'Advanced' tab, there is a button that allows you to set the 'Environment variables'. Click on this and alter the 'Path' variable so that it also contains the path to the Java executable. For example, if you have installed Java in c:\jdk and your path is currently set to C:\WINDOWS\SYSTEM32, then you would change your path to read C:\WINDOWS\SYSTEM32;c:\jdk\bin 
    When you open a new command prompt, it will reflect these changes and allow you to run java programs by typing "java". If you have installed the SDK, then you will also be able to run "javac" to compile stuff. 
      

  4.   

    SET UP THE CLASSPATH:
    In addition to setting up the path, you also need to tell Java where to find compiled 
    class files at runtime. You will probably want to set the classpath to include at least the current working directory (.) Eg: SET CLASSPATH=%CLASSPATH%;. The classpath can also contain other directories that may contain compiled class files. Note that if you are using classes that are contained inside a .jar file, you will need to specify the full path and name of this file in the classpath, rather than just the name of the directory it is contained within. 
      

  5.   

    右击"我的电脑",选择"属性",再选择"高级",点击"环境变量",注意到 "系统变量",点击"新建"三次,每次创建一个系统变量 (注意大小写). 
    变量名    变量值 
    path      C:\j2sdk1.4.1_07\bin 
    java_home C:\j2sdk1.4.1_07 
    classpath C:\j2sdk1.4.1_07\lib\tools.jar;C:\j2sdk1.4.1_07\jre\lib\rt.jar;
    注意 你 的 版本 号!!(安装于默认目录下)
      

  6.   

    shuaijf98(多情应笑我) 都被说光了?你也太孤陋寡闻了吧,知道 Ant 吗,
    在Ant 里也可以临时配置的。
      

  7.   

    呵呵~~~瞌睡虫还没了解设置"java_home"有什么用呢!:)如果像瞌睡虫这样设置"path"和"classpath"的话,根本就没用到"java_home"这个变量名.
    ^Q^
      

  8.   

    至于custom_Feng嘛!他的"java_home"的设置就是对瞌睡虫最好的解答,但是 custom_Feng好象也不了解"classpath"的意思~~ ^Q^