public inbox for rhug-rhats@sourceware.org
 help / color / mirror / Atom feed
* Detecting gcj
@ 2002-12-02  7:57 Gary Benson
  2002-12-02  8:17 ` Anthony Green
  0 siblings, 1 reply; 3+ messages in thread
From: Gary Benson @ 2002-12-02  7:57 UTC (permalink / raw)
  To: rhug-rhats

At one point in JUnit it avoids some errors by detecting that is is
running under a wierd VM by doing:

| public static boolean inVAJava() {
| 	try {
| 		Class.forName("com.ibm.uvm.tools.DebugSupport");
| 	}
| 	catch (Exception e) {
| 		return false;
| 	}
| 	return true;
| }

Is there a similar way to detect whether we are running under libgcj?

Cheers,
Gary

[ gbenson@redhat.com ][ GnuPG 85A8F78B ][ http://inauspicious.org/ ]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Detecting gcj
  2002-12-02  7:57 Detecting gcj Gary Benson
@ 2002-12-02  8:17 ` Anthony Green
  2002-12-02  8:58   ` Gary Benson
  0 siblings, 1 reply; 3+ messages in thread
From: Anthony Green @ 2002-12-02  8:17 UTC (permalink / raw)
  To: Gary Benson; +Cc: rhug-rhats

On Mon, 2002-12-02 at 08:07, Gary Benson wrote:
> Is there a similar way to detect whether we are running under libgcj?

Yes - compare the java.vm.name system property to "GNU libgcj".

AG



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Detecting gcj
  2002-12-02  8:17 ` Anthony Green
@ 2002-12-02  8:58   ` Gary Benson
  0 siblings, 0 replies; 3+ messages in thread
From: Gary Benson @ 2002-12-02  8:58 UTC (permalink / raw)
  To: rhug-rhats

On Mon, Dec 02, 2002 at 08:17:25AM -0800, Anthony Green wrote:
> On Mon, 2002-12-02 at 08:07, Gary Benson wrote:
> > Is there a similar way to detect whether we are running under libgcj?
> 
> Yes - compare the java.vm.name system property to "GNU libgcj".

Thanks
Gary

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-12-02 16:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-02  7:57 Detecting gcj Gary Benson
2002-12-02  8:17 ` Anthony Green
2002-12-02  8:58   ` Gary Benson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).