JAVA ENVIRONMENTAL VARIABLE AND PATH SETTINGS

Hi all,
I am having a pecuilar problem with java environment variables and setting the path.
I am trying to install and check the instalation using some pre-provided batch commands from Open GTS.
The error log is as below .
** Found 2 Error(s)!
1) The 'PATH' environment variable points to the JRE, rather than the JDK.
   [Reason: The 'PATH' environment variable points to the JRE (Java Runtime
     Environment), rather than the JDK (Java Developer Kit).  The JDK already
     contains the JRE, so a separate JRE insallation  is not necessary.]
   [Fix: Set the 'PATH' environment variable to point to the JDK installation bi
n
     directory.]
2) 'JAVA_HOME' does not match the Java installation 'PATH' directory 'C:\Program
Files\Java\jre6'.
   [Reason: The version of Java referenced in the executable 'PATH' environment
     variable does not match 'JAVA_HOME'.]
   [Fix: Make sure both the 'JAVA_HOME' and 'PATH' environment variables point t
o the
     same installed JDK.]
No warnings reported
Further more these may help understand better
C:\Dush\Workspaces\JavaWorkspace\OpenGTS>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.6.0_03
C:\Dush\Workspaces\JavaWorkspace\OpenGTS>path
PATH=C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C
:\WINDOWS\System32\Wbem;C:\Program Files\apache-ant-1.7.0\bin;C:\Program Files\J
ava\jdk1.6.0_03\bin;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Dush\Workspac
es\JavaWorkspace\OpenGTS\bin;
C:\Dush\Workspaces\JavaWorkspace\OpenGTS>The resolution suggests that the path point to the same instance of jdk installation but that has already been done,
I do not understand from where does the
C:\Program Files\Java\jre6 path get set.
Please suggest..

dushdushyant wrote:
** Found 2 Error(s)!
1) The 'PATH' environment variable points to the JRE, rather than the JDK.
[Reason: The 'PATH' environment variable points to the JRE (Java Runtime
Environment), rather than the JDK (Java Developer Kit).  The JDK already
contains the JRE, so a separate JRE insallation  is not necessary.]
[Fix: Set the 'PATH' environment variable to point to the JDK installation bi
n
directory.]
2) 'JAVA_HOME' does not match the Java installation 'PATH' directory 'C:\Program
Files\Java\jre6'.
[Reason: The version of Java referenced in the executable 'PATH' environment
variable does not match 'JAVA_HOME'.]
[Fix: Make sure both the 'JAVA_HOME' and 'PATH' environment variables point t
o the
same installed JDK.]
No warnings reported
C:\Dush\Workspaces\JavaWorkspace\OpenGTS>echo %JAVA_HOME%
C:\Program Files\Java\jdk1.6.0_03
C:\Dush\Workspaces\JavaWorkspace\OpenGTS>path
PATH=C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C
:\WINDOWS\System32\Wbem;C:\Program Files\apache-ant-1.7.0\bin;C:\Program Files\J
ava\jdk1.6.0_03\bin;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\Dush\Workspac
es\JavaWorkspace\OpenGTS\bin;
Put the java home bin folder on the path before %SYSTEMROOT%\system32
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_03
set PATH=%JAVA_HOME%\bin;%PATH%

Similar Messages

  • Automator : issue with variable and path to folder

    I created a simple Automator Workflow with: A variable "Document Folder" and an action "Run shell script" with this command:
    "rsync -E -a -v -z --delete $@ /Volumes/MyBook/Backup/"
    I tested this command, It works very well in the terminal. But return me an error with Automator.
    "$@" is replaced by the Path when running, I guess my issue is that the content of the variable is " ~/Documents " . When it pass to the script it become "/Users/login/~/Documents".
    That can't works.
    A solution would be to put in the script the full path instead of "$@" but I would liketo understand why this error occur.
    Thanks.

    Automator actions return their results as a list of items. If you want your shell script to use the result of an action (for example Ask for Finder Items) as arguments, you need to set the Pass input: as arguments option, and place your statement in the for loop:
    for f in "$@"
    do
          /usr/bin/rsync -E -a -v -z --delete "$f" /Volumes/MyBook/Backup/
    done

  • The impact of java.ext.dirs and XMX settings to a JVM

    Hello,
    I've been using a XMX setting of 3800M for a particular JVM running a particular task.
    However, if I pass the -Djava.ext.dirs option, and point it to some directories, the JVM fails for the same task I've been running in my first run.
    truss output appears to show the failure occurring during mmap() resulting in ENOMEM.
    The question is, under what condition would java.ext.dirs change the behavior of my XMX setting? If it take it out, it runs fine.
    Java version: 1.4.1, SunOS Sparc

    This sounds like a problem I had a while ago that stumped me for several days.
    If your class with the "main" method is loaded from the extensions directory (java.ext.dirs), it appears that a special classloader is used to do that, not the standard classloader that looks in the classpath. This special classloader appears to ignore the classpath and look only in the extensions directory. Also, the JVM appears to try this classloader before the standard classloader.
    Now, when one class wants to load another class, it always uses the classloader that loaded it to load that other class (unless you specifically write your program to use some other classloader). So what is happening to you is this: The "extensions classloader" loads your class with the "main" method, because it can. Then your "main" method tries to load another class, but it uses the "extensions classloader" to do that. And the "extensions classloader" doesn't look in the classpath, and what you saw is what you got.
    At least the answer to your problem is clear: Don't do that.

  • MDT WinPE TSEnv variables and pathing some powershell scripts.

    Hi again everyone!
    I have a question about running some powershell scripts inside of MDT.  Now I know that you can create a powershell command in the task sequence, and that will create the proper elevations and such, but I would like some organization here.  I have
    been creating my OS modification scripts inside of an Image Utilities folder under applications and then calling them with a powershell.exe windowstyle -hidden script.ps1.  The scripts will run, but I have alot of custom unpackaged stuff that I'm trying
    to quickly move and create on the freshly deployed OS.  My issue comes in with using things like copy-item .\items -destination c:\itemdest\ .  I have a folder that I created with some items that need to be in the OS image process, plus the
    powershell script.  I was thinking maybe I could do some sort of set unc=%~dp0 or something and make a $env:unc or something, but I was hoping someone might've solved this already.  Thanks in advance for any help.
    Ryan

    Hi Ryan,
    Sorry but you're not being clear enought for me. I usually need things dumbing down for me to understand. :)
    =%~dp0 is the current folder. I'll assuming from that, you're trying to get the same thing in PowerShell.
    There's a number of ways depending of what you're trying to do.
    $PWD is usefull from the command line
    The $MyInvocation object holds a wealth of info from the path to the executable/function used.
    There's a blog on it here How can a script tell what directory it was run from?
    Also, the best place for help on this kind of thing is the scripting guys forum. I hope this puts you in the right direction.
    /Andrew
    Blog: http://scriptimus.wordpress.com

  • Help needed in learning the basics of Java Smart Card and implementation?

    Hello every body,
    I am trying to develop the applications on java contactless smart cards technology.
    Can any body give me the details like how to start?
    What are the required softwares and installation procedure and path settings and etc.?
    I am the beginner in java smart card application development.
    plz help me out

    Dear Friend,
    I would advice to divide learning into two main parts: JavaCard technology and contactless RFID cards. For JavaCard technology you can find useful articles on Sun web-site (developers.sun.com/mobility/javacard/articles/javacard1/). For contactless RFID you can find few useful books at Amazon. Regarding software you need JC development kit. How to install it there is an instrunction in JCDK user guide.
    If it is not a secret what a javacard contactless card you are going to use in your work?
    Yours
    Dmitri

  • Enviromental variables in path strings in .cpp

    I am going to have a program that will be getting path strings that may have environmental variables and other symbols that are normally expanded by the shell.
    For example "$HOME/textfile.txt" or "~Library/Stuff" or "~/Stuff" etc...
    I am fairly sure if I use an API call like fopen() that paths like that will not work.
    In windows, there is an api called ExpandEnviromentalStrings() that takes a path with environmental strings and expands them to what it would look like as the final, real path.
    Is there an equivalent API for the Mac? I know I could write my own parser and use GetEnv() for each environmental string, but that would be a pain to do. Id prefer something that would take a string that may or may not have these environmental strings and spit out a full path that would be compatible with low level functions like fopen().

    If it is entirely out of your control, then you probably can't use FindFolder. That is unfortunate since that is the ideal solution for finding "special" folders.
    Otherwise, you'll just have to look for environment variables and replace them. Hopefully you have some agreed upon standard for how they will appear in your strings (i.e. with parens or braces.) You can use ICU or PCRE to see if there is a match. Then, use whatever language you want to use to replace them. The NSProcessInfo method is just a Cocoa way of doing getenv().
    I think that you won't find an equivalent to the Windows function on Unix. The reason is that it is very unusual to get an environment variable into a Unix program. Most Unix programs are started from some sort of shell, which will automatically expand all the environment variables for you. Since Windows doesn't have the concept of a shell, it needs to provide a way to expand those environment variable for you. If you are handling environment variables on Unix in fashion as unusual as you say, you are on your own.

  • How to Set up the  variables and others to compile and Run Java Programs

    Hello,
    I have just downloaded the jdk1.6.0_07 and jre1.6.0_07 and installed it in C:\Program files\Java in my Windows XP ,So please tell me how to sett up the enviroment variables etc to compile and run Java Programs from Command Prompt.
    thanks

    To set the PATH permanently, add the full path of the jdk1.6.0_<version>\bin directory to the PATH variable. Typically this full path looks something like C:\Program Files\Java\jdk1.6.0_<version>\bin. Set the PATH as follows on Microsoft Windows:
    1. Click Start > Control Panel > System on Windows XP or Start > Settings > Control Panel > System on Windows 2000.
    2. Click Advanced > Environment Variables.
    3. Add the location of bin folder of JDK installation for PATH in User Variables and System Variables. A typical value for PATH is:
    C:\Program Files\Java\jdk1.6.0_<version>\bin

  • Getting Java set up - javac and PATH problems..

    Just as the title suggests, I am brand new to Java. I am getting the seemingly "classic" newbie Java error in comman prompt: " 'javac' is not recognized as an internal or external command, operable program or batch file." I have read help sites and threads, and I do believe it must be something wrong with my PATH environments, but I can't figure out what. Also, I have tried several different java versions, so I can only believe that my current version is jdk1.6.0_03 (According to the official website I have 6, Version 3). I am running Windows XP (Service Pack 2).
    Here is the exact text as listed in the variable PATH: C:\ WINNT; C:\ WINNT\ SYSTEM32; C:\ jdk1.6.0_ 03\ bin
    I also have another variable called CLASSPATH, which is: .;C:\Program Files\Java\j2re1.4.2\lib\ext\QTJava.zip
    A friend suggested that I learn with DrJava, because he said that is the way he learned, but of course that only helped with learning some basic code, and it only postponed the problem I am now having to face.
    I know I am utterly useless, and I am sure that whatever alien language I just put up there must be just way off base, but please bear with this poor beginner. Any help is useful, literally any, and I am going to wipe any previous thoughts of what I thought was correct away.

    Are you able to set the PATH without any errors on command line ? Or another best way is to set the path in the user and system variables.
    Go to
    MyComputers->Properties->Advanced (tab)and click the
    Environment VariablesAbove you will see
    User variables
    IF there is already a variable name PATH then add the
    C:\jdk1.6.0_03\binElse
    Click the
    New type PATH as the Variable Name
    and the C:\jdk1.6.0_03\bin as the variable value.
    Re-start your command prompt and check with the javac or java commands.

  • Do we need to update snpsagent.conf File and Windows Environmental variable in ERPI 11.1.2.2

    In ERPI 11.1.1.3 Admin guide its mentioned we need to update the below , do we need to do the same in 11.1.2.2 version also
    Updating the snpsagent.conf File
    ä To update the snpsagent.conf file:
    1 Navigate to the folder where Oracle Data Integrator is installed.
    For example, C:\OraHome_1\oracledi\tools\wrapper\conf.
    2 Using a text editor, open the snpsagent.conf file.
    3 Search for: wrapper.java.library.path.1.
    4 On a new line, add the following text:
    wrapper.java.library.path.2=../drivers
    5 Close and save the file.
    Updating the Windows Environment Variable
    After you update the snpsagent.conf file, add the ODI drivers path information to the
    Windows environment variable.
    ä To update the Windows environment variable:
    1 On the desktop, right-click My Computer, select Properties. Select the Advanced tab, and then click
    Environment Variables.
    2 In the System variables section, select the Path variable, and then click Edit.
    3 At the end of the Variable value line, add a semi-colon (;), and then add the Oracle Data Integrator
    driver path.
    For example, C:\OraHome_1\oracledi\drivers.
    4 Click OK three times.
    5 Restart the Oracle Data Integrator Agent Service.
    Thanks

    You should not have to do this in ODI 11.1.1.6 for ERPi 11.1.2.2.

  • Problems in Classpath and Path 's variables setting in Windows XP

    Here is my drive structure in my PC:
    1. hard drive (primary slave, Partition: C and E where E boot Windows XP
    2. Hard drive 2 (Primary Master), Drive letter: D
    Although my default boot directory is E (for strange reason, i like to keep
    that way for now), I installed other programs in C and D drive dues drive
    space factors.
    So My java sdk1.4.2_02 has been installed in C:\Java_home directory, the
    following is my Classpath and Path values:
    (CLASSPATH Variables)
    Classpath=.;
    c:\java_home\j2sdk1.4.2_02;
    e:\Program Files\java\j2re1.4.2_02;c:\java_home; c:\java_home\j2sdk1.4.2_01
    \lib;e:\Program Files\java; e:\Program Files\java web start;c:\java_home\j2
    sdk1.4.2_02\jre\lib;c:\java_home\java\petstore1.3.2\src\lib\jst1;
    (PATH variables)
    c:\java_home\j2sdk1.4.2_01\bin;C:\java_home;e:\Pr
    ogram Files\java;c:\java_home\jdk1.4.2_2\bin;E:\Program Files\Oracle\jre\1.
    1.8\bin;E:\WINDOWS\system32;E:\WINDOWS;E:\WINDOWS\system32\WBEM;E:\
    Program Files\Support Tools\;
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    Path=D:\oracle\ora92\bin;E:\Program Files\Oracle\jre\1.3.1\bin;
    My Fruit txt and Fruit.java file is located in my c:\java_home folder
    when I try to compile the my file as <c:\java_home\javadoc Fruit.java), it
    gives me the error message<'javac' is not recognized as an internal or
    external command,operable program or batch file.>
    however, I can compile the Fruit file from C:\java_home\jdk1.4.2_2
    \bin\javadoc Fruit.java; with out any problem of course I have to copy the
    Fruit.java file at the C:\java_home\jdk1.4.2_2\bin\javadoc Fruit.java
    folder.
    I am requesting u please help or advise me to correct my mistakes
    Ely
    [email protected]

    I must confess that I am totally unable to understand what your PATH is set to. The error that you see,
    <'javac' is not recognized as an internal or external command,operable program or batch file.>
    is due to a missing or incorrectly set PATH. It is used by Windows to find executable file (like javac.exe) that you have added to the computer. Item #5 on this page gives you instructions on how to set it: http://java.sun.com/j2se/1.4.2/install-windows.html
    As for the setting of the CLASSPATH, you seem to have a number of different versions of java (1.4.2_02, 1.4.2_01, 1.4.2_2, and 1.1.8) and I doubt that these are all valid. You are also using an unusual syntax C:\java_home\jdk1.4.2_2\bin\javadoc Fruit.java and I wonder if that is really C:\java_home\jdk1.4.2_2\bin\javadoc\Fruit.java? I think the best action is to point you to Sun's instructions and information about setting and using the CLASSPATH.
    The CLASSPATH is a set of pointers that is used by Java to find the files that YOU (not Java) create and want compiled and/or run.
    Setting the Classpath:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/classpath.html
    [NOTE: always start your classpath with ".;" which means the current directory. See my classpath, below]
    How Classes are Found:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/findingclasses.html
    Examples:
    This is my path
    PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\BATCH;C:\J2SDK1.4.2_01\BIN;C:\PROGRA~1\UTILIT~1;C:\PROGRA~1\WIN98RK
    This is my classpath
    CLASSPATH=.;C:\mjava;C:\mnrx;C:\NetRexx\lib\NetRexxC.jar;C:\j2sdk1.4.2_01\lib\tools.jar;C:\NetRexx\NrxRedBk

  • [svn:fx-trunk] 8474: * Fixed the AST generation code path of Vector typed variables and

    Revision: 8474
    Author:   [email protected]
    Date:     2009-07-09 07:20:32 -0700 (Thu, 09 Jul 2009)
    Log Message:
    Fixed the AST generation code path of Vector typed variables and
      properties with Bindable.
    tests Passed: checkintests
    Needs QA: YES
    Needs DOC: NO
    Bug fixes: SDK-21587
    API Change: NO
    Reviewer: Peter D.
    Code-level description of changes:
       AbstractSyntaxTreeUtil.java
         Modified generateParameter(*) to use generateTypeExpression().
       binding/BindableSecondPassEvaluator.java
         Modified generateGetter() to use AbstractSyntaxTreeUtil.generateTypeExpression().
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-21587
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/AbstractSyntaxTreeUtil.java
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/BindableSecondPassEva luator.java

    I got again a total system freeze today when I wanted to launch firefox using only the openbox menu, without wbar running.
    So I decided to try now the 'nouveau.noaccel=1' kernel command line parameter, and to use again wbar for my frequently used applis.
    In the Xorg log, the differences are:
    without 'nouveau.noaccel=1'
    [ 30.761] (II) UnloadModule: "nv"
    [ 30.761] (II) Unloading nv
    [ 30.761] (--) Depth 24 pixmap format is 32 bpp
    [ 30.762] (II) NOUVEAU(0): Opened GPU channel 0
    [ 30.765] (II) NOUVEAU(0): [DRI2] Setup complete
    [ 30.765] (II) NOUVEAU(0): [DRI2] DRI driver: nouveau
    [ 30.765] (II) NOUVEAU(0): [DRI2] VDPAU driver: nouveau
    [ 30.776] (II) EXA(0): Driver allocated offscreen pixmaps
    [ 30.777] (II) EXA(0): Driver registered support for the following operations:
    [ 30.777] (II) Solid
    [ 30.777] (II) Copy
    [ 30.777] (II) Composite (RENDER acceleration)
    [ 30.777] (II) UploadToScreen
    [ 30.777] (II) DownloadFromScreen
    [ 30.777] (==) NOUVEAU(0): Backing store disabled
    [ 30.777] (==) NOUVEAU(0): Silken mouse enabled
    with 'nouveau.noaccel=1'
    [ 1191.621] (II) UnloadModule: "nv"
    [ 1191.621] (II) Unloading nv
    [ 1191.621] (--) Depth 24 pixmap format is 32 bpp
    [ 1191.621] (EE) NOUVEAU(0): Error creating GPU channel: -19
    [ 1191.621] (EE) NOUVEAU(0): Error initialising acceleration. Falling back to NoAccel
    [ 1191.621] (==) NOUVEAU(0): Backing store disabled
    [ 1191.621] (==) NOUVEAU(0): Silken mouse enabled
    [ 1191.621] (==) NOUVEAU(0): DPMS enabled
    So now 3D acceleration is disabled.
    I will see now if the system is stable enough for my daily usage and gives satisfactory performances.
    I am almost sure that the mesa nouveau dri driver is the cause of the freezes.
    Last edited by berbae (2013-03-27 10:07:42)

  • PATH VARIABLES AND RUNNING CLASS FILES

    People:
    I'm a complete Java neophyte and (slowly) learning. Rather than using the NetBeans IDE I have installed, I'm taking the text editor approach to type my source code.
    After I type code into my text editor, does it necessarily matter where I save my text files? For my first application, I created HelloWorldApp.java in Notepad, originally saving the file to the same folder where my J2SE 5.0 installation is stored, which is:
    C:\Program Files\Java
    My javac (Java compiler) is located in:
    C:\Program Files\Java\jdk1.5.0_01\bin
    When I was first trying to compile HelloWorldApp.java, I received errors saying the Java compiler couldn't be found; I was told to create a path environment variable so the javac could be found to compile my code. When I went to the control panel to set an appropriate path variable, I deleted a (wacky!) Roxio path (don't even know how that got there), entering in its place:
    C:\Program Files\Java
    as the new path name, although, again, my Java compiler is located in
    C:\Program Files\Java\jdk1.5.0_01\bin
    After restarting my computer to implement the new path variable into the operating system, I tried compiling my program, but still got error messages. However, when I moved my HelloWorldApp.java text file from the location where I originally saved it, which was:
    C:\Program Files\Java
    to
    C:\Program Files\Java\jdk1.5.0_01\bin
    my HelloWorldApp.java finally compiled to a class file, which I finally ran! Did my program run because I moved the HelloWorldApp text file from C:\Program Files\Java into the C:\Program Files\Java\jdk1.5.0_01\bin folder where the javac is located?
    Or did my C:\Program Files\Java path variable allow for the Java compiler to be found, although it's located in C:\Program Files\Java\jdk1.5.0_01\bin ? (This is why I asked above if it matters where you save your text document source code.)
    In using a text editor to type source code, where should I save my Java text files next time?
    Any help would be much appreciated! Thanks!

    Add the following directories to the PATH variable.
    C:\Program Files\Java\jdk1.5.0_01\bin
    I agree with this part.
    and add the following to the CLASSPATH variable
    C:\Program Files\Java\jdk1.5.0_01\lib;C:\Program
    Files\Java\jdk1.5.0_01\jre\lib;.
    Where is this insanity coming from?
    You do not need to set your classpath unless you are using a third party library or you have different parts of your program stored under different paths.
    OP: You can store your source files anywhere you want to. You should put them somewhere that is easy for you to access. Most people have a common directory for all of their projects, with subdirectories for each project.
    The only real restriction on where you put your source files is that the directory struction they are in must match the package statement at the top of the source file.
    So, if your file has:
    package chat.client.events;
    at the top, then the source file must be in a directory named chat/client/events relative to where you keep your source files.

  • Get (variable) file path and name in a text element

    How do you get the (variable) file path and name in a text element (label) in LCD? If you save the PDF and afterwards relocate it, it should update the values. Is that actually possible?

    Does anyone have any advice on this issue?
    Thanks in advance,
    Zack H.

  • Without hard coding it how can I add a java app to my path variable

    I'm not sure how to phrase this but I wrote a quick utility program and I wrote a quick batch file to call the program. I put the batch file in a folder in the path variable and put the folder containing the classes in there as well. I was hoping that when I called the batch it would check the relative location and see the folder for the utility program and run it. However I got an error message acting like it couldn't find the class. I think it's checking the current directory I'm in, not the current directory of the batch file that's actually calling it. I don't want to hardcode the path into the batch file since it's mobile and could be run from different folders so I was wondering how can I fix this?

    I am assuming you got a ClassNotFoundException?
    echo the command your batch file is running to this forum and then I'll be able to help you

  • When should I use static variable and when should not? Java essential

    When should I use static variable and when should not? Java essential

    Static => same value for all instances of the class.
    Non-static => each instance can have its own value.
    Which you need in which circumstances is completely up to you.

Maybe you are looking for