Assertions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Assertions

David Webster
Can I/How do I turn assert() on?

David Webster
Reply | Threaded
Open this post in threaded view
|

Antwort: Assertions

Joachim Wesner
Where / When / Why ???

Java / Macro / XXX?

(Sorry, but your question/request is extremely "condensed")

Mit freundlichen Grüßen / Best regards

Joachim Wesner



                                                                           
             David William                                                
             Webster                                                      
             <dwwebster00@GMAI                                          An
             L.COM>                     [hidden email]                
             Gesendet von:                                           Kopie
             ImageJ Interest                                              
             Group                                                   Thema
             <[hidden email].          Assertions                        
             GOV>                                                          
                                                                           
                                                                           
             23.03.2010 21:54                                              
                                                                           
                                                                           
              Bitte antworten                                              
                    an                                                    
              ImageJ Interest                                              
                   Group                                                  
             <[hidden email].                                            
                   GOV>                                                    
                                                                           
                                                                           




Can I/How do I turn assert() on?

David Webster



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: Assertions

David Webster
Sorry, In ImagJ/Java!

On Tue, Mar 23, 2010 at 2:38 PM, Joachim Wesner <
[hidden email]> wrote:

> Where / When / Why ???
>
> Java / Macro / XXX?
>
> (Sorry, but your question/request is extremely "condensed")
>
> Mit freundlichen Grüßen / Best regards
>
> Joachim Wesner
>
>
>
>
>             David William
>             Webster
>             <dwwebster00@GMAI                                          An
>             L.COM <http://l.com/>>                     [hidden email]
>             Gesendet von:                                           Kopie
>             ImageJ Interest
>             Group                                                   Thema
>             <[hidden email].          Assertions
>             GOV>
>
>
>             23.03.2010 21:54
>
>
>              Bitte antworten
>                    an
>              ImageJ Interest
>                   Group
>             <[hidden email].
>                   GOV>
>
>
>
>
>
>
> Can I/How do I turn assert() on?
>
> David Webster
>
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
Reply | Threaded
Open this post in threaded view
|

Re: Assertions

Burger Wilhelm
In reply to this post by Joachim Wesner
Use the -ea flag when launching the Java runtime.

--Wilhelm



> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
> Joachim Wesner
> Sent: Tuesday, March 23, 2010 10:39 PM
> To: [hidden email]
> Subject: Antwort: Assertions
>
> Where / When / Why ???
>
> Java / Macro / XXX?
>
> (Sorry, but your question/request is extremely "condensed")
>
> Mit freundlichen Grüßen / Best regards
>
> Joachim Wesner
>
>
>
>
>              David William
>              Webster
>              <dwwebster00@GMAI
> An
>              L.COM>                     [hidden email]
>              Gesendet von:
> Kopie
>              ImageJ Interest
>              Group
> Thema
>              <[hidden email].          Assertions
>              GOV>
>
>
>              23.03.2010 21:54
>
>
>               Bitte antworten
>                     an
>               ImageJ Interest
>                    Group
>              <[hidden email].
>                    GOV>
>
>
>
>
>
>
> Can I/How do I turn assert() on?
>
> David Webster
>
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: Assertions

David Webster
But how do I do this when using ImageJ's 'Compile and Run"?

David

On Wed, Mar 24, 2010 at 12:35 AM, Burger Wilhelm <
[hidden email]> wrote:

> Use the -ea flag when launching the Java runtime.
>
> --Wilhelm
>
>
>
> > -----Original Message-----
> > From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
> > Joachim Wesner
> > Sent: Tuesday, March 23, 2010 10:39 PM
> > To: [hidden email]
> > Subject: Antwort: Assertions
> >
> > Where / When / Why ???
> >
> > Java / Macro / XXX?
> >
> > (Sorry, but your question/request is extremely "condensed")
> >
> > Mit freundlichen Grüßen / Best regards
> >
> > Joachim Wesner
> >
> >
> >
> >
> >              David William
> >              Webster
> >              <dwwebster00@GMAI
> > An
> >              L.COM <http://l.com/>>
> [hidden email]
> >              Gesendet von:
> > Kopie
> >              ImageJ Interest
> >              Group
> > Thema
> >              <[hidden email].          Assertions
> >              GOV>
> >
> >
> >              23.03.2010 21:54
> >
> >
> >               Bitte antworten
> >                     an
> >               ImageJ Interest
> >                    Group
> >              <[hidden email].
> >                    GOV>
> >
> >
> >
> >
> >
> >
> > Can I/How do I turn assert() on?
> >
> > David Webster
> >
> >
> >
> > ______________________________________________________________________
> > This email has been scanned by the MessageLabs Email Security System.
> > For more information please visit http://www.messagelabs.com/email
> > ______________________________________________________________________
>
Reply | Threaded
Open this post in threaded view
|

Re: Assertions

Burger Wilhelm
David,

you need to set the -ea flag when you start ImageJ (Java VM). Compile-and-Run does not stop/start the JVM. For example, on my WinXP/Sun-JVM system I simply changed the file ImageJ.cfg to:

.
jre\bin\javaw.exe
-ea -Xmx594m -cp ij.jar ij.ImageJ

Here is an example:
//---------------------------------------------------
import ij.IJ;
import ij.plugin.PlugIn;

public class JavaCheckAssertions implements PlugIn {
 public void run(String arg0) {
  assert false : "YES, assertions are activated!";
  IJ.log("Assertions are turned OFF (use -ea switch to start IJ)");
 }
}
//---------------------------------------------------

Works fine here.
--Wilhelm
________________________________________
From: ImageJ Interest Group [[hidden email]] On Behalf Of David Webster [[hidden email]]
Sent: Wednesday, March 24, 2010 18:37
To: [hidden email]
Subject: Re: Assertions

But how do I do this when using ImageJ's 'Compile and Run"?

David

On Wed, Mar 24, 2010 at 12:35 AM, Burger Wilhelm <
[hidden email]> wrote:

> Use the -ea flag when launching the Java runtime.
>
> --Wilhelm
>
>
>