ASKER
ASKER
echo Hi Zolf
ASKER
C:\behsa>echo Hi Zolf
Hi Zolf
C:\behsa>
As best I recall ";" separates commands, so the command above really means...
ASKER
C:\behsa>z.bat
C:\behsa>echo Hi Zolf
Hi Zolf
C:\behsa>
ASKER
# create a properties file `~/.config/behsa/behsa.properties`
example:
dbhost=192.168.1.100
dbname=dbform
username=sa
password=321321
#output.dir should be absolute path
output.dir=/home/techno/.config/behsa/output
#if you are facing a problem viewing Excel files, you can set path to Excel viewer manually
excel.viewer=/usr/bin/soffice
bartender.host=192.168.1.106
bartender.serials.port=1024
bartender.aggregs.port=1025
## build the app
cd behsatnt
mvn clean package
## run on windows
* build the app as on previous point
* create a folder `C:/behsa`
* copy `$project_root/behsa.bat`, `$project_root/target/dependency`, `$project_root/target/behsa-1.0-SHAPSHOT.jar` to `C:/behsa` folder
* create the properties file as on this README
* create a shortcut on Windows Desktop and point it to `C:/behsa/behsa.bat`
* double click the shortcut
## run via webstart
you run a webserver somewhere in your net. Create a folder `behsa` so that it's available as
`http://WEBSERVER_ADDRESS:PORT/behsa` and this address is mapped to, say `/var/lib/webserver/behsa/`.
* copy `src/main/resources/behsa.jnlp` to `/var/lib/webserver/behsa/`
* copy `depsigned/*` to `/var/lib/webserver/behsa/dependency/`
* build the app as on previous point
* copy `target/behsa-1.0-SNAPSHOT.jar` to `/var/lib/webserver/`
* start the app on any machine from your net: `javaws http://WEBSERVER_ADDRESS_PORT/behsa/behsa.jnlp`
## get updates and rebuild
cd behsatnt
git pull
mvn clean package
ASKER
ASKER
set D=dependency
start javaw -cp behsa-1.0-SNAPSHOT.jar;%D%/poi-scratchpad-3.14.jar;%D%/javax.inject-1.jar;%D%/reactfx-1.4.1.jar;%D%/commons-codec-1.10.jar;%D%/commons-dbcp-1.4.jar;%D%/curvesapi-1.03.jar;%D%/guice-4.0.jar;%D%/controlsfx-8.40.10.jar;%D%/aopalliance-1.0.jar;%D%/guice-multibindings-4.0.jar;%D%/stax-api-1.0.1.jar;%D%/guava-16.0.1.jar;%D%/xmlbeans-2.6.0.jar;%D%/commons-pool-1.5.4.jar;%D%/poi-ooxml-schemas-3.14.jar;%D%/poi-ooxml-3.14.jar;%D%/jcalendar-1.4.jar;%D%/slf4j-simple-1.7.21.jar;%D%/slf4j-api-1.7.21.jar;%D%/poi-3.14.jar;%D%/jtds-1.3.1.jar com.behsa.Main
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.technojeeves.bat</groupId>
<artifactId>bat</artifactId>
<name>bat</name>
<version>1.0-SNAPSHOT</version>
<dependencies>
<!-- Logback
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.6</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.0.9</version>
</dependency>
-->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.4.0</version>
<configuration>
<mainClass>com.technojeeves.bat.App</mainClass>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>com.technojeeves.bat.App</Main-Class>
<Build-Number>1</Build-Number>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>Central Repository</id>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
</project>
ASKER
[JavaFX Application Thread] INFO com.behsa.gui.SerialOrderForm - glyph Glyph@440245ba[styleClass=label glyph-font]'' 0.0 0.0 PLUS 14.0 null
Exception in Application start method
[JavaFX Application Thread] INFO com.behsa.DataAccess - Closing database
[JavaFX Application Thread] INFO com.behsa.DataAccess - Closed
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: ControlsFX Error: ControlsFX 8.40.10 requires at least Java Version 8 Update 40
at impl.org.controlsfx.version.VersionChecker.doVersionCheck(VersionChecker.java:96)
at org.controlsfx.control.ControlsFXControl.<init>(ControlsFXControl.java:35)
at org.controlsfx.control.StatusBar.<init>(StatusBar.java:82)
at com.behsa.gui.StatusBar.getRootNode(StatusBar.java:21)
at com.behsa.gui.MainPane.getRootNode(MainPane.java:55)
at com.behsa.Main.start(Main.java:80)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
... 1 more
Exception running application com.behsa.Main
ASKER
OK, more in a few minutes, I have something that must be done.cheers mate
In the meantime, try to sort out your runtime errors.I managed to resolve that issue. It seems to be the version of controlfx and java version conflict. I updated the controlfx version from 8.40.10 to 8.40.11 and I am able to run the app in eclipse
Look also at lines 25-32 of my pom.it seems you did not attache the pom. I will wait
it seems you did not attache the pom. I will waitI pasted it in THIS
jar cvfM src.zip pom.xml src
ASKER
ASKER
ASKER
java -jar <the snapshot>
ASKER
ASKER
ASKER
ASKER
java -jar
with my jar to run it. That's not my jar is it?
ASKER
with my jar to run it. That's not my jar is it?I was running your jar
ASKER
ASKER
mvn clean package
the jar was created and when I compare that to your jar the size of my jar is 110KB and yours is 22,196KB. So, it seems my jar is not getting packed with all the jars. guessing!!ASKER
ASKER
I've included the altered pom.xml. Back up your own and copy mine into your project to overwrite your originalCan you please provide the pom file again so i can again run the
mvn clean package
with your pom.xml and do I need to sign the jars??
ASKER
Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.
TRUSTED BY