1

I am testing new GUI builder and just by clicking new stuff to the GUI, I can't get thru a runtime exception:

Compiling 1 source file to /home/peter/Projekty/NetBeans/CN1_TestNewBuilder/TestNewBuilder/build/tmp Compiling 1 source file to /home/peter/Projekty/NetBeans/CN1_TestNewBuilder/TestNewBuilder/build/classes compile: run: java.lang.ClassNotFoundException: com.mycompany.myapp.MyApplication at java.net.URLClassLoader.findClass(URLClassLoader.java:381) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at java.lang.ClassLoader.findSystemClass(ClassLoader.java:1004) at com.codename1.impl.javase.ClassPathLoader.findClass(ClassPathLoader.java:100) at com.codename1.impl.javase.ClassPathLoader.loadClass(ClassPathLoader.java:50) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at com.codename1.impl.javase.Executor$1.run(Executor.java:56) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:726) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) Java Result: 1 BUILD SUCCESSFUL (total time: 1 second)

I did not add a single line of my own code yet. At least I am not aware of anything :) Will anyone help me ?

Sold Out
  • 1,321
  • 14
  • 34
  • Put the GUI builder away. Build around 250 Swing GUI's by hand, making sure to use all of the Swing layout managers 20 - 30 times each. Once you've accomplished your 250 Swing GUI's, then you're ready to test an experimental GUI builder. – Gilbert Le Blanc Sep 07 '16 at 19:28
  • Anyone, any other suggestion ? – Sold Out Sep 07 '16 at 19:32
  • @GilbertLeBlanc Le Blanc And yes, I appreciate and highly esteem the CN1 project (that is why I am fighting to graps it), if that is behind your sarcasm :) – Sold Out Sep 07 '16 at 19:38
  • FYI @GilbertLeBlanc question is about Codename One not Swing.... – Shai Almog Sep 08 '16 at 04:18
  • Gilbert perhaps meant, that instead of using CN1 and its facilities, I could manually swing for iOS :) – Sold Out Sep 08 '16 at 10:03

1 Answers1

1

It seems like you renamed or changed the package of your main application after project creation: com.mycompany.myapp.MyApplication.

This is unrelated to the GUI builder. We suggest not doing that as package names are important and identify your apps to the stores. If you still want to change them you need to change them everywhere...

Shai Almog
  • 51,749
  • 5
  • 35
  • 65
  • Indeed, that I did - namely I renamed the class name. But I used in NetBeans the menu: Right Click @ class name -> Refactor -> Rename, which I assumed to do the job of renaming everything for me. I remember that in tutorial video you suggest not to rename it, once it was established. Thank you for this hint. – Sold Out Sep 08 '16 at 10:02
  • The IDE handles everything it can "see". So it can't see some of our more complex configuration options. – Shai Almog Sep 09 '16 at 05:16