× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Rajesh,

Your problem now is that you are specifying the class incorrectly in the 
java command. If you have no package statement in your code, you must run 
it from the directory the class file is in. Your command:
java -Djava.version=1.2  -classpath 
.:/java/jt400.jar:/java/xml/jdom-1.0/build/jdom.jar:/java/xml/jdom-contrib-1.0/build/jdom-contrib.jar
 
 /test/Test

will cause the java runtime to try and load class named test/Test, which 
doesn't exist. Try changing to the test directory and running it as 
simply:
java -Djava.version=1.2  -classpath 
.:/java/jt400.jar:/java/xml/jdom-1.0/build/jdom.jar:/java/xml/jdom-contrib-1.0/build/jdom-contrib.jar
 
 Test

If you do have a package statement, and in you last post it looked like 
you had package demo; in the class file, you would have to change your 
command to be:
java -Djava.version=1.2  -classpath 
.:/java/jt400.jar:/java/xml/jdom-1.0/build/jdom.jar:/java/xml/jdom-contrib-1.0/build/jdom-contrib.jar
 
 demo.Test

assuming that you have a directory named demo defined directly under you 
current directory. You NEVER use a directory path specification for your 
class files. Always use the package structure separated by periods. Set 
your classpath up so that one of the entries in it defines the root of 
your package structure. For example, if you have your IFS work area set up 
like /home/rajeesh/src/test and /home/rajeesh/src/demo, you would put 
/home/rajeesh/src in the classpath. Your Java classes would have to be in 
packages named either test or demo, and would be specified as test.Test or 
demo.Test depending on the package definition you coded.

One other thing: don't change your main declaration to public static void 
main(String arg[]). Keep it as main(String[] arg). This is a Java style 
array definition. The String arg[] is C style. Java will accept this as a 
bridge to old C code, but it is obsolete and deprecated.

Good luck.
_________________________________________________________________
Jeff Furgal / MIMIX User Interface Product Architect / Lakeview Technology

furgalj@xxxxxxxxxxxxxxxx / 630-282-8360

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.