troubleshooting Question

Java error

Avatar of wasabi3689
wasabi3689Flag for United States of America asked on
JavaJava App ServersJava EE
27 Comments1 Solution849 ViewsLast Modified:
I have a java program called "xxx.class" on a Windows machine. It's located in C:\Products\XXXScript

If I am in that directory and type this:

"C:\Program Files (x86)"\Java\jre7\bin\java.exe

I get the help for java, so that executable is being seen

If I do this:
"C:\Program Files (x86)"\Java\jre7\bin\java.exe -cp . xxx.class

I get "Error: Could not find or load main class xxx.class" even though xxx.class is in my current directory and I've set classpath to ".". I can remove the -cp option, change it to -classpath, set it to the full path to the current directory, doesn't matter.

Anyone can help me trouble shoot.
ASKER CERTIFIED SOLUTION
CPColin
Senior Java Architect

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 27 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 27 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros