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

When i add JMetro lib to project - application return me exceptions. #27

Closed
MairwunNx opened this issue Dec 25, 2018 · 10 comments
Closed
Labels

Comments

@MairwunNx
Copy link
Contributor

Describe the bug

  • Just. When i add your library to my project, my application is crash.

Steps to add library to project

  1. Add your library file to project folder "lib".
  2. Project Structure > Libraries > Add to classes your library.
  3. Project Structure > Artifacts > Add copy of "Extracted Library" your library.

Materials

capture20181225185553811

Additional information

  • It not only with TextField skin, it with anyway controls. See full StackTrace.

Environment information

  • JMetro version: [5.0.0]
  • System: [Windows 10 1803 x64]
  • Java Runtime Environment: [1.8.0_171] and [10.0.2]
  • JavaFx GUI framework: [TornadoFx]
@MairwunNx MairwunNx changed the title When i add JMetro lib to project. Application return me exceptions. When i add JMetro lib to project - application return me exceptions. Dec 25, 2018
@dukke
Copy link
Member

dukke commented Dec 25, 2018

Hi again Pavel,

It''s probably because you're not using a compatible Java version. JMetro is meant for Java 8 and below only. You mentioned also using java 10 (didn't really understand exactly which java version you're using)?

Skins have changed place in JavaFX 9 and above, so a Class not found exception would happen in this case.

Cheers,

@MairwunNx
Copy link
Contributor Author

Hi again @dukke,

Default i run with Java 10, but i create cmd file with path to Java 8 and run with Java 8, but, application also crash. It maybe because i have JDK 10 and JDK 8. But compile with JDK8. I don't know, good luck with fixing it :)

@dukke
Copy link
Member

dukke commented Dec 25, 2018

What I'm saying is that this probably isn't a JMetro issue but rather an issue with the fact you're using a version of Java greater or equal than Java 9, in this case you're using Java 10.

You need to compile and run with Java 8 or below.

The skins have changed packages between Java 8 and Java 10, so you'll get this Class not found exception. This will happen with JMetro or any JavaFX library that is made for Java 8 and makes use of skins in "com.sun.javafx.." package.

In the future I'll most probably migrate JMetro to Java 11. Right now, unfortunately, I don't have the resources (time, etc) to maintain two separate versions of JMetro for java 8 and for java9+. Java 8 is still by far the most used version of Java, so for the recent future I plan to stick with it.

I'll close this issue for now as won't fix. The problem is probably the fact you're using two versions of java at the same time. Try to use Java 8 only and tell me how it goes.

Thanks Pavel :)

@dukke dukke closed this as completed Dec 25, 2018
@dukke dukke added the wontfix label Dec 25, 2018
@MairwunNx
Copy link
Contributor Author

No problem @dukke :) Thanks for attention! 👍

@dukke
Copy link
Member

dukke commented Dec 26, 2018 via email

@MairwunNx
Copy link
Contributor Author

@dukke not, currently my application crash if i add your library. But without library also work :D

@dukke
Copy link
Member

dukke commented Dec 26, 2018 via email

@MairwunNx
Copy link
Contributor Author

@dukke i compile project with Java 8, because TornadoFx support only Java 8 as your library. I run with Java 8 and 10. See video please:)

https://www.youtube.com/watch?v=41iTYfNcz9c&feature=youtu.be

@dukke
Copy link
Member

dukke commented Dec 26, 2018 via email

@MairwunNx
Copy link
Contributor Author

MairwunNx commented Dec 26, 2018

@dukke yes.

java.lang.NullPointerException
	at com.sun.javafx.scene.control.skin.TextFieldSkin.lambda$new$199(TextFieldSkin.java:251)
	at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:349)
	at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
	at javafx.beans.property.ObjectPropertyBase.fireValueChangedEvent(ObjectPropertyBase.java:105)
	at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:112)
	at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:146)
	at javafx.css.StyleableObjectProperty.set(StyleableObjectProperty.java:82)
	at javafx.scene.control.TextInputControl$3.set(TextInputControl.java:228)
	at javafx.scene.control.TextInputControl$3.set(TextInputControl.java:197)
	at javafx.css.StyleableObjectProperty.applyStyle(StyleableObjectProperty.java:68)
	at javafx.scene.control.TextInputControl$3.applyStyle(TextInputControl.java:212)
	at javafx.scene.control.TextInputControl$3.applyStyle(TextInputControl.java:197)
	at javafx.scene.CssStyleHelper.transitionToState(CssStyleHelper.java:774)
	at javafx.scene.Node.impl_processCSS(Node.java:9189)
	at javafx.scene.Parent.impl_processCSS(Parent.java:1249)
	at javafx.scene.control.Control.impl_processCSS(Control.java:868)
	at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
	at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
	at javafx.scene.Parent.impl_processCSS(Parent.java:1280)
	at javafx.scene.Node.processCSS(Node.java:9056)
	at javafx.scene.Scene.doCSSPass(Scene.java:545)
	at javafx.scene.Scene.access$3600(Scene.java:159)
	at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2392)
	at com.sun.javafx.tk.Toolkit.lambda$runPulse$29(Toolkit.java:398)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:397)
	at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:424)
	at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:518)
	at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:498)
	at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:491)
	at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$403(QuantumToolkit.java:319)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
	at java.lang.Thread.run(Unknown Source)

The video shows that there are a lot of such exceptions; this is one of them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants