Reputation: 446
I have downloaded all the demos of codename one, netbeans. I import the projects. No demo works for me. It shows errors missing jar files, and no main classes. How do i fix this? See in picture.
showing all errors in downloaded projects
showing specific errors after pressing resolve, .jar missing
Update:
Codename one settings does not work.
Upvotes: 1
Views: 314
Reputation: 17363
I also struggled to get the demos working from the GitHub download, but that is the wrong approach. Shai's answer has already provided the solution, and this post is just expanding on that to clarify the exact steps required in NetBeans.
Step 1 of 3: Install the CodenameOnePlugin plugin:
Step 2 of 3: Create one of the Demos projects:
Step 3 of 3: Run the demo project you just created.
That's all there is to it! No downloading is needed, apart from installing the plugin. However, I did hit a couple of very minor issues:
During project creation some of the projects have the same default name of Demo. Just pick another name.
There is a build problem with certain projects such as Charts:
Unsupported source/binary format (in Charts)
The project source/binary format is older than minimal supported one (1.6).
The solution is simple:
Upvotes: 3
Reputation: 52770
I suggest using File -> New -> Codename One -> Demos instead.
Otherwise you need to place the right jars into the projects as they aren't included in git: https://www.codenameone.com/blog/tip-setup-codename-one-demo-from-git.html
Upvotes: 2