× 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.



Thorbjørn,
Thanks! Sure enough when I run your code without the -D argument, I get "
java.vm.name=IBM J9 VM". When running with an override to the version I get
"java.vm.name = Classic VM". I must have missed that somewhere in the
documentation.

Looks like it's time to go back and do some more reading ;-)

James R. Perkins


On Sat, Nov 8, 2008 at 1:41 PM, Thorbjørn Ravn Andersen <ravn@xxxxxxxxxx>wrote:

James Perkins skrev:
Thorbjørn,
That would make sense. I have my own class that's like the PropDump, but
it
also dumps some runtime information too. I got some odd results with that
too. While it worked both ways, when the processors available prints, it
prints 4 without the -D parameter and 2 with the parameter.

So I would assume the overrides force the classic JVM?

An instructional video wouldn't hurt. I'm always willing to
learn/understand
something better.

James R. Perkins

I would have a very close look in the infocenter regarding the new
behaviour of the Java system. It is probably very well documented, if
you happen to know beforehand what you are looking for.

I'm looking around for a good screencast capture program, Jing does not
allow postprocessing sigh, so no video today. I have destilled the
approach I use in our swiss army knife jar in these two snippets, where
Main will be the class set as entry point in the executable jar.

Hopefully it is useful.

====
package com.runjva.demo;

import java.util.Iterator;
import java.util.Map;
import java.util.TreeMap;


public class PropDump {
/**
* @param args
*/
public static void main(String[] args) {
Map map = new TreeMap(System.getProperties());
for (Iterator iterator = map.entrySet().iterator();
iterator.hasNext();) {
Map.Entry type = (Map.Entry) iterator.next();
System.out.println(type.getKey() + " = " + type.getValue());
}
}
}
=====

package com.runjva.demo;


public class Main {

/**
* @param args
*/
public static void main(String[] args) {
String command = args[0];
String[] argsOnly = new String[args.length - 1];
for (int i = 0; i < argsOnly.length; i++) {
argsOnly[i] = args[i + 1];
}

if (command.equals("PropDump")) {
PropDump.main(argsOnly);
} else {
System.out.println("unsupported command: " + command);
}
}

}

--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.