• Editor
  • What to do without .jar runtimes?

Now that the runtimes aren't in the updates anymore how can I use the code? I just got spine and since the runtimes aren't there I thought I would just use the code from github. So I copied the src files into my project and a bunch of errors came up (after changing the package name to the new proper package) and quite honestly I don't know what to do here...Like something like this i wouldn't think would come up as an error:

The method add(Color) in the type Color is not applicable for the arguments (float, float, float, float)

I did not edit that part of the code, any suggestions on just getting the old runtimes going?

Related Discussions
...

Same question here :/ I get errors trying to compile from source.

You guys didn't say what runtime you are trying to use.

If Java, you can import spine-libgdx into Eclipse. By default it depends on gdx-backend-lwjgl. To get this, grab libgdx from github and import into Eclipse. Otherwise you can get JARs from the latest libgdx nightly. You can lso copy spine-libgdx source into your project, but you still need the libgdx JARs.

I went for the "clone in windows" option here: https://github.com/EsotericSoftware/spi ... ine-libgdx

then imported the project into eclipse, and had to grab the gdx-backend-lwjgl project from https://github.com/libgdx/libgdx (I ended up cloning the entire libgdx source, was a bit of a wait)

then i imported the related projects into eclipse (I think it was : gdx, gdx-backend-lwgl, gdx-jnigen, gdx-openal)

Once all the errors were gone and i could run tests on the spine-libgdx project, i did file->export-> jar file

Nate escribió

You guys didn't say what runtime you are trying to use.

If Java, you can import spine-libgdx into Eclipse. By default it depends on gdx-backend-lwjgl. To get this, grab libgdx from github and import into Eclipse. Otherwise you can get JARs from the latest libgdx nightly. You can lso copy spine-libgdx source into your project, but you still need the libgdx JARs.

Nate I am trying to use the libgdx runtime. After I import the libgdx project into eclipse and copy those packages into my project, a bunch of errors come up like what I said in my first post. Any suggestions? Or am I doing something wrong?

@wreed12345 could you post the list of errors?

I did have it set up, I am currently using libgdx to make my game. After I imported that project I coppied the two packages into my project like so:
 Loading Image
There currently is an error in the animation class:

The method add(Color) in the type Color is not applicable for the arguments (float, float, float, float)

An error in the skeleton class:

renderer.begin(ShapeType.Filled);

that results in this error: Filled cannot be resolved or is not a field
and also

return bones.first();

comes up with this error: return bones.first();
Next in the skeletonBinary class
"The import com.badlogic.gdx.utils.DataInput cannot be resolved" I have libgdx working so why is this here?

DataInput input = new DataInput(file.read(512));

DataInput cannot be resolved to a type (This error comes up a couple times as a parameter of multiple methods.
And lastly in the SkeletonJson class

if (color != null) slotData.getColor().set(Color.valueOf(color));

The method valueOf(String) is undefined for the type Color

name = (String)map.get("name", name);

The method get(Object) in the type ObjectMap is not applicable for the arguments (String, String)

AttachmentType type = AttachmentType.valueOf((String)map.get("type", AttachmentType.region.name()));

The method get(Object) in the type ObjectMap is not applicable for the arguments (String, String)

Color color = Color.valueOf((String)valueMap.get("color"));

The method valueOf(String) is undefined for the type Color

Any ideas on what to do? I tried updating my libgdx jar but that didn't do anything...Any ideas?

@wreed12345 hmm, i've not tried copying over the packages as you did, mainly because I haven't been able to sort out the java build paths afterwards(which is what looks to be the cause of the errors in your case, though i may be wrong). Maybe someone who's better versed in how java works could help you with this method?

Like I mentioned in my earlier reply, i've imported spine-libgdx into it's own project, and basically dealt with the build path errors (which were mainly with it requiring libgdx lwgl backend) by syncing down libgdx's source and importing those projects as well, then exporting a jar.

I have it imported as its own project, but how then do I use the code in one project in another project?

Also, with the spine-libgdx project i synced down from git, the tests in the project worked (after changing the string names of the files it was trying to read, as they were still in the old format when i had synced it down)

So I'm thinking that this is not an error with spine-libgdx.

@[borrado]

If there are no errors with the project, export it as a jar
File -> Export , under Java you should see the jar option.

Edit: choose JAR file. Also add it to your build path. I have a libs folder in my personal project where i put jars, and then I add them by going into my project properties.

After importing the project there is an exclamation point on the project folder, does that mean an error?

also why is it that the jar runtimes are no longer in that runtime folder

Yes, if you check out the errors pane, I'm guessing it will be requiring a certain project along the lines of gdx-backend-lwgl or something like that.

I was in a bit of a hurry when i did this, and I may have messed it up, but when i tried just putting the jars in a folder and adding them to the build path of spine-libgdx i couldn't get it to work, so i ended up syncing the libgdx source off here: https://github.com/libgdx/libgdx

which i then imported all the required projects as stated in my earlier reply. That fixed it.

wreed12345 escribió

also why is it that the jar runtimes are no longer in that runtime folder

The answer's here:
viewtopic.php?f=3&t=330

If there's an exclamation point, check the build path of the project. You can find some problems there (maybe a lib that is missing, like gdx-natives.jar in gdx project).

Well I have eliminated that exclamation point by importing the libgdx master and all that fun stuff - but now there are only two errors:
Animation.java

color.add((r - color.r) * alpha, (g - color.g) * alpha, (b - color.b) * alpha, (a - color.a) * alpha);

The method add(Color) in the type Color is not applicable for the arguments (float, float, float, float)
and also skeleton.java

renderer.begin(ShapeType.Filled);

Filled cannot be resolved or is not a field