Java, Windows 7 & Environment Variables

littlestar

New member
Local time
11:34 AM
Messages
2
I have installed Java in Program Files (x86) > Java > jre > bin

In Environment Variables, I accidentally deleted the default PATH variable.

This is what I currently have in the PATH variable: Please can someone tell me what the default PATH was? I will add this in front of the Java path.

C:\Program Files (x86)\Java\jre6\bin;

Same question for CLASSPATH. What was the default variable for CLASSPATH?

-----

I open up CMD and type java -version and javac -version

For java -version I get:

java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)

For javac -version I get:

'javac' is not recognized as an internal or external command,
operable program or batch file.

What am I doing wrong? :confused: How do I make java work on windows 7 and what are the right paths to enter?

Thank you!
 

My Computer

OS
Windows 64 bit
This is in Windows 7 x64 Ultimate

CLASSPath
.;C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip

QTJAVA
C:\Program Files (x86)\Java\jre6\lib\ext\QTJava.zip
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom Built
OS
Windows 10 Pro x64, Windows 8.1 Pro x64, Windows 7 Ultimate x64 SP1,
CPU
INTEL i9-7920X LGA 2066
Motherboard
Gigabyte X299-WU8 F3
Memory
64 GB (4 X 16 GB) G-Skill V Series DDR4 3200 Quad Channel
Graphics Card(s)
EVGA GTX 1060 SC 3 GB
Sound Card
Realtek Onboard ALC1220
Monitor(s) Displays
2 x Samsung S27E310
Screen Resolution
1920x1080
Hard Drives
Samsung 2 x 970 EVO Plus 500 GB NVMe
1 x 6TB WD 6003FZBX SATA
1 x 6TB WD 60EFRX SATA
12 x 3TB WD 30EFRX SATA
PSU
Seasonic X-1050
Case
Thermaltake Armor+
Cooling
Corsair H80i V2 Liquid AOI Cooler
Keyboard
Logitech G510s
Mouse
Logitech MX Master 2S
Internet Speed
200 Mb/s
Antivirus
ESET NOD32 13.1
Browser
EDGE (Dev, Canary, Beta), Chrome
Other Info
ASUS RT-AC68U router
Malwarebytes 4.0.4
This may not be the right way to do it, but if that happened to me I would uninstall and re-install Java rather than spending too much time trying to find the default paths.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self build
OS
Windows 10 Home
CPU
Intel Core i5 3550
Motherboard
ASUS P8Z77-V LX (LGA1155)
Memory
Corsair Vengeance DDR3 16GB
Graphics Card(s)
Nvidia GEForce GTX 970 SSC
Monitor(s) Displays
Hanns-G 23.6", Acer 17"
Screen Resolution
1920x1080, 1440x900
Hard Drives
Sandisk SSD 256 GB
WD500GB
WD640GB
Seagage Ultra + 1TB ext.
BWD 800GB
WD 1TB ext
PSU
Antec 650w
Case
Cooler Master Centurion 534
Cooling
COOLER MASTER GeminII S524, 3 120 mm case fans.
Keyboard
Logitech MK300
Mouse
Logitech MK300
Internet Speed
Cable
Antivirus
MSSE, Malwarebytes
Browser
IE 10, Chrome
Hello!

PATH:
Code:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\system32\wbem;

Example additionals:
Code:
C:\Program Files\ATI Stream\bin\x86;%CommonProgramFiles%\Microsoft Shared\Windows Live;c:\Program Files\Microsoft SQL Server\100\Tools\Binn;c:\Program Files\Microsoft SQL Server\100\DTS\Binn;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0;C:\Program Files\Microsoft Windows Performance Toolkit;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files\Git\cmd;C:\Program Files\QuickTime\QTSystem

CLASS PATH:
Code:
.;C:\Program Files\Java\jre6\lib\ext\QTJava.zip

Good luck!

Richard
 

My Computer

Computer Manufacturer/Model Number
Dell XPS 420
OS
Vista Home Premium x86 SP2
CPU
Intel Core 2 Quad Q9300 2.50GHz
Motherboard
Stock Dell 0TP406
Memory
4 gb (DDR2 800) 400MHz
Graphics Card(s)
ATI Radeon HD 3870 (512 MBytes)
Monitor(s) Displays
1 x Dell 2007FP and 1 x (old) Sonic flat screen
Screen Resolution
1600 x 1200 and 1280 x 1204
Hard Drives
1 x 640Gb (SATA 300) Western Digital: WDC WD6400AAKS-75A7B0 1 x 1Tb (SATA 600) Western Digital: Caviar Black, SATA 6GB/S, 64Mb cache, 8ms Western Digital: WDC WD1002FAEX-00Z3A0 ATA Device
Case
Dell XPS 420
Cooling
Stock Fan
Keyboard
Dell Bluetooth
Mouse
Advent Optical ADE-WG01 (colour change light up)
Internet Speed
Varies from 10kb/s to 170kb/s. So unreliable it is not funny
Other Info
ASUS USB 3.0 5Gbps/SATA 6Gbps - PCI-Express Combo Controller Card (U3S6)
I would uninstall it and reinstall. Follow these instructions:

  • Download the latest version of Java Runtime Environment (JRE) 6.
  • Scroll down to where it says "Java Runtime Environment (JRE) 6u23 allows end-users to run Java applications".
  • Click the "Download" button to the right.
  • Check the box that says: "Accept License Agreement".
  • The page will refresh.
  • Click on the link to download Windows Offline Installation with or without Multi-language and save to your desktop.
  • Close any programs you may have running - especially your web browser.
  • Go to Start > Control Panel double-click on Add/Remove programs and remove all older versions of Java.
  • Check any item with Java Runtime Environment (JRE or J2SE) in the name.
  • Click the Remove or Change/Remove button.
  • Repeat as many times as necessary to remove each Java versions.
  • Reboot your computer once all Java components are removed.
  • Then from your desktop double-click on jre-6u23-windows-i586-p.exe to install the newest version.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Bruce ... somewhere in his 40's
OS
Windows 7 Ultimate 32bit SP1
CPU
Intel(R) Core(TM)2 Quad CPU @ 2.40GHz, 2400 MHz
Motherboard
INTEL/D975XBX2
Memory
4 GB
Graphics Card(s)
ATI Radeon HD 2600 Pro
Monitor(s) Displays
Samsung SyncMaster 914v
Screen Resolution
1280 x 1024
Hard Drives
2/500GB each ... ST3500630AS ATA Device.
One is not connected
PSU
Rocketfish 700 W
Case
G.Skill Gigabyte Chassis
Keyboard
Standard PS/2 Keyboard
Mouse
Microsoft PS/2 Mouse
Internet Speed
DSL
Antivirus
Avira Internet Security
Browser
IE 11
Other Info
ATI HDMI Audio
Hello!

Just to confirm we are on the right lines, you have completely deleted your path variable, including the normal Windows ones, installed Java, which added itself back in, but you want the other ones to avoid a reinstall?

Thanks!

Richard
 

My Computer

Computer Manufacturer/Model Number
Dell XPS 420
OS
Vista Home Premium x86 SP2
CPU
Intel Core 2 Quad Q9300 2.50GHz
Motherboard
Stock Dell 0TP406
Memory
4 gb (DDR2 800) 400MHz
Graphics Card(s)
ATI Radeon HD 3870 (512 MBytes)
Monitor(s) Displays
1 x Dell 2007FP and 1 x (old) Sonic flat screen
Screen Resolution
1600 x 1200 and 1280 x 1204
Hard Drives
1 x 640Gb (SATA 300) Western Digital: WDC WD6400AAKS-75A7B0 1 x 1Tb (SATA 600) Western Digital: Caviar Black, SATA 6GB/S, 64Mb cache, 8ms Western Digital: WDC WD1002FAEX-00Z3A0 ATA Device
Case
Dell XPS 420
Cooling
Stock Fan
Keyboard
Dell Bluetooth
Mouse
Advent Optical ADE-WG01 (colour change light up)
Internet Speed
Varies from 10kb/s to 170kb/s. So unreliable it is not funny
Other Info
ASUS USB 3.0 5Gbps/SATA 6Gbps - PCI-Express Combo Controller Card (U3S6)
I would uninstall it and reinstall. Follow these instructions:

  • Download the latest version of Java Runtime Environment (JRE) 6.
  • Scroll down to where it says "Java Runtime Environment (JRE) 6u23 allows end-users to run Java applications".
  • Click the "Download" button to the right.
  • Check the box that says: "Accept License Agreement".
  • The page will refresh.
  • Click on the link to download Windows Offline Installation with or without Multi-language and save to your desktop.
  • Close any programs you may have running - especially your web browser.
  • Go to Start > Control Panel double-click on Add/Remove programs and remove all older versions of Java.
  • Check any item with Java Runtime Environment (JRE or J2SE) in the name.
  • Click the Remove or Change/Remove button.
  • Repeat as many times as necessary to remove each Java versions.
  • Reboot your computer once all Java components are removed.
  • Then from your desktop double-click on jre-6u23-windows-i586-p.exe to install the newest version.

Hello!

Just to confirm we are on the right lines, you have completely deleted your path variable, including the normal Windows ones, installed Java, which added itself back in, but you want the other ones to avoid a reinstall?

Thanks!

Richard

Thank you for the replies.

Richard, I have copied and pasted the default paths back in the right places! Thank you!

Jacee, thanks for your instructions. I have followed them and now my java pack is installed in this location:

C:\Program Files\Java\jre6\bin
I have added it to the end of the PATH environment variable.

However, when I opened up cmd and entered java -version and javac -version, I am still getting the same error for javac -version.

I don't know what I am doing wrong!
 

My Computer

OS
Windows 64 bit
Back
Top