problem with FreeBSD run JAVA programme

Nick Johnson freebsd at spatula.net
Tue Apr 3 15:26:49 UTC 2007


On Tue, 3 Apr 2007, Top Chai wrote:

> java -classpath -esa .:/usr/lss/node.jar:/usr/lss/node/lib/external.jar com.sigma_rt.lss.application.AGENT_Startup &
> # Exception in thread "main" java.lang.NoClassDefFoundError: /:/usr/lss/node/jar:/usr/lss/node/lib/external/jar
> 
> why i am input /usr/lss/node.jar but it change to /usr/lss/node/jar ????

Because you got the order of the arguments wrong.  You told Java that the 
classpath is "-esa" and that you wanted to run a class called 
.:/usr/lss/node.jar.  In Java, package names translate to directory paths 
everywhere you find a ".", so the path translates to /:/usr/lss/node/jar.

I think you may benefit from reading the Java tutorial at 
http://java.sun.com/tutorial/ as these are really basic Java questions 
unrelated to Java on FreeBSD.

   Nick

-- 
"Humans are a dangerously insane and very sick species."
   -- Eckhart Tolle
This message has been brought to you by Nick Johnson 2.2 and the number 6.
http://healerNick.com/       http://morons.org/        http://spatula.net/


More information about the freebsd-java mailing list