Question
When using Tizen Studio 1.2 or later, the command-line interface fails when executing the build-web command:
> tizen build-web -- .\fooproject
Exception in thread "main" java.lang.NoClassDefFoundError: org/tizen/core/gputil/PathUtil
at org.tizen.common.core.web.BuildWebAppModule.buildResources(BuildWebAppModule.java:128)
at org.tizen.ncli.subcommands.build.buildweb.BuildWebCLICommand.call(BuildWebCLICommand.java:91)
at org.tizen.ncli.subcommands.build.buildweb.BuildWebCLICommand.call(BuildWebCLICommand.java:52)
at org.tizen.ncli.subcommands.AbstractSubCommand.runCommand(AbstractSubCommand.java:85)
at org.tizen.ncli.ide.shell.BuildWebCLI.execute(BuildWebCLI.java:86)
at org.tizen.ncli.ide.shell.AbstractCLI.execute(AbstractCLI.java:92)
at org.tizen.ncli.ide.shell.Main.run(Main.java:144)
at org.tizen.ncli.ide.shell.Main.main(Main.java:78)
Caused by: java.lang.ClassNotFoundException: org.tizen.core.gputil.PathUtil
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 8 more
Answer
Problem Understanding
The error occurs because the required NativeCLI package is missing in your Tizen Studio installation. The NoClassDefFoundError indicates that the Java runtime cannot find the org.tizen.core.gputil.PathUtil class, which is part of the NativeCLI package.
Solution Methods
-
Install NativeCLI Package:
- Open Tizen Studio Package Manager
- Install the "NativeCLI" package
- Restart Tizen Studio after installation
-
Verify Installation:
- After installing the NativeCLI package, verify that the build-web command works properly
- If the issue persists, try reinstalling Tizen Studio with all required packages
Additional Tips
- This issue is documented in the Tizen troubleshooting guide
- For web application development using CLI, refer to the official documentation
- For native application development using CLI, check the corresponding guides