Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
.gradle
.idea
build
data
out
26 changes: 18 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
Overview
----------

The Predix Mobile Java application is an example of how the [Predix Mobile Java SDK](https://github.com/PredixDev/PredixMobileJavaSDK) can be used to create a native exectuting client for Mac, Windows, Linux or any other operating system that Java supports. For an overview of Predix Mobile development please visit the [SDK repo](https://github.com/PredixDev/PredixMobileSDK) and [wiki](https://github.com/PredixDev/PredixMobileSDK/wiki).
The Predix Mobile Java application is an example of how the [Predix Mobile Java SDK](https://github.com/PredixDev/PredixMobileJavaSDK) can be used to create a think client for Mac, Windows, Linux or any other operating system that Java supports. For an overview of Predix Mobile development please visit the [SDK repo](https://github.com/PredixDev/PredixMobileSDK) and [wiki](https://github.com/PredixDev/PredixMobileSDK/wiki).

This reference application provides the following:

- A container for a web application hosted with the Predix Mobile Service
- A way to Authenticate with a UAA instance bound to a Predix Mobile Service
- A way Authenticate with a UAA instance bound to a Predix Mobile Service
- A way to run the container application on platforms that support Java
- An installer example using a gradle task that creates a platfrom installer for the running platform (Windows and Mac only)
- An installer example using a gradle task that creates an installer on the executed platform (Windows and Mac only)

Technology
----------
Expand Down Expand Up @@ -51,7 +51,7 @@ This will cause a message to be printed to the console that looks something like

This will allow you to set break points and examine areas of your JavaScript running in the JavaFX WebView.

##### Limitations:
##### limitations:

One limitation is console messages from you JavaScript will not be available in the Chrome console tab. Instead you should enable a redirect that shows JavaScript console logs in the Java console.

Expand Down Expand Up @@ -95,11 +95,11 @@ logging_level=error

Using gradle you can simple issue gradle commands from the command line to run the application.

#### Mac/Linux:
####Mac/Linux:
```
./gradlew run
```
#### Windows:
####Windows:
```
gradle.bat run
```
Expand All @@ -125,6 +125,16 @@ https.proxyPort=proxyPortHere

In some cases both the configuration file and the Java VM argument may be required.

###****GE ONLY****

This proxy config will work for GE's proxy
```
http.proxyHost=sjc1intproxy01.crd.ge.com
http.proxyPort=8080
https.proxyHost=sjc1intproxy01.crd.ge.com
https.proxyPort=8080
```

Using an IDE
----------

Expand All @@ -146,7 +156,7 @@ Example installer
This example includes a very basic way to generate an Installer you could use to distribute your application for Mac, Windows, Linux, etc... The included installer is just an example and is not required to be used if you want to distribute your application using another install builder like install4j (http://www.ej-technologies.com/products/install4j/overview.html) or lzPack (http://izpack.org/). This is simply a quick and dirty example to show what is possible.

to use the example installer simply execute the jfxNative task from your IDE or using the Gradle command line. Here is an example of executing the installer task using Gradle in the command line.
##### Mac:
#####Mac:
```
./gradlew jfxNative
```
Expand All @@ -156,7 +166,7 @@ On Mac this will produce a DMG file that can be used to install the application

This example does not deal with signing the MacOS DMG or the application. For more on how to sign your DMG and APP file please visit Apple's documentation on signing (https://developer.apple.com/library/content/technotes/tn2206/_index.html). To integrate signing into the jfxNative Gradle Plugin please visit (https://github.com/FibreFoX/javafx-gradle-plugin)

##### Windows:
#####Windows:
```
gradle.bat jfxNative
```
Expand Down
5 changes: 4 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
}

group 'com.ge.predix'
version '1.1.1'
version '1.1.2'

apply plugin: 'java'
apply plugin: 'idea'
Expand All @@ -27,6 +27,7 @@ if (OperatingSystem.current().isMacOsX()) {
def vendorName = "GE Digital"

sourceCompatibility = 1.8
targetCompatibility = 1.8

repositories {
mavenCentral()
Expand Down Expand Up @@ -76,6 +77,7 @@ If enabled I would recommend skipCopyingDependencies = true in the jfx task if o
// }
//}


jfx {
identifier = group + "." + project.name.replace(" ", "-")
mainClass = mainClassName
Expand All @@ -96,3 +98,4 @@ jfx {

}


Binary file removed libs/PredixMobileJavaSDK-1.1.0.jar
Binary file not shown.
Binary file added libs/PredixMobileJavaSDK-1.3.551.jar
Binary file not shown.
3 changes: 3 additions & 0 deletions src/main/resources/PMBundle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
my.hello=Hello (default)
bootService.Syncing = Syncing (default)
bootService.Finished = Finished (default)
3 changes: 3 additions & 0 deletions src/main/resources/PMBundle_en_US.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
my.hello=Hello
bootService.Syncing = Syncing
bootService.Finished = Finished
3 changes: 3 additions & 0 deletions src/main/resources/PMBundle_fr_FR.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
my.hello=Salut
bootService.Syncing = Synchronisation
bootService.Finished = Terminée
Empty file.