This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes java in linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "java in linux" Watch "java in linux" New topic
Author

java in linux

sanket karkare
Greenhorn

Joined: Jan 12, 2009
Posts: 10
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
Marshal

Joined: Mar 22, 2005
Posts: 41046
    
  43
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


Ping & DNS - my free Android networking tools app
sanket karkare
Greenhorn

Joined: Jan 12, 2009
Posts: 10
Thanks, your reply worked
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java in linux
 
Similar Threads
Hunt Exam Question
Strange exception with StrutsTestCase for JUnit
Specific match rule
Array of zero size
String object declaration problem