Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CLASSPATH in .bat file

 
Prabha Dhandapani
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,
I have a .bat file as follows

When I run this bat file it says that the class cannot be found...I have to do this today...Any help ASAP is appreciated
Thanks,
Prabha
 
Brian Pipa
Ranch Hand
Posts: 299
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This might work better:

You have to put Windows/Dos system variables in %
Having said that, I would NOT recommend doing it this way.
I would just do
java ThreadCall -classpath C:\TestPrograms\all.jar
or better yet, make the .jar executable and use
java -jar C:\TestPrograms\all.jar
Brian
 
Prabha Dhandapani
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Brian!I put it this way but it still doesnt work...Is there anything that I need to setup in the environent variables by going to the control panel???
C:\>java ThreadCall -classpath C:\TestPrograms
Exception in thread "main" java.lang.NoClassDefFoundError: ThreadCall
Thanks,
Prabha
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

This way '-classpath ..' is interpreted as parameter for the 'ThreadCall'.
You have to arrange it the other way round:

Now it's an parameter for the jvm.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic