This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

classpath problem

 
Anjali Vaidya
Ranch Hand
Posts: 40
Chrome Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a problem I get everytime i try to execute a .class file in cmd. For example a simple Hello program compiles with javac Hello.java
It does not execute when i say java Hello
but it executes successfully when i say java -classpath . Hello

Why is it happening so? All my environment variables are set properly
 
Swastik Dey
Rancher
Posts: 1601
5
Android Java Java ME
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What value does your classpath env variable contain?
 
Anjali Vaidya
Ranch Hand
Posts: 40
Chrome Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It contains
.;C:\Program Files (x86)\Java\jdk1.5.0_08\lib;
 
Mohamed Sanaulla
Saloon Keeper
Pie
Posts: 3159
33
Google App Engine Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you exit and re-enter the cmd after setting the environment variables?
 
Anjali Vaidya
Ranch Hand
Posts: 40
Chrome Java Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i deleted it and created it again. Then i restarted the cmd
now it is working
thank you
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic