I have a project in Netbeans which uses Netbeans features I'm not familiar with, so I'm not sure how to move the build and run it elsewhere.
To open the project in Netbeans, I was told to do "File -> Project Groups -> New Group -> Free Group", then "File -> Open Project" and select the project. This project has a lot of sub-projects (modules?). The high-level one shows up with an icon that looks like 2 gold puzzle pieces, and I can open up module sub-projects inside of it which show up with grey puzzle piece icons. I don't think the project is the NetBeans "Java Project" type.
To run it, I can right-click on the top-level gold-puzzle-piece project entry in the Projects panel and select "run". When I do that, it takes a while to build then it runs and all is well.
Now I want to move the updated software to a network share and run it on a different computer. I believe the other computer does not have NetBeans or jdk, just jre.
In the root of the project's directory is a nb_modules directory which contains nb_modules\harness\suite.xml which I think (not 100% sure) is the build xml. It has the following entry in it, in addition to others:
<target name="run" depends="build,-jdk-init" description="Runs this suite in place.">
<ant antfile="${harness.dir}/run.xml" target="run">
<reference refid="cluster.path.id"/>
</ant>
</target>
The run.xml has the following target in it:
<target name="run" depends="-prepare-as-app,-prepare-as-platform">
<touch file="${cluster}/.lastModified"/> <!-- #138427 -->
<property name="run.args" value=""/>
<property name="run.args.ide" value=""/>
<property name="run.args.extra" value=""/>
<condition property="run.args.mac" value="-J-Xdock:name='${app.name}'" else="">
<os family="mac"/>
</condition>
<exec osfamily="windows" executable="${run.exe}" failonerror="no">
<arg value="--jdkhome"/>
<arg file="${run.jdkhome}"/>
<arg line="${run.args.common}"/>
<arg line="${run.args.prepared}"/>
<arg line="${run.args}"/>
<arg line="${run.args.extra}"/>
<arg line="${run.args.ide}"/>
</exec>
<exec osfamily="unix" dir="." executable="sh" failonerror="no">
<arg value="${run.sh}"/>
<arg value="--jdkhome"/>
<arg file="${run.jdkhome}"/>
<arg line="${run.args.common}"/>
<arg line="${run.args.prepared}"/>
<arg line="${run.args}"/>
<arg line="${run.args.extra}"/>
<arg line="${run.args.mac}"/>
<arg line="${run.args.ide}"/>
</exec>
</target>
In the root of the project's directory I also have a build directory that I think is where stuff is getting build into, and it has a bunch of jars in it. There is a …/build/cluster/modules/ directory with lots of jars and a …/build/cluster/core/locale/ directory there is only 1 file: core_app_all_gui.jar which I assume is the main jar.
If I try to do java -jar core_app_all_gui.jar I get "no main manifest attribute, in core_app_all_gui.jar", so I am wondering if maybe I need to do a java -cp core_app_all_gui.jar package.MainClass format perhaps. Since the suite.xml/run.xml aren't in the build area I'm not sure if I'm supposed to use them. I assume they are ant scripts, though I'm not sure. I'm not sure if the computer I want to run this on has ant or not.
For my specific use case, if you can explain how to use the above xml data to help figure the command line that would work for me that would be fine. It would be nice though to find a generic answer to the question which works for everyone. All I want to do is to run it on a different computer.
All other answers I find for this, including on StackOverflow, are specifically for conventional Netbeans Java projects which create a dist/myapp.jar that can be ran with simply java -jar myapp.jar. Since that does not answer my question, they are not duplicates.