This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java in linux

 
sanket karkare
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when i run the command

java /home/abc/.config/autostart/Test4

i get

Exception in thread "main" java.lang.NoClassDefFoundError: /home/abc//config/autostart/Test4

I think the problem is because a dot represents current directory in java and a hidden file in linux.
So how to resolve the ambiguity.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "java" command takes as parameter a class name, not a file name. I think you want something like this (assuming that "Test4" is the class name, and it's not in a package).

java -classpath /home/abc/config/autostart Test4
 
sanket karkare
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, your reply worked
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic