I can run Swingset2 fine with the straight b96 build so it's something I did, perhaps to the build environment. Here are the changes I made:
Modifications for VS 2010: - make sanity failed, can't find crtassem.h (MS removed it from VS 2010) modified freetypecheck.c to remove the _MSC_VER section which contains all the #pragma comment(linker stuff modified its Makefile to comment out the line invoking $(MT). - rc and mt failed $(RC) and $(MT) are pointed at C:\Program Files\Microsoft Visual Studio 10.0\VC\bin instead of C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin changed ...\jdk7\jdk\make\common\Library.gmk from using $(RC/MT) to just rc/mt ditto ...\jdk7\jdk\make\common\Program.gmk ditto ...\jdk7\jdk\make\com\sun\java\pack\Makefile From Phil Race: Instead try setting ALT_MSDEVTOOLS_PATH Integration of my code: - modified awt_Component.cpp in and added awt_Accessible.cpp/h to ...\jdk7\jdk\src\windows\native\sun\windows - added AccessibleContextMirror.java to ...\jdk7\jdk\src\windows\classes\sun\awt\windows\accessibility - added AWTAccessibilityException.java to ...\jdk7\jdk\src\share\classes\java\awt\accessibility - added awt_Accessible.cpp to ...\jdk7\jdk\make\sun\awt\FILES_c_windows.gmk - added sun/awt/windows/accessibility/AccessibleContextMirror.java to FILES_export2 section of ...\jdk7\jdk\make\sun\awt\FILES_export_windows.gmk added a section for $(OBJDIR)/awt_Accessible.obj to ...\jdk7\jdk\make\sun\awt\make.depend - added sun/awt/windows/accessibility/AccessibleContextMirror to ...\jdk7\jdk\make\tools\sharing\classlist.windows - added oleaut32.lib/dll and oleacc.lib/dll to OTHER_LDLIBS section of ...\jdk7\jdk\make\sun\awt\Makefile - modified awt_DnDDS.cpp to add inline to void * operator new(size_t size) {return operator new(size, "stl", 1);} Note: The change to AwtComponent::WindowProc was minor: - add a case for WM_GETOBJECT - add some some code to WM_AWT_COMPONENT_SETFOCUS - add the following front matter in order to use an STL map (just like what's done in awt_DnDDS.cpp #pragma push_macro("bad_alloc") //"bad_alloc" would be introduced in STL as "std::zbad_alloc" and discarded by linker //by this action we avoid the conflict with AWT implementation of "bad_alloc" //we need <new> inclusion for STL "new" oprators set. #define bad_alloc zbad_alloc #include <new> #if defined(_DEBUG) || defined(DEBUG) extern void * operator new(size_t size, const char * filename, int linenumber); inline void * operator new(size_t size) {return operator new(size, "stl", 1);} #endif #include <map> // needed for map in awt_Accessible.h #pragma pop_macro("bad_alloc") //"bad_alloc" is undefined from here Pete === Raffaello Giulietti wrote: > I too cannot run Swing apps with the build of OpenJDK7 described here: > > http://mail.openjdk.java.net/pipermail/build-dev/2010-May/002955.html > > But my instructions describe how to use a binary FreeType for the build. > This suggests that Denis is probably right about building FreeType form > sources, even for newer build chains (VS 2008 and VS 2010). I didn't > give it a try, though. > > Raffaello > > > > On 2010-06-14 16:51, Lussier, Denis wrote: > >> I could never get any Swing app to run from my OpenJDK 6 Win32 builds >> (check out http://openscg.org) until building Freetype myself with >> Visual Studio. Using VS2003 it was as simple as: >> >> - download latest source from freetype.org >> >> - convert older ms project file shipped with freetype source to your >> version of visual stdio by simply opening in the gui and acknowledging >> the conversion. >> >> - build freetype from visual studio gui as a static lib and then a dll. >> >> - point the FREETYPE environment variables used for building OpenJDK >> to the above. >> >> >> --Denis Lussier >> http://openscg.org >> >> >> On 6/14/10, Pete Brunet <p...@a11ysoft.com> wrote: >> >>> In my first attempt at running a (slightly) modified OpenJDK jdk7 b96 >>> I'm getting a crash at startup running the SwingSet2.jar from JDK6 u20. >>> My unmodified b96 runs SwingSet2 with no crashes. (I built it with VS >>> 2010 Pro.) >>> >>> Looking at the stack trace indicates a DASSERT failure in >>> Java_sun_awt_windows_WToolkit_initIDs in awt_WToolkit.cpp at this code: >>> >>> jclass sDataClassLocal = env->FindClass("sun/java2d/SurfaceData"); >>> DASSERT(sDataClassLocal != 0); >>> >>> Since the failure appears to be unrelated to my code, perhaps I've made >>> an error in what I've modified in the build (but looking at build >>> particulars related to SurfaceData I didn't see any issues). >>> >>> The output and stack trace are below. >>> >>> How would you suggest I start debugging this? >>> >>> Thanks, Pete >>>