473,320 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to set path in java

Hi Guys,

can anybody explain me how to set temporary and permanent path in java
Oct 6 '17 #1
5 4828
chaarmann
785 Expert 512MB
Temporary:
If you open the command line, you can set the environment variables PATH and CLASSPATH before starting the java compiler.

permanent:
You can give a value to the environment vaiables in windows under advanced sytsem settings.
Oct 9 '17 #2
PATH can be set using the system utility in the Windows Control Panel or by using the Linux and Solaris shell startup file. On computers running Windows or Mac OS X, you do not normally need to make changes to PATH. If you can't configure it, you can use or read tutorial on this topic https://docs.oracle.com/javase/tutor...ent/paths.html.
Apr 2 '18 #3
To set the temporary path of JDK, you need to follow following steps:

1- Open command prompt
2- Copy the path of jdk/bin directory
3- Write in command prompt: set path=copied_path

For Example:

set path=C:\Program Files\Java\jdk1.6.0_23\bin
Apr 2 '18 #4
I'm using Windows 8.1, and I have both JDK6 and JDK8 installed. For development purposes, I needed to get the java version "1.6.0_45" at the command java -version and javac 1.6.0_45 over javac -version. The second command worked as expected after installing JAVA_HOME as the JDK6 start folder and adding% JAVA_HOME / bin% to Path. However, the first command still returned the java version "1.8.0_71"
Solution was necessary for my programing
Troubleshoot problems

I could find an entry in the Path environment variable that points to C: \ ProgramData \ Oracle \ Java. This folder actually contains a short link to java.exe JDK8.

The Correct Solution: Remove JDK 8

Workaround: edit the short message file so that it points to java.exe inside% JAVA_HOME% \ bin (Please replace the variable with the actual folder)
May 10 '18 #5
Ishan Shah
47 32bit
You should follow the following steps to set the java path:

1) Type advanced system setting in the serach field
2) Click on the View advanced system settings
3) System property windows will get open, then click on Environment Variables
4) In system variables click on the New button and enter JAVA_HOME as varible name and the path of your java JDK directory in Variable value
5) Update System PATH by select path under System varibales
6) Then click on Edit
7) In the Edit Environment Variable window click on New
8) then type in %JAVA_HOME%\bin
9) Tests your configuration by opening a new command prompt and type in "echo %JAVA_HOME%" then type in it: "javac -version" to check the java version
Dec 10 '20 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Hal Vaughan | last post by:
Is there any way to get the directory or full path Java was called from? For example, if I was in the directory "/home/me" and ran "java foo" is there anything that would tell me that Java was...
0
by: mailkhurana | last post by:
Hii , I am trying to use a type 2 driver to connect to DB2 0n AIX 5 I have a small java test to class to establish a conneciton with the db .. I am NOT using WAS or any appserver When I try to...
2
by: Michael | last post by:
Running DB2 v7 UDB ("DB2 v7.1.0.93", "n031208" and "WR21333") on Windows XP, I am unable to find out why the "Build for Debug" option within Stored Procedure Builder is not enabled on Java stored...
2
by: Daya Kiran Sunkara | last post by:
Hi All, I have a program which fetches the list of files inside a directory. For fetching this list I am making use of the glob.glob method which takes path as a parameter. For building the...
2
by: Janna | last post by:
I have the Java JVM installes on my server. I uncommented extension=php_java.dll in php.ini I uncommented and proerpyl filled out the section in php.ini: java.class.path...
1
by: aapexclient | last post by:
I have a problem with Java finding my custom class directory. I have searched the forums and tried everything, but nothing seems to work. The <javapgm>.java compiled cleanly and created...
2
by: sezanawa | last post by:
Hi Guys, I am new to java deployment things. Specially for desktop applications. I used to work with J2EE and i did deployment only for web projects. Now i have developed a small desktop...
5
by: r035198x | last post by:
Setting up. Getting started To get started with java, one must download and install a version of Sun's JDK (Java Development Kit). The newest release at the time of writting this article is...
0
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
by: Hotice | last post by:
Hello all, I want to create a web application for sending booking requests to DHL. I already found a toolkit (http://xmlshippingtest.dhl-usa.com/toolkit/index.html) that uses XML files to send the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.