This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 149660 - javafxpackager complains of unknown argument
Summary: javafxpackager complains of unknown argument
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Deployment (show other bugs)
Version: 6.x
Hardware: Macintosh All
: P1 blocker (vote)
Assignee: Adam Sotona
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-09 17:09 UTC by dgrieve
Modified: 2008-10-27 14:12 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dgrieve 2008-10-09 17:09:44 UTC
Builds fail because javafxpackager complains of an unknown argument. The unknown argument is ${cp.arg}, so it appears that this line in build-impl.xml is at 
fault:
<condition else="" property="cp.arg" value="-cp">. 

Defining cp.arg as -cp in private/private.properties or in build.xml works around the issue, but this is not feasible to do for every project.
Comment 1 dgrieve 2008-10-09 17:10:56 UTC
init:
deps-jar:
Unknown argument: 

JavaFX Packager arguments:
---------------------------
-src | -sourcepath <source root1>[;<source root2>...]          at least 1 source root is required
-cp | -classpath | -librarypath <library1>[;<library2>...]     optional
-res | -resourcepath <resource root1>[;<resource root2>...]    optional
-d | -destination <target directory>                           default target directory is ./dist
-workDir <working directory>                                   optional
-v | -verbose                                                  enables verbose output
-p | -profile [DESKTOP | MOBILE | EMBEDDED]                    default profile is DESKTOP
-appName <application name>                                    default application name is application class name
-appVendor <application vendor>                                default application vendor is "user.name" Java system property
-appVersion <application version>                              default application version is 1.0
-appClass <application class>                                  mandatory argument
-appWidth <applet width>                                       default applet width is 200
-appHeight <applet height>                                     default applet height is 200
-appCodebase <application code base URL>                       default code base is empty
-keystore <keystore for signing>                               temporary self-signature is created when keystore is not specified
-keystorePassword <password>                                   mandatory when signing with specific keystore
-keyalias <alias>                                              mandatory when signing with specific keystore
-keyaliasPassword <password>                                   keystorePassword is used instead when not specified

-help                                                          prints this help screen
-version                                                       prints JavaFX Toolchain version number

sample usages:
--------------
javafxpackager -src ./mysources -appClass mypackage.MyApplication
  builds all JavaFX and Java sources according to default DESKTOP profile specification into ./dist/MyApplication.html, ./dist/MyApplication.jnlp, 
./dist/MyApplication.jar and ./dist/MyApplication.jar.pack.gz

javafxpackager -src ./mysources -appClass mypackage.MyApplication -p mobile
  builds all JavaFX and Java sources according to MOBILE profile specification into ./dist/MyApplication.jad and ./dist/MyApplication.jar

compile:
jar:
BUILD SUCCESSFUL (total time: 0 seconds)

Comment 2 dgrieve 2008-10-09 19:19:09 UTC
Note also that ${javac.classpath} might be empty. In my project.properties, I have javac.classpath=

Also, when running javafxpackager with the set of arguments given (and with the classpath workaround), I get a NPE some downstream processing. So I 
have overridden -do-compile in my build.xml like so. I did not play around with all the argument combinations. I have also sent an email to the person 
whom I believe is responsible for javafxpackager.

    <target depends="init,deps-jar,-pre-compile" name="-do-compile">
	<exec executable="${platform.fxhome}/bin/javafxpackager${binary.extension}" failonerror="true">
            <arg value="-src"/>
            <arg value="${src.dir}"/>
            <arg value="-appclass"/>
            <arg value="${main.class}"/>
            <arg value="-v"/>
	</exec>
    </target>

Comment 3 dgrieve 2008-10-10 13:31:20 UTC
My override now contains everything except the classpath. So the central issue is the cp.arg and the empty javac.classpath
Comment 4 Adam Sotona 2008-10-13 10:40:49 UTC
It seems that execution an passing the command line arguments to Java works completely different on Mac.
It is passing and empty space as a valid Java argument.
Comment 5 Adam Sotona 2008-10-13 12:33:06 UTC
fixed
Comment 6 Alexandr Scherbatiy 2008-10-27 14:12:56 UTC
verified in 2008-10-27_03-01-09.zip