• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with setting up environment variable

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all I have just started java and so far done the folloeing
-started reading java head first
-having a problem with sytem and user variables.

I am having problems with the user variables and system variable path
My jdk is located in C:\User\My Name\Program Files(x86)\Java\jdlk1.6.0_23
and path variable is written as %JAVA_HOME%\bin;C:etc.
In The command prompt I type in javac and it says that javac is not an available internal or external comand same with java version please give step by step instructions

Regards,
Meta Knight
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Meta Knight wrote:Hello all I have just started java and so far done the folloeing
-started reading java head first
-having a problem with sytem and user variables.

I am having problems with the user variables and system variable path
My jdk is located in C:\User\My Name\Program Files(x86)\Java\jdlk1.6.0_23
and path variable is written as %JAVA_HOME%\bin;C:etc.
In The command prompt I type in javac and it says that javac is not an available internal or external comand same with java version please give step by step instructions

Regards,
Meta Knight




Hi,


Managing Environment Variables

System Variables
You must be an administrator to modify a system environment variable. System environment variables are defined by Windows and apply to all computer users. Changes to the system environment are written to the registry, and usually require a restart to become effective.


User Variables for User Name
Any user can add, modify, or remove a user environment variable. These variables are established by Windows XP Setup, by some programs, and by users. The changes are written to the registry, and are usually effective immediately. However, after a change to user environment variables is made, any open software programs should be restarted to force them to read the new registry values. The common reason to add variables is to provide data that is required for variables that you want to use in scripts.

To view or change environment variables: 1.Right-click My Computer, and then click Properties.
2.Click the Advanced tab.
3.Click Environment variables.
4.Click one the following options, for either a user or a system variable:◦Click New to add a new variable name and value.
◦Click an existing variable, and then click Edit to change its name or value.
◦Click an existing variable, and then click Delete to remove it.

 
Craig E. Lewis
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks,
But can you give me the exact words I have to write in the system variable JAVA_HOME and the PATH variable.
 
vipul JavaDeveloper
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In path =%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\Wbem;D:\app\Vipul\product\11.1.0\db_1\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Windows Live\Shared;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;D:\Java\jdk1.5.0_22\bin


consider last bin path you set in PATH , before that use semicolon.
Also need to set CLASSPATH in class path you set lib path like (D:\Java\jdk1.5.0_22\lib;) and end classpath with semicolon,
in (JAVA_HOME=D:\Java\jdk1.5.0_22 )

After all setting restart your computer ,
Try it hope it's help you,


Vipul


 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't need to restart your computer after changing any system variable, you only need to restart any running application that needs the updated value.
 
Marshal
Posts: 79153
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This FAQ has more details in.
 
Craig E. Lewis
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank You Everyone problem solved.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic