Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

class file has wrong version 55.0, should be 52.0 #96

Closed
samuellim18 opened this issue May 30, 2020 · 7 comments
Closed

class file has wrong version 55.0, should be 52.0 #96

samuellim18 opened this issue May 30, 2020 · 7 comments

Comments

@samuellim18
Copy link

samuellim18 commented May 30, 2020

Hi,
I have the following error when running the demo in intellij:
Error:(1, 26) java: cannot access eu.hansolo.tilesfx.Tile
bad class file: /C:/Users/Sam Lim/Downloads/jar_files/tilesfx-11.36.jar!/eu/hansolo/tilesfx/Tile.class
class file has wrong version 55.0, should be 52.0
Please remove or make sure it appears in the correct subdirectory of the classpath.

is there a fix for this?

EDIT:

I was also wondering if the tiles can be dragged around to rearrange when running ?

@HanSolo
Copy link
Owner

HanSolo commented May 30, 2020

Could you please provide a code snippet that shows the problem? Make sure you use Java 11 or higher when using TilesFX. I just made a quick test and it works perfectly fine, you can check by simply execute "gradlew Demo" on the command line. And of course make sure you use at least Java 11.
TilesFX just provide the tiles and a layout container to create dashboards. If you would like to drag tiles around you sure can do that but that has to be managed by you, each tile is just a simple JavaFX controls like every button etc. So if you would like to drag controls around in your app you have to take care about that on your own.

@samuellim18
Copy link
Author

samuellim18 commented May 30, 2020

Hi, thanks for the quick reply, I tried to use Java 11, but I has a similar issue to the one here:
#80

Should i use the versions you mentioned in the linked post? I downloaded my Java 11 from oracle, changed all my Javac and JDK to Java 11, and added JavaFX 11 (from the JavaFx website) as a library so I'm not sure if that is an issue.

EDIT:
I am using Intellij IDEA

@HanSolo
Copy link
Owner

HanSolo commented May 30, 2020

Hmm...so I use AdoptOpenJDK and add JavaFX from the Gluon page as described on their website. This works on my Mac, Windows 10 and Linux Ubuntu 18.04 machine. I also use IntelliJ to develop TilesFX so I can assure it works fine with this combinations.

@samuellim18
Copy link
Author

samuellim18 commented May 30, 2020

Ok, I will have a look at that. It might be a program setting on my end so I will look into it, as I don't think anyone else had this issue. Sorry for the trouble and thank you for developing this.

Edit:

I managed to get it to work now. I think the issue was because I downloaded the jar files for all the components and imported them as external libs as intellij has red lines everywhere when I first opened the demo. Then, I realized there were the medusa and tilesFX jar files in the libs folder, where I then added as depencies (aka external libs) and now it works fine. The issue was with the version difference of tilesfx-1.6.8/Medusa-8.3 (found in demo) and tilesfx-11.36/Medusa-11.5 (downloaded from the internet) .

They all run fine on java 1.8 and language level 8 now. Not sure why 😅

@HanSolo
Copy link
Owner

HanSolo commented May 30, 2020

Well TilesFX version above 11 won’t run on JDK8 do it looks like you have the old stuff sitting around somewhere in IntelliJ...

@samuellim18
Copy link
Author

My apologies, I was using the demo from https://github.com/HanSolo/tilesfxdemo which I think is the outdated version that works with Java 8 as I stumbled across an old post in your blog. You can close this issue for now since everything is working at the moment.

@HanSolo
Copy link
Owner

HanSolo commented May 30, 2020

Ah ok...that explains it, no problem. Glad it works for you 👍🏻

@HanSolo HanSolo closed this as completed May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants