Community
Participate
Working Groups
I installed the Mac OS X Java 1.4.1 upgrade tonight, but have been unable to get simple features like assert to work properly with eclipse. I created a simple project and selected java 1.4 in the complience option panel, but eclipse seems to be ignoring any and all assert statements, including things like "assert false" and "assert 1==0". Programs containing these assertions execute as if these were noops. So how do I get asserts and other Java 1.4.1 features to work properly on Mac OS X?
Could you please attach the .java file and the .class file corresponding to the class that has the assert statements? Also which JRE are you using at runtime? Could you please paste in the command line used to run your program: in the Debug view, select the javaw.exe process, bring up the properties, and copy the command line info.
Are you enabling assertions with -ea on runtime?
Created attachment 4003 [details] source file AssertTest.java Here's the source file. I'll attach the .class file next. I'm afraid I'm a very new eclipse user - trying to learn my way around for possible use in the courses I teach at University of Washington. I tried running this from inside eclipse, so there are no command line arguments and I can't find anything about javaw in the debug view. The Debug pane reports that it is running /System/Library/Frameworks/Java.VM.framework/Versions/1.4.1/Home/bin/java. I'm hoping that it will eventually be simple to configure asserts with some combination of simple options from within the environment. Suggestions appreciated. Thanks.
Created attachment 4004 [details] compiled version of test file
Found the run arguments panel and adding -ea to the vm arguments got the asserts to work. Please close this one out. Sorry for the trouble. Hal
This should be closed as INVALID. FIXED means that an action has been taken to fix the problem which is not the case here.
This wasn't a problem with Eclipse, but rather a problem with the configuration of the launching configuration.