Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3508 Members - Latest Member: NevilleKemp

26. May 2012, 02:29:29 pm
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)Problem compiling
Pages: [1] 2
Print
Author Topic: Problem compiling  (Read 3285 times)
bert
Just dropped in

Offline Offline

Posts: 3


View Profile Email
« on: 13. February 2007, 09:06:20 pm »

Hello, I'm new to Xith. I've been doing 2D game programming for a while now and I think it's time for me to "level up". I really like the features of Xith and I'd like to learn it. However, I am currently having some problems:

Every time I try to the HelloXith3D example, I get the following message:

C:\Xith\gsg>javac HelloXith3D.java -classpath .;hial.jar;xith3d.jar;xith-demos.j
ar;xith-tk.jar
HelloXith3D.java:36: cannot access com.xith3d.scenegraph.VirtualUniverse
bad class file: xith3d.jar(com/xith3d/scenegraph/VirtualUniverse.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the classpa
th.
                VirtualUniverse universe = new VirtualUniverse();
                ^
1 error


If somebody would like to help me out that would be greatSmiley
Logged
'n ddrylliog
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #1 on: 13. February 2007, 09:09:09 pm »

Hi bert and welcome to Xith3D !

Could you tell me which release of Xith3D you're using ? If you're not using the latest 0.9.0-beta2, please use the .jar(s) contained in this release and report if it works.
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #2 on: 13. February 2007, 09:19:28 pm »

Hi, bert. And welcome to Xtih3D Smiley.

Where did you get the gsg from? It shouldn't be available from xith.org anymore. It is way outdated. For a good and recent docu, please have a look at "Xith3D in a Nutshell". It is also included in the latest 0.9.0-beta2 release.

I would advise you to use the current SVN trunk version. Or the SVN branch for 0.9.0, since there are some bugs in the latest beta2, that are already fixed in SVN and will be in the next release, which is coming these days.

Marvin
Logged
bert
Just dropped in

Offline Offline

Posts: 3


View Profile Email
« Reply #3 on: 15. February 2007, 01:50:03 am »

I'm using the 0.8.0 release with hial.jar, xith3d.jar, xith-demos.jar, and xith-tk.jar copied into my project directory.
The gsg did not come with the release; I went to the Getting Started Guide and copied most of the source code into a directory that I created and called 'gsg'. Sorry if that confused anyone...  Embarrassed
I also do have the "Xith3D in a Nutshell" guide. I'll try some of those examples as soon as I can.
Tanx for the help!
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #4 on: 15. February 2007, 02:06:28 am »

I'm using the 0.8.0 release with hial.jar, xith3d.jar, xith-demos.jar, and xith-tk.jar copied into my project directory.
The gsg did not come with the release; I went to the Getting Started Guide and copied most of the source code into a directory that I created and called 'gsg'. Sorry if that confused anyone...  Embarrassed

Please don't use 0.8.0 anymore. It is outdated. Use either 0.9.0-beta2 or even better the SVN trunk.

I also do have the "Xith3D in a Nutshell" guide. I'll try some of those examples as soon as I can.

You will be very confused when trying to use "Xith3D in a Nutshell" with 0.8.0. It depends on the 0.9.0 branch. You really should use a more recent version.

Marvin
Logged
bert
Just dropped in

Offline Offline

Posts: 3


View Profile Email
« Reply #5 on: 15. February 2007, 05:26:42 pm »

Thanks--I have dialup and it takes forever to download anything worth having. I'll download the latest tonight.
Logged
'n ddrylliog
Guru
*****
Offline Offline

Posts: 1188



View Profile WWW Email
« Reply #6 on: 16. February 2007, 01:10:00 pm »

Thanks--I have dialup and it takes forever to download anything worth having. I'll download the latest tonight.
Ah.. nostalgic times of 56K connection.
Logged
oliver1974
Just dropped in

Offline Offline

Posts: 21


View Profile
« Reply #7 on: 18. February 2007, 10:24:16 pm »

Well, time for me to jump in... I've got compile
problems too...

First and foremost.. I'm somewhat confused by the site
http://www.xith.org/pages/installing_xith3d.html
is it still valid?

Which version should i use, the one mentioned there or
the svn trunk?

For the svn trunk: I'm missing a docu how to retrieve
and to build the whole xith-stuff involving svn and ant...

Well, it wasn't such a problem to get the svn link via forum-search,
but isn't there a documentation missing for folks like me who wanted to
get the svn branch version and to build it? (Maybe i'm to blind and it is
there...somewhere?)

So, i've been able to check out xith3d and xith-tk, no problem.. but
how do i build the stuff? just calling "ant" gives me dozens of
"cannot find symbol" errors:

Just an example:
    [javac] import javax.vecmath.Vector3f;
    [javac]                     ^
    [javac] /home/oliver/InternetFiles/Programmierung/Java/XITH3D_CVS/0.9.0/src/org/xith3d/spatial/SpatialObjectInterface.java:36: package javax.vecmath does not exist
    [javac] import javax.vecmath.Tuple3f;
    [javac]                     ^
    [javac] /home/oliver/InternetFiles/Programmierung/Java/XITH3D_CVS/0.9.0/src/org/xith3d/scenegraph/GeomDataInterface.java:38: package javax.vecmath does not exist

I guess this is a classpath problem?


Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #8 on: 18. February 2007, 11:02:19 pm »

First and foremost.. I'm somewhat confused by the site
http://www.xith.org/pages/installing_xith3d.html
is it still valid?

No, it is not. When Amos or I have time, we will modify it.

Which version should i use, the one mentioned there or
the svn trunk?

Please use the SVN trunk (as you're doing).

For the svn trunk: I'm missing a docu how to retrieve
and to build the whole xith-stuff involving svn and ant...

Well, it wasn't such a problem to get the svn link via forum-search,
but isn't there a documentation missing for folks like me who wanted to
get the svn branch version and to build it? (Maybe i'm to blind and it is
there...somewhere?)

So, i've been able to check out xith3d and xith-tk, no problem.. but
how do i build the stuff? just calling "ant" gives me dozens of
"cannot find symbol" errors:

...

I think, cylab is currently working on the build files. But I cannot tell you, how far he is.

Aren't you using Eclipse? You could simply checkout the project with Subclipse (SVN Eclipse plugin) and it will be compiled automagically. The Project files are correctly setup for Linux. You seem to be using Linux, so you would have any problems.

Please follow these instructions to install Subclipse and checkout the projects.

If it does not help, please ask again.

Marvin
Logged
oliver1974
Just dropped in

Offline Offline

Posts: 21


View Profile
« Reply #9 on: 19. February 2007, 12:39:07 am »

No, it is not. When Amos or I have time, we will modify it.

Oh, sorry... didn't meant to look like someone who just is whining
about some missing sites/docus on an otherwise promising looking
open source project... i was just wondering if i've overlooked
the needed info... :-D



Quote
Aren't you using Eclipse? You could simply checkout the project with Subclipse (SVN Eclipse plugin) and it will be compiled automagically. The Project files are correctly setup for Linux. You seem to be using Linux, so you would have any problems.

Well, in case we're using Xith3d here for our little project (just for fun..)
i know of some project members which prefer Netbeans....

And it SHOULD work in Ant! (Yes, im stubborn..)

Well, there's something weird in build.xml in line 28:
<pathelement location="third-party/vecmath/vecmath-kh.jar"/>

The third-party tools just have "vecmath.jar"...

If i correct this in line 28, ant doesn't complain
about a missing javax.vecmath anymore, but i get a bunch
of other errors...

I won't go in to much detail here, but it looks like
xith is meant for work with a vecmath.jar which is NOT
in third-party tools... Because if i download the vecmath.jar
of the more actual 1.5er Java3D - API, the number of errors
reduces significantly.. (but not to 0, there are some other (new)
errors...)

So, WHERE is this vecmath.jar which is meant for xith? It's not
the vecmath.jar which i can download here:
http://xith.org/download/third-party.tar.gz

and not this one:
http://java.sun.com/products/java-media/3D/downloads/index.html

because i get build errors with both versions...

Well, i'll have to check the whole stuff with Eclipse, i think....
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #10 on: 19. February 2007, 01:12:57 am »

Oh, sorry... didn't meant to look like someone who just is whining
about some missing sites/docus on an otherwise promising looking
open source project... i was just wondering if i've overlooked
the needed info... :-D

Hey, no problem. This site is irritating. And if you wouldn't ask, where should you know from?

Well, in case we're using Xith3d here for our little project (just for fun..)
i know of some project members which prefer Netbeans....

And it SHOULD work in Ant! (Yes, im stubborn..)

Xith3D works with both Eclipse and NetBeans. There should be valid "nbproject" folders (thanks cylab). And I know of some people, who successfully used ant to compile the stuff. But since I don't know ant very well and I simply can't understand why one would ever use ant when there is a good IDE, which builds all automagically, I cannot tell you, what to do with the ant stuff. But there are people on this board, who know. Let's wait for them, if you want to use ant.

Don't get me wrong. If you have fun with ant, it's cool for me. But I think you got my point.

Well, there's something weird in build.xml in line 28:
<pathelement location="third-party/vecmath/vecmath-kh.jar"/>

The third-party tools just have "vecmath.jar"...

If i correct this in line 28, ant doesn't complain
about a missing javax.vecmath anymore, but i get a bunch
of other errors...

Hmmm... looking into that file, I can't even find any third-party occurrence. Are you sure, you checked out the HEAD revision?

I won't go in to much detail here, but it looks like
xith is meant for work with a vecmath.jar which is NOT
in third-party tools... Because if i download the vecmath.jar
of the more actual 1.5er Java3D - API, the number of errors
reduces significantly.. (but not to 0, there are some other (new)
errors...)

So, WHERE is this vecmath.jar which is meant for xith? It's not
the vecmath.jar which i can download here:
http://xith.org/download/third-party.tar.gz

and not this one:
http://java.sun.com/products/java-media/3D/downloads/index.html

because i get build errors with both versions...

There should be no vecmath.jar, nor vecmath-kh.jar at all in the SVN trunk. We used vecmath.jar several months ago. Then migrated to vecmath-kh.jar, which is now part of openmali.jar. You should find the openmali.jar in the third-party/math folder in the xith3d project. So openmali.jar must be in your cp. Sun's vecmath.jar MUST NOT be in the classpath in any way. So not in your user defined cp and not in the JRE lib folder or anwhere else. Please make sure, that this is the case, or you will get strange build errors.

I hope, I could help you with this.

Well, i'll have to check the whole stuff with Eclipse, i think....

This is certainly the best idea to quickly reach the goal Smiley.

Marvin
« Last Edit: 19. February 2007, 01:17:36 am by Marvin Fröhlich » Logged
oliver1974
Just dropped in

Offline Offline

Posts: 21


View Profile
« Reply #11 on: 19. February 2007, 07:32:54 am »

Quote
Don't get me wrong. If you have fun with ant, it's cool for me. But I think you got my point.

Yes, no problem. I personally like to get things working on "low level", without
being dependant on an IDE... ;-)

Quote
Hmmm... looking into that file, I can't even find any third-party occurrence. Are you sure, you checked out the HEAD revision?

I'll check this.

Quote
There should be no vecmath.jar, nor vecmath-kh.jar at all in the SVN trunk. We used vecmath.jar several months ago. Then migrated to vecmath-kh.jar, which is now part of openmali.jar. You should find the openmali.jar in the third-party/math folder in the xith3d project. So openmali.jar must be in your cp. Sun's vecmath.jar MUST NOT be in the classpath in any way. So not in your user defined cp and not in the JRE lib folder or anwhere else. Please make sure, that this is the case, or you will get strange build errors.

Aaaah, this explains A LOT!! Funny, both vecmath libraries seem to be
quite similar (the one Java3d 1.5 more than that of Java 1.3, compared
to the one out of openmali.kar)... Is this a fork?

I'll check the svn stuff and then i'll post the results!

Thanks!
Logged
horati
Global Moderator
Getting respectable
*****
Offline Offline

Posts: 393


View Profile
« Reply #12 on: 19. February 2007, 11:42:43 am »

But since I don't know ant very well and I simply can't understand why one would ever use ant when there is a good IDE, which builds all automagically, I cannot tell you, what to do with the ant stuff. But there are people on this board, who know. Let's wait for them, if you want to use ant.

Actually Marvin, there are quite a number of good reasons to use Ant for "production" builds over an IDE build.  The most compelling reasons are:
  • It allows us to use really good tools such as Maven.  Maven is an O/S tool that will perform automated builds on a scheduled and/or ad hoc basis.  It can perform a checkout from CVS or SVN with logic to get the correct revision, then perform the build, run the unit tests, send e-mails and/or post html reports of the results to a web site.  As it does the builds, it knows how to place version tags.  You can also schedule it to post the nightly build to SF.
  • Ant builds are the most repeatable builds because they depend list on your personal system configuration
  • While I love Eclipse to the point I don't see why anyone would be stubborn enough to use Netbeans (sorry Oliver), using Ant keeps us from forcing a tool on anyone.

Obviously, Maven (and tools like it) is the most important reason to use Ant.  Scheduled builds, including unit tests and all the other logic you can possibly script, on a QA build machine is huge.

Yes, no problem. I personally like to get things working on "low level", without being dependant on an IDE... ;-)

Unless you want to do it yourself, that kind of argument won't get you very far around here.  It's best to have concrete reasons such as the ones I supplied for you Wink  I've been using Ant for 5 or 6 years now but won't have time to put together a build script any better than clicking on Eclipse's make Ant script button for a few months.
Logged

Kevin
"It may not seem like a big deal, but ignorance of character encoding issues leads to insidious code rot akin to y2k."
http://stackoverflow.com/users/3474/sylvarking
oliver1974
Just dropped in

Offline Offline

Posts: 21


View Profile
« Reply #13 on: 19. February 2007, 01:35:40 pm »

Quote
It's best to have concrete reasons such as the ones I supplied for you

The reasons ARE good, no doubt about it..  Wink

It has been just my feeling that tells me: "Don't get too IDE-dependant..."..
never liked that!

Quote
While I love Eclipse to the point I don't see why anyone would be stubborn enough to use Netbeans (sorry Oliver)

Ahhh, yes, the old Eclipse vs Netbeans war! I'm an Eclipse guy too, but if someone
in my "team" likes Netbeans, i don't want to have to argue about that.. As long
as we use the same style for code formatting, docu and so on i don't care,
get happy with whatever you like!  Smiley

Quote
..., using Ant keeps us from forcing a tool on anyone.
THAT's my point too! It's somewhat.. mmmmh... problematical to force a
tool just because the whole build is centered around it, if there's something
like a standard tool which allows us to avoid this.
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #14 on: 19. February 2007, 03:17:47 pm »

Agreed with everything, espeacially your good reasons, horati.

But the situations around my ANT knowledge is the same: I don't know it good enough the create a good build.xml. And cylab is working on it, if I remember right. So all we have to do is to wait for his results. Or if you'Re willing to commit a better ant build file (build.xml), you're welcome to do Wink.

Marvin
Logged
Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic