Troubles with launching Java GUI from C++

Hi,
I'm launching a Java program from my C++ program (in linux). For C++ I'm using the Xm library for the GUI. When I want to instantiate a new Java object, I get the following error:
An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : 11 occurred at PC=0x4015C475
Function=XmRenderTableFree+0x15
Library=/usr/X11R6/lib/libXm.so.2
This is a backtrace (see #17):
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1024 (LWP 19643)]
0x4015c475 in XmRenderTableFree () from /usr/X11R6/lib/libXm.so.2
(gdb) backtrace
#0 0x4015c475 in XmRenderTableFree () from /usr/X11R6/lib/libXm.so.2
#1 0x40153cd9 in XmFontListFree () from /usr/X11R6/lib/libXm.so.2
#2 0x4c6ed4c4 in Java_sun_awt_motif_MComponentPeer_pSetFont () from
/localhost/packages/java/j2sdk1.4.0/jre/lib/i386/libawt.so
#3 0x423b6129 in ?? ()
#4 0x423aef93 in ?? ()
#5 0x423aef93 in ?? ()
#6 0x423aef93 in ?? ()
#7 0x423aef93 in ?? ()
#8 0x423aeebc in ?? ()
#9 0x423aef93 in ?? ()
#10 0x423aef93 in ?? ()
#11 0x423ac195 in ?? ()
#12 0x404d6156 in JavaCalls::call_helper () from
/localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
#13 0x40570ccd in os::os_exception_wrapper () from
/localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
#14 0x404d62a4 in JavaCalls::call () from
/localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
#15 0x404de12d in jni_invoke () from
/localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
#16 0x404de94e in jni_NewObjectV () from
/localhost/packages/java/j2sdk1.4/jre/lib/i386/client/libjvm.so
#17 0x0804d27b in JNIEnv_::NewObject (this=0x819af2c, clazz=0x819b938,
methodID=0x8293af8) at /localhost/packages/java/j2sdk1.4/include/jni.h:840
#18 0x0804cb0a in AppletViewer::AppletViewer (this=0x81a5628,
appletA=0x8193438) at AppletViewer.cc:227
#19 0x0804e17b in Applet::move (this=0x8193438, drawX=18, drawY=25,
drawWidth=376, drawHeight=77, scrollX=0, scrollY=0, dpi=86) at Applet.cc:329
#20 0x0808b852 in PageAttrs::moveApplets (this=0x8192dd8, drawX=18,
drawY=25, drawWidth=376, drawHeight=77, scrollX=0, scrollY=0, dpi=86) at
Page.cc:321
#21 0x080ae6ab in XPDFCore::moveApplets (this=0x81698d0) at Page.h:190
#22 0x080ac87f in XPDFCore::displayPage (this=0x81698d0, pageA=2, zoomA=1,
rotateA=0, scrollToTop=1, addToHist=1) at XPDFCore.cc:585
#23 0x080acac3 in XPDFCore::gotoNextPage (this=0x81698d0, inc=1, top=1) at
XPDFCore.cc:670
#24 0x080b3901 in XPDFViewer::nextPageCbk (widget=0x8149ff0, ptr=0x81408e8,
callData=0xbffff6d0) at XPDFViewer.cc:1229
#25 0x401df59e in XtCallCallbackList () from /usr/X11R6/lib/libXt.so.6
#26 0x400b5803 in ActivateCommon () from /usr/X11R6/lib/libXm.so.2
#27 0x400b5689 in Activate () from /usr/X11R6/lib/libXm.so.2
#28 0x4020c453 in _XtMatchAtom () from /usr/X11R6/lib/libXt.so.6
#29 0x4020cd3e in _XtMatchAtom () from /usr/X11R6/lib/libXt.so.6
#30 0x4020cdf4 in _XtTranslateEvent () from /usr/X11R6/lib/libXt.so.6
#31 0x401ea462 in XtDispatchEventToWidget () from /usr/X11R6/lib/libXt.so.6
#32 0x401ead7e in _XtOnGrabList () from /usr/X11R6/lib/libXt.so.6
#33 0x401eafc8 in XtDispatchEvent () from /usr/X11R6/lib/libXt.so.6
#34 0x401eb3d9 in XtAppMainLoop () from /usr/X11R6/lib/libXt.so.6
#35 0x080ab04c in XPDFApp::run (this=0x81175b0) at XPDFApp.cc:299
#36 0x080b8eef in main (argc=2, argv=0xbffffa84) at xpdf.cc:283
Now here's the interesting thing: in the constructor of my Java class there's a call to pack() to initiate my Java GUI. When I remove that call everything works fine (but then I haven't got a GUI though). setVisible(true) in the Java code also gives that problem.
Has C++ or the Xm library some troubles with the Java GUI? Or what the hell is going wrong?
PS: On Solaris, the very same code works perfectly...

I really need a solution.
Is it possible it has something to do with threads?
Do I have to do AttachCurrentThread or something like that? Is that necessary?
Btw, I assigned 10 duke dollars to this topic.

Similar Messages

  • Launching Java GUI from forms

    Hi,
    I have the following questions regarding launching a Java GUI from forms:
    1)Is it possible to launch a Java GUI on client(web) side from forms? (i.e. click on a button should launch a Java GUI instead of forms)
    2)Can this Java GUI share the same DB connection used by forms for any DB operations?
    Thanks
    -murali

    Thanks,
    I was able to bring up the Java GUI. Now, I want to access the database from this GUI. What approach should I have to take. [A sample SQLJ based GUI application is working fine on the console]
    -murali

  • I am having trouble with my JAVA Applet. It isn't functioning on SAFARI.    It seems to have stopped working and I used it on SAFARI last year. Any suggestions ?

    I am having trouble with my JAVA Applet. It isn't functioning on SAFARI.    It seems to have stopped working and I used it on SAFARI last year. Any suggestions?

    Post in the Safari forum area.

  • Issue with launching Java Program - Java Library Problem?

    I hope this is the right forum, I apologize if it isn't. I am having issues launching a program for a video game that uses java. One of the devs told me to post my issue here, as he doesn't know how much more help he can give with this issue. Using the java -jar command, this is the printout I get:
    Microsoft Windows [Version 6.0.6002]
    Copyright (c) 2006 Microsoft Corporation.  All rights reserved.
    C:\Users\vecdran>java -version
    java version "1.6.0_20"
    Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
    Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
    C:\Users\vecdran>chdir C:\Games\Steam\Steamapps\common\Crysis\mods\mwll\actionma
    pper\dist
    C:\Games\Steam\steamapps\common\crysis\Mods\mwll\Actionmapper\dist>java -jar Act
    ionmapper.jar
    Jun 18, 2010 2:25:19 PM org.jdesktop.application.Application$1 run
    *SEVERE: Application class mwllactionmapper.MWLLActionmapperApp failed to launch*
    *java.lang.NullPointerException*
    at javax.swing.ImageIcon.<init>(Unknown Source)
    at javax.swing.ImageIcon.<init>(Unknown Source)
    at sun.swing.WindowsPlacesBar.<init>(Unknown Source)
    at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.updateUseShellFo
    lder(Unknown Source)
    at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installComponent
    s(Unknown Source)
    at javax.swing.plaf.basic.BasicFileChooserUI.installUI(Unknown Source)
    at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(Unknow
    n Source)
    at javax.swing.JComponent.setUI(Unknown Source)
    at javax.swing.JFileChooser.updateUI(Unknown Source)
    at javax.swing.JFileChooser.setup(Unknown Source)
    at javax.swing.JFileChooser.<init>(Unknown Source)
    at javax.swing.JFileChooser.<init>(Unknown Source)
    at mwllactionmapper.model.ActionmapsFileModel.getMWLLDocumentsFolder(Act
    ionmapsFileModel.java:141)
    at mwllactionmapper.model.ActionmapsFileModel.getMWLLProfiles(Actionmaps
    FileModel.java:160)
    at mwllactionmapper.MWLLActionmapperView.doSelectProfile(MWLLActionmappe
    rView.java:603)
    at mwllactionmapper.MWLLActionmapperView.<init>(MWLLActionmapperView.jav
    a:75)
    at mwllactionmapper.MWLLActionmapperApp.startup(MWLLActionmapperApp.java
    :21)
    at org.jdesktop.application.Application$1.run(Application.java:171)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Exception in thread "AWT-EventQueue-0" java.lang.Error: Application class mwllac
    tionmapper.MWLLActionmapperApp failed to launch
    at org.jdesktop.application.Application$1.run(Application.java:177)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.lang.NullPointerException
    at javax.swing.ImageIcon.<init>(Unknown Source)
    at javax.swing.ImageIcon.<init>(Unknown Source)
    at sun.swing.WindowsPlacesBar.<init>(Unknown Source)
    at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.updateUseShellFo
    lder(Unknown Source)
    at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installComponent
    s(Unknown Source)
    at javax.swing.plaf.basic.BasicFileChooserUI.installUI(Unknown Source)
    at com.sun.java.swing.plaf.windows.WindowsFileChooserUI.installUI(Unknow
    n Source)
    at javax.swing.JComponent.setUI(Unknown Source)
    at javax.swing.JFileChooser.updateUI(Unknown Source)
    at javax.swing.JFileChooser.setup(Unknown Source)
    at javax.swing.JFileChooser.<init>(Unknown Source)
    at javax.swing.JFileChooser.<init>(Unknown Source)
    at mwllactionmapper.model.ActionmapsFileModel.getMWLLDocumentsFolder(Act
    ionmapsFileModel.java:141)
    at mwllactionmapper.model.ActionmapsFileModel.getMWLLProfiles(Actionmaps
    FileModel.java:160)
    at mwllactionmapper.MWLLActionmapperView.doSelectProfile(MWLLActionmappe
    rView.java:603)
    at mwllactionmapper.MWLLActionmapperView.<init>(MWLLActionmapperView.jav
    a:75)
    at mwllactionmapper.MWLLActionmapperApp.startup(MWLLActionmapperApp.java
    :21)
    at org.jdesktop.application.Application$1.run(Application.java:171)
    ... 8 more
    C:\Games\Steam\steamapps\common\crysis\Mods\mwll\Actionmapper\dist>As you can see, my Java is completely up to date, and this is the only program I appear to have problems launching. I have no idea what to do from here. :(
    PS.
    I had to add the Java path to my System -> Environmental Variables -> Path variable, as it was not there from the start, and before adding it command prompt wouldn't recognize java commands. Don't know whether this indicates anything.
    Edited by: vecdran on Jun 20, 2010 11:23 AM

    [Bug ID 4711700|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4711700] is eerily similar to what you're experiencing. Although the bug was reported against an older version of the JDK the last comment provides a workaround to the problem that may be helpful. Good luck.

  • Auto-launch Java classes from deliveries

    I need to launch custom java class from deliveries like described in this article (http://oraclebizint.wordpress.com/2007/12/17/oracle-bi-ee-101332-calling-java-scripts-and-java-classes-from-ibots/). The problem is that I want to launch my java code with all reports and hide it from application users. Is it possible?

    You can use the standard JMS Session API available to create a Queue or Topic identity object.
    i.e. Queue _myQueue = _session.createQueue("xxxxxxxxxxxxxx");Note that while this is a portable API, the syntax of the name parameter may not be portable across providers.
    Further, this only creates the Destination identity object and not the physical Destination object.
    For Sun MQ, when this identity object is used to create a producer or consumer, the physical destination is 'auto-created' if the broker is operating with factory defaults.
    Other providers may not support the 'auto-creation' facility or even if supported, it may be turned off by the administrator, in which case the application needs to handle those cases to be a provider-independant JMS application.

  • Anyone else having trouble with their iPad disconnecting from wifi since 6.0.1 update

    Anyone else having trouble with their iPad dropping wifi about once a week since 6.0.1 update?

    Some things to try first:
    1. Turn Off your iPad. Then turn Off (disconnect power cord for 30 seconds or longer) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    2. Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    3. Change the channel on your wireless router (Auto or Channel 6 is best). Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    4. Go into your router security settings and change from WEP to WPA with AES.
    5.  Renew IP Address: (especially if you are droping internet connection)
        •    Launch Settings app
        •    Tap on Wi-Fi
        •    Tap on the blue arrow of the Wi-Fi network that you connect to from the list
        •    In the window that opens, tap on the Renew Lease button
    ~~~~~~~~~~~~~~~~~~~~~~~~~
    iOS 6 Wifi Problems/Fixes
    Fix For iOS 6 WiFi Problems?
    http://tabletcrunch.com/2012/09/27/fix-ios-6-wifi-problems/
    Did iOS 6 Screw Your Wi-Fi? Here’s How to Fix It
    http://gizmodo.com/5944761/does-ios-6-have-a-wi+fi-bug
    How To Fix Wi-Fi Connectivity Issue After Upgrading To iOS 6
    http://www.iphonehacks.com/2012/09/fix-wi-fi-connectivity-issue-after-upgrading- to-ios-6.html
    iOS 6 iPad 3 wi-fi "connection fix" for netgear router
    http://www.youtube.com/watch?v=XsWS4ha-dn0
    Apple's iOS 6 Wi-Fi problems
    http://www.zdnet.com/apples-ios-6-wi-fi-problems-linger-on-7000004799/
    ~~~~~~~~~~~~~~~~~~~~~~~
    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    WiFi Connecting/Troubleshooting http://www.apple.com/support/ipad/wifi/
    How to Fix: My iPad Won't Connect to WiFi
    http://ipad.about.com/od/iPad_Troubleshooting/ss/How-To-Fix-My-Ipad-Wont-Connect -To-Wi-Fi.htm
    iOS: Connecting to the Internet http://support.apple.com/kb/HT1695
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Fix Slow WiFi Issue https://discussions.apple.com/thread/2398063?start=60&tstart=0
    How To Fix iPhone, iPad, iPod Touch Wi-Fi Connectivity Issue http://tinyurl.com/7nvxbmz
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • Is anyone else having trouble with Siri calling someone from your Contacts on the Iphone 5?

    Has anyone had trouble with Siri on the Iphone 5 in dealing with your Contacts.  She gives all of the correct information on scores for the NFL but not if I ask her to call somebody in my contacts. She has no trouble with which movies are playing tonight at my local theaters.
    If I ask her to call someone from my Contacts, she takes a very long time and then says something like this, "Uh oh, there's a problem. Can you try again?" or something of this nature.  Any help appreciated.  BTW I download my information from Itunes and also had to change my sim card in order for Verizon to keep my same telephone number.

    I have not had this problem. I am new to Siri (with an iPhone 5 upgrade from an i4) and Siri has made a number of calls from my contacts. She asks, which John Doe (if I have more than one), which number (if I have more than one) and off we go.
    Maybe, you have some setting wrong.

  • Trouble with the hosted website from a page viewer web part. (Sahrepoint 2010)

    Hi everyone,
    I am facing trouble with sharepoint and I would like some help.
    I use Sharepoint 2010 and I have included a page viewer page part in one the pages I 've created that hosts another website. Although most of the functionality of the hosted website is there, some functions of it don't work. These functions are apply buttons
    or downloading documents buttons. My guess is that the web part has to update dynamically and it should be independent from the Sharepoint page.
    Is there a way to do this? It is important that the website is hosted in the since at the same page I have s guide on how to use the hosted website.
    If this can't be done using a page viewer webpart I am open to other suggestions as well.
    Thanks in advance!
    Sakis

    Is it possible that the hosted website page is using HTML5 of other functionality that isn't supported by the IE-8 restriction in the SharePoint master page? We've run into that before, where the page wouldn't work in the page viewer. I also had problems
    where Chrome/Firefox wouldn't display a pager viewer when it crossed hosts/changed protocol.
    What I had to do was add some javascript/Jquery to pop up another window to view the page if I wasn't on IE, getting out of the restriction of the SharePoint master page. If I was in IE the page viewer webpart worked.  Not ideal, but maybe you could
    adapt - they could see your instructions on the page but work with the host page on another.
    <script type="text/javascript" src="/Javascript/JQuery/JQueryMin-1.8.2.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
    var isIE = /*@cc_on!@*/false || document.documentMode;
    if(!isIE) {
    window.open('http://fmgblog/measure/email/dashboard.php');
    }); // end of document ready
    </script>
    Robin

  • How to launch Java WebDynpro From ABAP?

    I have a requirement to launch a Java WebDynpro from ABAP code. Has anyone done this? If so, does anyone know of documentation/sample code or at least an ABAP class/function group I could look at?
    Thanks in advance.

    The webdynpro application can be triggered simply by a URL, so this is really easy in ABAP.
    All you need to know is the URL for the WDJ application running on your java engine.
    report zrich_0001.
    data: url type string.
    url = 'http:\www.sap.com'.
    call method cl_gui_frontend_services=>execute
       EXPORTING
         DOCUMENT               = url.
    Regards,
    Rich Heilman

  • Launch Java App from Windows Desktop

    What's the best way to launch a Java application from a Windows XP desktop without the console showing?

    If your class Main.class is part of a package, you cannot invoke Main directly without providing the package. You may have to include the -classpath option (depending of the working directory). The default value for -classpath is "."
    You should try:
    javaw myPackage.Main
    (if the working directory is parent to directory 'myPackage')
    or
    javaw -classpath .;c:\xxx\xxx\. myPackage.Main
    "c:\xxx\xxx\" is your root package's parent directory. Note that you may have to double quote the specified path.
    For details:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/java.html

  • Launching Java applications from web pages

    Hi there,
    Do you know how to launch Java applications (not applets) from web pages ? Thank you.
    Berk Can Celebisoy

    Do you know how to launch Java applications (not applets) from web pages ? Thank you.
    you can setoff a java servlet from a webpage.Is that what you are talking about ??? activeateing a server side app ????

  • Cloud trouble with downloading Vectorworks file from mail

    I just recently switched to the cloud from mobile me and realized my imac didn't have Lion so I'm having to access email through internet rather than through MAIL.  Before the switch, I could receive Vectorworks files via email and drag to my desktop and then open in that application.  Now, the file comes in as a .vwx but I get the message "There is no application set to open the document"  It then asks if I want to choose an application on my computer but it won't let me choose Vectorworks.  What happened?

    Will it open the file if you launch Vectorworks first (from the Dock or Applications folder), then use the File -> Open command from within program (and select the .vwx file)?
    If you have control over sending the email with .vwx attachment, it may work if it is compressed into a zip file, then attached to the email.  At the receiving end, detach from email and uncompress the file.  On a Mac, compressing can be done with a right (or Control) click on the file in a Finder window, then select the Compress <file name> command.  To uncompress a zip file, just double-click it in a Finder window.

  • Launching Swing GUI from Oracle Forms Web Based

    Hi there,
    I have oracle forms which call a shell script which initiates the java swing gui. I am using host command to run this script. When I am doing it on unix server everything works fine. Now we want same application on web now i am getting problem. The host command is not working in this case. It can not launch the java gui. Can anybody tell me what will be the nice approach to do it.
    Thanks
    Ranjan

    Hi,
    you'll have to create a Java Bean in Forms that calls the runtime. You can also use webutil, available on otn to call a client side host command.
    Frank

  • Launch Java WebDynpro from R/3 with SSO

    Have a situation where I need to launch a Java WebDynpro application from directly from R/3 via the URL. I know this can be done via cl_gui_frontend_services=>execute, however, I do not know the implications in an SSO environment. If the R/3 system issues a logon ticket, does this automatically get passed to the WebDynpro application, or is this more involved?
    Thanks.

    Hi Todd,
    I believe the whole perpose of SSO is to free the user from remembering mutliple userids and passwords.
    Once logged in, I guess you should be able to access URLs cause the system authenticates you in the underlying R/3 system.
    There is some additional config to be done, you can check the following link, I think its what you are looking for.
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/02/4b528f2a8d11d5991f00508b6b8b11/frameset.htm
    Regards,
    Siddhesh

  • Trouble with connecting a gui to a database

    I have been trying to follow the connecting a GUI to a Java DB Database with Netbeans IDE tutorial. But when I try to download the GUI BD Exercise Initial (which it states is needed to complete the tutorial) it does not download it. I have looked in the Projects section but it does not appear but when I try to download it again and again it states that it there.
    Does anybody know of any other site that has a Tutorial that describes the same thing. Or does any body know the procedure needed at this stage onwards to connect the GUI to a database. I have completed all of the other Tutorials successfully and can get my database connected to netbeans and create tables etc. Just can't connect it to a GUI.
    I don't know if there could be a problem because the file is zipped it seems unlikely to me. In any case when I download it nothing shows in the projects section like it should do although I have been able to save it to other parts of my computer hard drive, but when I try to send it the netbeans Myprojects file it is unsuccessful.
    I have the URL of the Tutorial that I have had the trouble downloading the file from. http://www.netbeans.org/kb/55/gui-database.html
    I wonder if any body else has had trouble downloading this link?
    Any way I would really appreciate any feedback on this has anybody else had trouble on this tutorial?

    JDBC Database Access
    http://java.sun.com/docs/books/tutorial/

Maybe you are looking for