Build for Windows Fails

Hello fellows,



i discover a problem on building for windows lately. I run the nightly builds of the JME3 SDK RC2 on Win7 Ultimate with Nvidia gf 460GTX. Here is the build log, maybe anyone has a clue what is going on or the same problem. Could be a merging bug, but i’m not sure…



[java]Windows EXE Creation

Copying 1 file to H:/Projekte/Git/solarwars/solarwars

H:/Projekte/Git/solarwars/solarwars/nbproject/launch4j-impl.xml:16:

net.sf.launch4j.BuilderException: Enter: JVM arguments

at net.sf.launch4j.Builder.build(Builder.java:77)

at net.sf.launch4j.ant.Launch4jTask.execute(Launch4jTask.java:111)

at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)

at sun.reflect.GeneratedMethodAccessor174.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:601)

at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)

at org.apache.tools.ant.Task.perform(Task.java:348)

at org.apache.tools.ant.Target.execute(Target.java:392)

at org.apache.tools.ant.Target.performTasks(Target.java:413)

at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)

at org.apache.tools.ant.Project.executeTarget(Project.java:1368)

at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)

at org.apache.tools.ant.Project.executeTargets(Project.java:1251)

at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:283)

at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)

at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)

BUILD FAILED (total time: 12 seconds)[/java]



EDIT: Oh and here the “launch4j-impl.xml”



[xml]<?xml version=“1.0” encoding=“UTF-8”?>

<!–launch4j-impl.xml v1.3–>

<project name=“launch4j-impl” basedir="…">

<target name="-launch4j-exe" depends="-test-launch4j-exe-enabled" if=“is.launch4j.exe.enabled”>

<echo>Windows EXE Creation</echo>

<taskdef classname=“net.sf.launch4j.ant.Launch4jTask” classpath="${libs.launch4j.classpath}" name=“launch4j”/>

<copy file=“resources/launch4j/winapp-config.xml” tofile=“launch4j-config.xml” overwrite=“true”>

<filterchain>

<replacestring from="$${dist.dir}" to="${dist.dir}"/>

<replacestring from="$${dist.jar}" to="${dist.jar}"/>

<replacestring from="$${main.class}" to="${main.class}"/>

<replacestring from="$${run.jvmargs}" to="${run.jvmargs}"/>

<replacestring from="$${application.title}" to="${application.title}"/>

</filterchain>

</copy>

<launch4j configFile=“launch4j-config.xml”/>

<delete file=“launch4j-config.xml”/>

<zip destfile="${dist.dir}/${application.title}-Windows.zip">

<zipfileset file="${dist.dir}/${application.title}.exe" prefix=""/>

<zipfileset dir="${dist.dir}/lib" prefix=“lib/”/>

</zip>

<delete file="${dist.dir}/${application.title}.exe"/>

</target>

<target name="-test-launch4j-exe-enabled">

<condition property=“is.launch4j.exe.enabled”>

<istrue value="${launch4j.exe.enabled}"/>

</condition>

</target>

</project>[/xml]



thanks in advance!

Hm, might be this happens if you have no command line options at all. Does it fix it when you add some? (e.g. -Xmx1024m).

Okay, but i have the -Xlint command added. I’ll try another one too.



EDIT: I tried several commands and enabled and disabled the Build for Win in the project settings. Still the error occurs…what am i missing…

Could you show the content of the “launch4j-config.xml” that should be left in your project root?

Here is the file:



[xml]

<?xml version="1.0" encoding="UTF-8"?>

<!–

To change this template, choose Tools | Templates

and open the template in the editor.

–>



<launch4jConfig>

<headerType>gui</headerType>

<outfile>dist/SolarWars.exe</outfile>

<jar>dist/SolarWars.jar</jar>

<errTitle>SolarWars</errTitle>

<icon>resources/launch4j/win-icon.ico</icon>

<chdir>.</chdir>

<customProcName>true</customProcName>

<singleInstance>

<mutexName>com.solarwars.SolarWarsApplication</mutexName>

<windowTitle>SolarWars</windowTitle>

</singleInstance>

<jre>

<!-- Specify one of the following or both -->

<path>bundled JRE path</path>

<minVersion>1.5.0</minVersion>

<opt></opt>

</jre>

<!–splash>

<file>file</file>

<waitForWindow>true|false</waitForWindow>

<timeout>seconds [60]</timeout>

<timeoutErr>true|false</timeoutErr>

</splash–>

<!–versionInfo>

<fileVersion>x.x.x.x</fileVersion>

<txtFileVersion>text</txtFileVersion>

<fileDescription>text</fileDescription>

<copyright>text</copyright>

<productVersion>x.x.x.x</productVersion>

<txtProductVersion>text</txtProductVersion>

<productName>text</productName>

<companyName>text</companyName>

<internalName>filename</internalName>

<originalFilename>filename.exe</originalFilename>

</versionInfo–>

<!–messages>

<startupErr>text</startupErr>

<bundledJreErr>text</bundledJreErr>

<jreVersionErr>text</jreVersionErr>

<launcherErr>text</launcherErr>

</messages–>

</launch4jConfig>

[/xml]

Hm, I don’t see the option replaced in the [opt] section… Where did you enter the command line options? You have to enter them in the Project Properties->Run->VM Options

1 Like

Thanks normen,



i only lookes at the commands for compiling not the run commands. I added the command -Xms10m and it finally compiles :slight_smile:

But why do i need a command at all, could it be the switch to RC2?

Its because theres a config file for Launch4j now and apparently Launch4j doesn’t like it if thats got empty elements.



Edit: And fixed in r9876 :slight_smile:

1 Like

You ca use launch4j directly.



http://launch4j.sourceforge.net/

@softpak said:
You ca use launch4j directly.

http://launch4j.sourceforge.net/

And what would be the point in that?
@normen said:
And what would be the point in that?


To solve this problem temporary.
And wait the next release like RC3.0?
@normen said:
Its because theres a config file for Launch4j now and apparently Launch4j doesn't like it if thats got empty elements.

Edit: And fixed in r9876 :)


Just read it =]
@softpak said:
To solve this problem temporary.
And wait the next release like RC3.0?

Just enter some option that has no effect, as said.