Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no such file or directory error #3

Open
aabhaanjan opened this issue Mar 30, 2018 · 4 comments
Open

no such file or directory error #3

aabhaanjan opened this issue Mar 30, 2018 · 4 comments

Comments

@aabhaanjan
Copy link

Hi I am trying to embed custom ui but getting following error:
[INFO] --- exec-maven-plugin:1.4.0:exec (embed-custom-ui-in-launcher) @ testProjec ---
F:\testProjec ..\fxlauncher-custom-ui\target\classes. : no such file or directory

@aabhaanjan
Copy link
Author

It seems I am missing some step.. below is my pom

  1. I down loded the demo project and exported jar from that
  2. Added that jar to my project
  3. Changed my Pom
4.0.0 testProject testProject 4.0.7
     <!-- Installer Filename without suffix -->
<!-- Application Name -->
<app.filename>${project.name}</app.filename>

<!-- The JavaFX Application class name -->
<app.mainClass>com.MainApp</app.mainClass>

<!-- The app and launcher will be assembled in this folder -->
<app.dir>${project.build.directory}/app</app.dir>

<!-- Native installers will be build in this folder -->
<app.installerdir>${project.build.directory}/installer</app.installerdir>

<!-- Base URL where you will host the application artifacts -->
<app.url>http://www.culpzlab.com/burn/</app.url>
 <app.acceptDowngrade>false</app.acceptDowngrade>
 <app.icon>src/main/deploy/package/windows/testProject.ico</app.icon>

<!-- Optional scp target for application artifacts hosted at the above url
<app.deploy.target>[email protected]:fxldemo</app.deploy.target>-->


</properties>


<build>
    <sourceDirectory>src</sourceDirectory>
    <plugins>
     <!-- Compile project jar to appdir -->
                   <plugin>
                       <groupId>org.apache.maven.plugins</groupId>
                       <artifactId>maven-jar-plugin</artifactId>
                       <version>2.6</version>
                       <configuration>
                           <outputDirectory>${app.dir}</outputDirectory>
                      </configuration>
                   </plugin>
  <plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.3</version>
    <configuration>
    <compilerArguments>
    	<endorseddirs>${basedir}/src/main/resources/sfs</endorseddirs>
	  </compilerArguments>
	          <source>1.8</source>
	          <target>1.8</target>
	          <mainClass>com.MainApp</mainClass>
	        </configuration>
  </plugin>

     <plugin>
      <groupId>com.zenjava</groupId>
            <artifactId>javafx-maven-plugin</artifactId>
            <version>8.1.2</version>
            <configuration>
            <appName>testProject</appName>
    		<title>testProject</title>
    		<description>testProject-sample</description>
    		<vendor>example</vendor>
                <mainClass>com.MainApp</mainClass>
                <verbose>true</verbose>
                 <bundler>EXE</bundler>
		        <bundleArguments>
		                <icon.ico>src/main/deploy/package/windows/testProject.ico</icon.ico>
        				<icon.png>src/main/deploy/package/windows/testProject.png</icon.png>
		        </bundleArguments>
		        <needShortcut>true</needShortcut>
		         <additionalAppResources>src/main/deploy/package/windows</additionalAppResources><!-- name does not matter, it's just some folder :D -->

            </configuration>

        </plugin>
        <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <version>2.10</version>
    <executions>
      <execution>
        <id>copy-dependencies</id>
        <phase>package</phase>
        <goals>
          <goal>copy-dependencies</goal>
        </goals>
        <configuration>
                <outputDirectory>${app.dir}</outputDirectory>
          <overWriteReleases>false</overWriteReleases>
          <overWriteSnapshots>false</overWriteSnapshots>
          <overWriteIfNewer>true</overWriteIfNewer>
        </configuration>
      </execution>
    </executions>
  </plugin>


        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.4.0</version>
            <!-- Generate app.xml manifest -->
            <executions>
                <execution>
                    <id>create-manifest</id>
                    <phase>package</phase>
                    <goals>
                        <goal>java</goal>
                    </goals>
                    <configuration>
                        <mainClass>fxlauncher.CreateManifest</mainClass>
                        <arguments>
                            <argument>${app.url}</argument>
                            <argument>${app.mainClass}</argument>
                            <argument>${app.dir}</argument>
                            <argument>--cache-dir=${app.cacheDir}</argument>
                            <argument>--accept-downgrade=${app.acceptDowngrade}</argument>
                            <argument>${app.parameters}</argument>
                        </arguments>
                    </configuration>
                </execution>
                <!-- Embed app.xml inside fxlauncher.xml so we don't need to reference app.xml to start the app -->
              <execution>
                    <id>embed-manifest-in-launcher</id>
                    <phase>package</phase>
                    <goals>
                        <goal>exec</goal>
                    </goals>
                    <configuration>
                        <executable>jar</executable>
                        <workingDirectory>${app.dir}</workingDirectory>
                        <arguments>
                            <argument>uf</argument>
                            <argument>fxlauncher-1.0.13.jar</argument>
                            <argument>app.xml</argument>
                        </arguments>
                    </configuration>
                </execution>
                <!-- Optional step to include custom UI, see https://github.com/edvin/fxlauncher-custom-ui -->
                <execution>
                  <id>embed-custom-ui-in-launcher</id>
                   <phase>package</phase>
                    <goals>
                       <goal>exec</goal>
                    </goals>
                    <configuration>
                        <executable>jar</executable>
                        <workingDirectory>${app.dir}</workingDirectory>
                        <arguments>
                            <argument>uf</argument>
                          <argument>fxlauncher-1.0.13.jar</argument>
                           <argument>-C</argument>-->
                            <argument>${project.basedir}/../fxlauncher-custom-ui/target/classes</argument>                               <argument>.</argument>
                       </arguments>
                   </configuration>
               </execution>
                <!-- Create native installer. Feel free to add more arguments as needed.
                 https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javapackager.html
                 -->
                <execution>
                    <id>installer</id>
                    <phase>install</phase>
                    <goals>
                        <goal>exec</goal>
                    </goals>
                    <configuration>
                        <executable>javapackager</executable>

                        <arguments>
                            <argument>-deploy</argument>
                            <argument>-native</argument>
                            <argument>-outdir</argument>
                            <argument>${app.installerdir}</argument>
                            <argument>-outfile</argument>
                            <argument>${app.filename}</argument>
                            <argument>-srcdir</argument>
                            <argument>${app.dir}</argument>
                            <argument>-srcfiles</argument>
                            <argument>fxlauncher-1.0.13.jar</argument>
                            <argument>-appclass</argument>
                            <argument>fxlauncher.Launcher</argument>
                            <argument>-name</argument>
                            <argument>${project.name}</argument>
                            <argument>-title</argument>
                            <argument>${project.name}</argument>
                            <argument>-vendor</argument>
                            <argument>${app.vendor}</argument>
                            <argument>${app.version}</argument>
                            <argument>${project.groupId}.${project.artifactId}</argument>
                            <argument>-Bicon=testProject.ico</argument>
                            <argument>-BSetupIconFile=src\main\deploy\package\windows\testProject-setup-icon.bmp</argument>
                            <argument>-BshortcutHint=true</argument>
                             <!--   <argument>-BlicenseFile=..\..\lisence.txt</argument>-->


                        </arguments>
                    </configuration>
                </execution>
                <!-- Copy application artifacts to remote site using scp (optional) -->
                <execution>
                    <id>deploy-app</id>
                    <goals>
                        <goal>exec</goal>
                    </goals>
                    <configuration>
                        <executable>scp</executable>
                        <arguments>
                            <argument>-r</argument>
                            <argument>${app.dir}/.</argument>
                            <argument>${app.deploy.target}</argument>
                        </arguments>
                    </configuration>
                </execution>
            </executions>
        </plugin>
</plugins>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>4.3.5.Final</version>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>5.1.6</version>
    </dependency>

	<dependency>
        <groupId>smartfox</groupId>
        <artifactId>sfs2x-api</artifactId>
        <version>1.0.1</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>smartfox</groupId>
        <artifactId>sfs2x-client-core</artifactId>
        <version>1.0.1</version>
         <scope>compile</scope>
    </dependency>

	<dependency>
        <groupId>smartfox</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.0.1</version>
    </dependency>

	<dependency>
    	<groupId>smartfox</groupId>
    	<artifactId>slf4j-simple</artifactId>
    	<version>1.0.1</version>
    </dependency>
    <!-- add slf4j interfaces to classpath -->
	<dependency>
	    <groupId>org.slf4j</groupId>
	    <artifactId>slf4j-api</artifactId>
	    <version>1.6.4</version>
	    <scope>compile</scope>
	</dependency>
org.apache.httpcomponents httpclient 4.1.3 org.apache.httpcomponents httpmime 4.1.3 org.slf4j jcl-over-slf4j 1.6.4 runtime
	<!-- add log4j binding to classpath -->
	<!-- routes slf4j calls to log4j -->
	<dependency>
	    <groupId>org.slf4j</groupId>
	    <artifactId>slf4j-log4j12</artifactId>
	    <version>1.6.4</version>
	    <scope>runtime</scope>
	</dependency>

	<!-- add log4j to classpath -->
	<!-- does the logging -->
	<dependency>
	    <groupId>log4j</groupId>
	    <artifactId>log4j</artifactId>
	    <version>1.2.16</version>
	</dependency>
	<dependency>
	    <groupId>smartfox</groupId>
	    <artifactId>netty</artifactId>
	    <version>1.0.1</version>
	</dependency>
	<dependency>

junit
junit
4.11


javafx
jfxrt
${java.version}
system
${java.home}/lib/ext/jfxrt.jar

	<dependency>
	    <groupId>fxlauncher</groupId>
         <artifactId>fxlauncher</artifactId>
	    <version>1.0.13</version>
	</dependency>
	<!--<dependency>
	<groupId>de.codecentric.centerdevice</groupId>
	<artifactId>javafxsvg</artifactId>
	<version>1.2.1</version>
</dependency>-->
	<dependency>
		<groupId>org.json</groupId>
		<artifactId>json</artifactId>
		<version>20171018</version>
	</dependency>

@aabhaanjan
Copy link
Author

But unable to run it

@aabhaanjan
Copy link
Author

any answers?

@edvin
Copy link
Owner

edvin commented Apr 4, 2018

The error message is saying that it can't find the class files for the custom ui, so either you don't have the ui project in ${project.basedir}/../fxlauncher-custom-ui, or you forgot to build that project first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants