Raymond Norton wrote:
> I have a new centos 4.1 install and installed java-sdk using yum. When I
> try to execute the following, I get an exception error:
> 
> 
> 
> root at blh fileIndexer]# java -Xmx256m -jar FileIndexer-1.1.5.jar Warning:
> -Xmx256m not understood. Ignoring. Warning: -jar not understood. Ignoring.
> Exception in thread "main" java.lang.NoClassDefFoundError
> 
> java-1.4.2-gcj-compat-1.4.2.0-27jpp is the only reference to java I have
> with rpm -q
> 
> How can I fix this?
> 
> 
> 
> _______________________________________________
> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
> tclug-list at mn-linux.org
> http://mailman.mn-linux.org/mailman/listinfo/tclug-list
> 


 >java version "1.4.2"
 >gcj (GCC) 3.4.3 20050227 (Red Hat 3.4.3-22.1)

The problem is that you are using a distribution of java that is not 
from Sun, and this distribution does not seem to understand the standard 
  command line parameters of -Xmx and -jar.  That is why you got the two 
warnings - and then since the -jar call failed - of course you got a 
NoClassDefFound error - because your jar file did not end up on the 
classpath.

I suggest that you read up on this version of java to find out what 
their variables are (if they exist) to correspond to -Xmx and -jar - or 
you should install a more "standard" java VM that understands these 
variables...

Having to set a CLASSPATH manually before you run an application should 
be a last resort.

Dan

-- 
****************************
Daniel Armbrust
Biomedical Informatics
Mayo Clinic Rochester
daniel.armbrust(at)mayo.edu
http://informatics.mayo.edu/