What is the meaning of this row:
return attr != null ?
attr.getValue(Attributes.Name.IMPLEMENTATION_VERSION ) : null;
//Mikael
> What is the meaning of this row:
>
> return attr != null ?
> attr.getValue(Attributes.Name.IMPLEMENTATION_VERSION ) : null;
It's a short form of the statement:
if (attr!=null)
return attr.getValue(Attributes.Name.IMPLEMENTATION_VERSION);
else return null;
if(attr==null){
return null;
}else{
return attr.getValue(Attributes.Name.IMPLEMENTATION_VERSION );
}
Patricia
the ?:; construction does this:
result = test?valueIfTrue:valueIfFalse;
--
Paul Lutus
www.arachnoid.com
On Wed, 12 Dec 2001 14:39:56 +0100, Petterson Mikael
<mikael.p...@era.ericsson.se> wrote or quoted :
>return attr != null ?
>attr.getValue(Attributes.Name.IMPLEMENTATION_VERSION ) : null;
see "ternary operator" in your Java language reference.
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBPBfdru9ipV+Syz7dEQJtcACgl0hDL6fVf/Lrce+wGOkyWmizqqMAnR5c
MQ6+at0jmQuali8+bx1DxgqL
=tNkZ
-----END PGP SIGNATURE-----
--
canadian mind products, roedy green
the java glossary at
http://www.mindprod.com/gloss.html
or http://209.139.205.39
> I'm having problems getting a Java program called "Jellyfish" to run on my
> OS/2 box. I have the 1.3 SE JVM and it runs other Java programs requiring
> Java2 just fine. However, this is the result from Jellyfish:
> [D:\java13\jre\biowire]java -jar jellyfish.jar
> java.lang.NoClassDefFoundError: com/apple/mrj/MRJAboutHandler
> at java.lang.ClassLoader.defineClass0(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:496)
> at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:1
> 7)
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
> at java.net.URLClassLoader.access$300(URLClassLoader.java:69)
> at
> java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:544)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:203)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:325)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:380)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:257)
> Exception in thread "main"
> [D:\java13\jre\biowire]
>
> What does this mean and how could I fix it?
I have seen this error in the past with the Java Media Framework.
Essentially, Java is looking for classes which are specific to Apple's
MRJ Java implementation for Macintosh. If this Jellyfish program
requires the Java Media Framework, you may have to get a newer version.
I seem to recall this problem going away with later versions of the JMF.
Jim S.
What does this mean and how could I fix it?
Thanks,
Anton
> Is it possible to add the MRJ classes without upgrading the whole JVM?
I doubt it. They are meant for Apple computers only. And the problem
wasn't the JVM, it was the Java Media Framework. Does this 'Jellyfish'
program use the JMF?
Jim S.