World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Development Help

Development Help Help for building applications or diagnosing problems with WWJ

Reply
 
Thread Tools Display Modes
Old 10-28-2009, 09:03 PM   #1
kluhm
Junior Member
 
Join Date: Oct 2009
Posts: 10
kluhm is on a distinguished road
Default Launching WWJ from MATLAB

Question from a WWJ newbie.

I would like to run a WWJ application from MATLAB, as the data I am displaying is being generated through MATLAB and is part of a larger simulation. MATLAB does have the ability to run certain types of MATLAB code. I am coding in Eclipse.

I have written some classes will be using to format data that I generate from MATLAB. In this same Eclipse project, I have copied the Application Template class (for ease of calling it from MATLAB) and added one additional overloaded method:

Code:
    public static void start()
    {
       ApplicationTemplate.start("World Wind Application", AppFrame.class);
    }
because MATLAB will not allow calling from inner classes.

In my MATLAB class, I add the necessary imports, and then use the function call:

Code:
ApplicationTemplate.start();
I get a globe window that looks like it should, but the second I move my mouse to within the globe window (the side panel doesn't seem to matter) the blue marble disappears, and I am left with the atmosphere ring. Also, closing out of the Java window forces MATLAB to quit as well.

Is this look like an import problem, or is something more nuanced going on here?
kluhm is offline   Reply With Quote
Old 10-29-2009, 04:06 PM   #2
bhughes
Member
 
Join Date: Nov 2007
Posts: 48
bhughes is on a distinguished road
Default

Hello,

I'm assuming you dropped the jogl.dll, jog_awt.dll, and gluegen-rt.dll into the Matlab sys\java\jre\bin directory (or pointed the MATLAB_JAVA system variable to the java version with these dlls). If this is all correct try using MATLAB version 2007b or 2008a. My World Wind application worked fine with these versions of MATLAB. However since 2008b the fine people at Mathworks changed something and so with MATLAB 2008b, 2009a, and 2009b my World Wind application no longer works. I’ve queried Mathworks as to what they changed, but nobody responded.

Also if you set your frame's default close behavior to EXIT_ON_CLOSE, MATLAB will close too. So you have to set the default behavior to DISPOSE.

Last edited by bhughes; 10-29-2009 at 04:09 PM.
bhughes is offline   Reply With Quote
Old 11-23-2009, 04:40 AM   #3
bhughes
Member
 
Join Date: Nov 2007
Posts: 48
bhughes is on a distinguished road
Default

Actually my response was not fully correct. WWJ does work with MATLAB 2009b (in addition to MATLAB 2007b and 2008a). But WWJ will not run on MATLAB 2008b or MATLAB 2009a. So if you're using either one of those two MATLAB versions, you won't have any fun at all.
bhughes is offline   Reply With Quote
Reply

Tags
matlab


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to setup WWJ Hervé Development Help 96 03-04-2013 03:42 PM
WWJ and Platform-dependence smcnaughton Development Help 31 11-11-2009 01:09 PM
WW(J) and Python - some questions GIS_Jon Development Help 0 06-03-2009 08:25 PM
WW(J) and Python - some questions GIS_Jon WorldWind General 0 06-02-2009 02:50 PM
SurfaceShapes are not translucent in WWJ 0.5 vash Development Help 0 05-07-2008 02:05 PM


All times are GMT +1. The time now is 07:25 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.