Hi guys, I've made an application in JavaFX and I do want to export it into a runnable jar. When I run it from Eclipse or Netbeans, it works well. But when I run it from windows as an executable jar I get this error for my layout. Exception in Application start method Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58) Caused by: java.lang.RuntimeException: Exception in Application start method at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$152(LauncherImpl.java:182) at com.sun.javafx.application.LauncherImpl$$Lambda$2/1338668845.run(Unknown Source) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalStateException: Location is not set. at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2438) at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2413) at application.MainApp.initRootLayout(MainApp.java:47) at …

Member Avatar
Member Avatar
+0 forum 2

I'm doing an application in which I have to show a sequence of pictures: The sequence is the follow: A red X has to be shown for more or less 400 milliseconds; An image called "Screenshot" has to be shown for more or less 500 milliseconds; An image called "Noise" has to be shown for more or less 50 milliseconds; The "Noise" image disappear to make space for an EditText. The EditText is used to get the user data. Here is my code: public class Step1Training extends Activity { ImageFragment myImageFragment; InputFragment myInputFragment; Drawable cross; ImageView myImageView; EditText myEditText; int …

Member Avatar
Member Avatar
+0 forum 2

I see this example frequently and thought I'd give it a shot but I've got something unexpected happening with my Queue. I have multiple threads utilizing my producer class but the output doesn't show that it is being written to by each thread. protected Queue<ProductMessage> prodQueue = new ConcurrentLinkedQueue<>(); @Override public void run() { while (true) { prodQueue.add(new ProductMessage(MP3Util.getRandomProduct(), new Date(), MP3Util.regionLookup(MP3Util.getState()))); System.out.println(Thread.currentThread().getName() + "Queue " + prodQueue.size()); try { Thread.sleep(2000); } catch (InterruptedException ex) { Logger.getLogger(ProductProducer.class.getName()).log(Level.SEVERE, null, ex); } } Thread p1 = new Thread(new ProductProducer()); Thread p2 = new Thread(new ProductProducer()); p1.start(); p2.start(); The output shows: Thread-1Queue 3 …

Member Avatar
Member Avatar
+0 forum 12

The End.