Originally posted by TARagsdale
View Post
Announcement
Collapse
No announcement yet.
How to setup WWJ
Collapse
This is a sticky topic.
X
X
-
Unregistered
-
Solaris 9/Sparc
Our application currently runs on Solaris 9/Sparc. In particular, we are using a Rave workstation (SX2500) card with a XVR-600 graphics card.
Your post indicates that WWJ uses DXTn and that it's not likely available on any Sun 3D video cards.
What sort of WWJ features would not be available if I tried to use it on Solaris 9 with the XVR-600 card?
Thanks,
Selma
Comment
-
Unregistered
Hi, I used your instructions to run the demos on Eclipse, and some of then just don't work...
For example, I used all of your instructions to run HelloWorldWind.java and runs fine, then I tried to run Mars.java and had no luck...Tried to run GPSTracker and it worked again.
Am I doing something wrong?
I'm having the same problems using the command line ...
I also cant make the tutorials work...
I'm using the latest java version (1.6) with the latest sdk (0.6) and windows 7
Thanks in advance
Comment
-
Just tried getting the samples to run. No luck. I running Ubuntu 9.10.
james@ubuntu:~$ java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.6.1) (6b16-1.6.1-3ubuntu1)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)
When i try to execute the sample from the first page of this post I get:
james@ubuntu:~/Downloads/WWJ/src$ java -Xmx512m -cp worldwind.jar:gluegen-rt.jar:jogl.jar gov.nasa.worldwind.examples.HelloWorldWi nd
Exception in thread "main" java.lang.NoClassDefFoundError: gov/nasa/worldwind/examples/HelloWorldWind
Caused by: java.lang.ClassNotFoundException: gov.nasa.worldwind.examples.HelloWorldWi nd
at java.net.URLClassLoader$1.run(URLClassLo ader.java:217)
at java.security.AccessController.doPrivile ged(Native Method)
at java.net.URLClassLoader.findClass(URLCla ssLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoa der.java:319)
at sun.misc.Launcher$AppClassLoader.loadCla ss(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoa der.java:264)
at java.lang.ClassLoader.loadClassInternal( ClassLoader.java:332)
Could not find the main class: gov.nasa.worldwind.examples.HelloWorldWi nd. Program will exit.
I also couldn't figure out the Eclipse setup either. I'm not exactly sure what I need there. I tried downloading the Eclipe IDE from the Ubuntu Repos, but apparently it doesn't come with the Java development environment. I also tried downloading the java IDE directly from eclipse.org, extracted into a clean directory, and it would not start.
Any help on either of these problems would be appreciated.
Thanks,
James
Comment
-
Do a search for "Ubuntu". There are several threads on this.
At the command line in Ubuntu type: java -version
That will tell if java is installed correctly and the version.
See if the WWJ demos will work in Ubuntu.
http://worldwind.arc.nasa.gov/java/demos/
Do a search on the net for "Ubuntu 9.10 install Eclipse"
I found some very good links that explain this and checking/installing java if necessary.
Setting the paths in Eclipse for WWJ is important, follow what the threads recommend.
I have my WWJ cache on C: and can use that when running in Ubuntu, just a matter of changing the cache path in the .xml.
If you have Win XP it may be easier to use Eclipse there first. You can then just copy your workspace to Ubuntu and it will work after changing the paths.
Good luck, it runs great in Ubuntu.
edit: To be more specific to your question and regarding setting paths I booted into Ubuntu and here is an image of my paths. Where I have ww380 yours will be worldwind unless you renamed things. Most of the items you can click edit then just choose workspace and it will set it for you. The JRE should be picked up by Eclipse so nothing needs to be done there unless you want to change the JRE.
http://www.nlneilson.com/wwposts/UbuntuPaths.pngLast edited by nlneilson; 02-25-2010, 10:29 AM.
Comment
-
Here is the java output:
james@ubuntu:~$ java -version
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.6.1) (6b16-1.6.1-3ubuntu1)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)
The demos on the demo page all seem to work fine.
I tried running several of the included .java examples from the command line, and they all have similar failure as show above. Does this work for anyone using Ubuntu? Any ideas on what the problem could be?
I'll do a little more reading on Eclipse.
Thanks,
James
Comment
-
Originally posted by James_In_Utah View PostThe demos on the demo page all seem to work fine.
I never could get the examples to run from the command line as from post #1 either.
The examples are .java files, not executable .jar files
If they were you could try java -jar <name>.jar
Get the Examples to run in Eclipse first, there are extra problems running from the command line in Linux.
java -version shows OpenJDK "1.6.0_0"
That is OK, I have used OpenJDK and Sun's JDK.
I had a few glitches with OpenJDK a year ago but it worked, I use Sun's.
Leave that for now.
Look near the bottom of the image I had a link to.
JRE System Library [ .... ] should refer the OpenJDK instead of sun as well as all the data below that. If not tinker with that. There is an option in the Eclipse properties that will show what java versions are installed and you can choose, AFAIK, it's been awhile since I did this. Google "Ubuntu Eclipse set java".
Try Project->Clean
Sometimes that will straighten things out. Remember this, it could save hours sometimes.
"Exception in thread "main" java.lang.NoClassDefFoundError: gov/nasa/worldwind/examples/HelloWorldWind"
That one is hard to figure out sometimes, it's not specific as to which Class is the problem. If a pop up says "There are errors, do you want to continue" or something similar click yes. If there are errors that don't effect the code you are running it's OK. It took NetBeans a few years before they had that.
At the bottom of the Eclipse IDE there is a tab "Problems". Clicking on that will often show an error that is causing a problem.
Many of the threads re Ubuntu or Linux can give better answers than I can remember.Last edited by nlneilson; 02-25-2010, 05:35 PM.
Comment
-
I'm getting the same error on my XP development machine at work for the command line examples. Java version shows 1.6.0_13, Java SE Runtime Environment, Java Hotspot Client. When I try the command line execution of the example for Windows on the first post, I get the same error. "Could not find the main class: Helloworldwind. Program will exit". I've checked the code, and that is the name of the file, and the name of the main class. Not sure what I'm doing wrong. I even tried copying that file to the main worldwind directory, and still get the same error. Any help would be appreciated!
Thanks,
James
Comment
-
As I mentioned before: A .java file is NOT an executable ".jar" file nor is it a compiled "Class" file.
http://java.sun.com/docs/books/tutor...ava/win32.html
Double click the worldwind.jar file on Win (there are other problems doing this on Linux).
It should run.
You can run a .jar file (not .java) from the command line or a batch (.bat) file like this:
java -jar -Dsun.java2d.noddraw=true -Xmx512m worldwind.jar
You need to include the path to that .jar file unless you are in that directory.
Get something to run in the Eclipse IDE first.
In WW.net you cannot run a .cs file file from the command line.
It needs to be compiled first.
Try running an example in the Eclipse IDE and post the errors.
edit: I think it would be a good idea for one of the devs to try the example in post #1.
Then either modify it or say "ant build" is required or whatever, it seems to be very misleading.
Comment
-
Not working from the command line seems correct for the reasons I mentioned.
What errors, Problems are shown when running in the Eclipse IDE?
Don't be concerned with warnings for now?
Check your src path.
http://www.nlneilson.com/wwposts/Path_src.jpg
Yours should be worldwind/srcLast edited by nlneilson; 02-26-2010, 02:04 AM.
Comment
-
When you get this set up the first time, you don't need to do it again, unless you want to.
Just copy that to another directory, rename it, then cut and paste it back into the directory you have your workspace/s.
Then just paste an update .src into that. Create a package under src for your data, that way it will not be written over when you update.
First time is a bit of a problem, not nearly as bad as NetBeans.
Don't waste your time on the command line until you have something compiled.
edit: You can also jut copy that into Linux if you are using the same Java, Sun or OpenLast edited by nlneilson; 02-26-2010, 04:04 AM.
Comment
-
James: My guess was correct in post #40
I refactored/renamed one of my workspaces from ww393 to worldwind.
If you have ant installed cd to ... \worldwind\
type ant then enter, by default it will use build.xml
This will compile the classes.
Code:C:\NeilsonDev\WW393\worldwind>ant Buildfile: build.xml compile: [mkdir] Created dir: C:\NeilsonDev\WW393\worldwind\classes
It does not now. Tinkering with the "Hello" example on the command never would have worked.
The devs don't always inform us of these changes nor corrects a thread, wiki or whatever that is broken.
Comment
-
What is "ant" and where do you get it?
In Eclipes, I have 8 errors. The first seems to be related to not being able to:
import netscape.javascript.JSObject;
Any suggestions on fixing that would be great!
Thanks,
James
Found from previous posts that I need to add the plugin.jar from Java. Did that. Now my error count jumped from 8 to 8621. Going the wrong direction here. Anyway, the first error is in ViewInputAttributes.java and is complaining about not knowing what ActionTrigger is.Last edited by James_In_Utah; 03-02-2010, 12:25 AM.
Comment
Comment