Vijay Manohar
Vijay Manohar

Reputation: 503

Environment variable not working for 64 bit alone

I am using Windows10 64 bit , I have installed Java (JRE 64 bit & JDK 64 bit) in my machine. I have file located in C:\Users\User_Name\Desktop\Hello.Class but when I run my program using command java Hello.

I get the error message Error: Could not find or load main class Hello

Whereas when i install Java 32 bit , its working fine. The Problem occurs only for my Java 64 bit

The Environment variable configuration for Java 64 bit is as follows:

enter image description here

I have tried various solutions , none of them worked out . Please suggest any solution.

Upvotes: 0

Views: 137

Answers (1)

user207421
user207421

Reputation: 311050

That's a silly place to put a .class file. Put into your current working directory.

I haven't set a CLASSPATH environment variable for about 20 years, and the contents of yours does not need to include the various bin directories.

Upvotes: 1

Related Questions