Dukascopy
 
 
Wiki JStore Search Login

Java 7 Web Start and JForex platform launch
 Post subject: Java 7 Web Start and JForex platform launch Post rating: 0   New post Posted: Sat 04 Jan, 2014, 04:26 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
For a very long time, using the Java 6 WebStart, I have
pulled down the standard jnlp and substituted a number of
command line args, and properties to run the JForex platform
under the Java Server VM.

By the way, this is Java 7 Update 45 32-bit, running on a
Windows 64 system. This is because I occasionally use a DLL
and so it needs to be 32-bit compatible. There is no other
Java runtime installed on the system.

For my own software, I have given up using Java Web Start
because of its new security requirements, and "feature bloat".
Instead, for my own purposes, I use the "getdown" facility
which replaces the key features which I need to deploy and
to update my own applications. In fact, I may give a try at
writing a "getdown" specification to run JForex which would
allow me perhaps to "freeze" a version.... But that is off-topic.

The point of this post is that using Java 7 Update 45, it seems
that I can no longer get the JForex platform to pick up my
"-server" directive, or even my heap size specifications.

I really want to run it under the Server VM because of some
heavy backtesting, so I want the higher performance.

When I run a local strategy and fetch Java System properties
within the IStrategy onStart, I see that it is running the Client VM.

         try {
            String vmname = System.getProperty("java.vm.name");
            String vmversion = System.getProperty("java.version");
            log("Java VM is: "+vmname+" "+vmversion);
         }
         catch(Exception e) {
            log("Could not read System properties...");
         }





SO MY QUESTION IS: Does this look like a Java Web Start
issue, which is what I believe ?

Here is the launch specification I have used in the past, and
it no longer appears to work. If you use a Java Console, and
then after initial launch, dump system properties "s", then
I see that it is using the Client VM, and also JForex "Show
Java Memory Heap" indicates that it doesn't pick up my
heap specifications either. I think I can rewrite the heap
specs, but all the other "high performance" switches are
not going to be used by the Client VM which defeats the
whole purpose.

<?xml version="1.0"?>
<jnlp spec="1.6+" codebase="https://live-login.dukascopy.com/client/live/jclient/" href="https://live-login.dukascopy.com/fo/platform/jForex/">
    <information>
        <title>jForex platform</title>
        <vendor>Dukascopy</vendor>
        <description kind="one-line">jForex platform</description>
        <description kind="short">jForex platform</description>
        <description kind="tooltip">jForex platform</description>
        <icon href="images/jforex_icon.png"/>
    </information>
    <shortcut online="true" install="true">
        <desktop/>
        <menu submenu="Jforex"/>
    </shortcut>
    <security>
        <all-permissions/>
    </security>
    <update check="timeout" policy="always"/>
    <resources> <j2se version="1.6.0+" java-vm-args=" -server  -
-XX:GCPauseIntervalMillis=100 -XX:-DoEscapeAnalysis -
-XX:ThreadStackSize=128  -XX:CompileThreshold=10 -
-XX:CICompilerCount=2  -XX:+UseBiasedLocking -
-XX:+ForceTimeHighResolution -XX:+UseG1GC -
-XX:+RelaxAccessControlCheck -XX:-TieredCompilation  -
-XX:MaxInlineSize=500000 -Xverify:none -XX:FreqInlineSize=500000 -
-XX:-DontCompileHugeMethods -XX:+AlwaysPreTouch -
-XX:+UseFastAccessorMethods -Xss128k -Xms200m -Xmx200m -Xbatch -Xnoclassgc -
-Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel -Dswing.metalTheme=steel -
-Ddeployment.security.mixcode=DISABLE -
-Duser.timezone=America/New_York  -Duser.language=en -Duser.region=US />

        <property name="jnlp.platform.mode" value="jforex"/>
        <property name="jnlp.client.mode" value="LIVE"/>
        <property name="jnlp.login.url" value="https://www1.dukascopy.com/authorization/live,https://www3.dukascopy.com/authorization/live"/>
        <property name="jnlp.white.label.href" value="https://live-login.dukascopy.com/fo/platform/jForex/"/>
        <property name="sun.java2d.d3d" value="false"/>
        <java version="1.6+" initial-heap-size="32m" max-heap-size="512m"/>
        <extension name="AppFramework" href="https://live-login.dukascopy.com/fo/platform/libs/"/>
    </resources>
    <application-desc main-class="com.dukascopy.dds2.greed.GreedClient"/>
</jnlp>




I could rewrite this line with my own heap specs.
<java version="1.6+" initial-heap-size="32m" max-heap-size="512m"/>
but how do I specify the Server VM to this Java 7 Web Start jnlp ??
Clearly it is ignoring my "-server" arg.

I understand that these Java Web Start versions consider some args,
etc., to be UNSAFE and so they are ignored. This is all part of their
"security mania" which is too much for me personally.....

Here's the output of my Java Console including System and Deployment
properties.

In particular: java.vm.name = Java HotSpot(TM) Client VM
and I want the Server VM

Java Web Start 10.45.2.18
Using JRE version 1.7.0_45-b18 Java HotSpot(TM) Client VM
User home directory = C:\Users\Brent
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
m:   print memory usage
o:   trigger logging
p:   reload proxy configuration
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
0-5: set trace level to <n>
----------------------------------------------------
Dump system properties ...
----------------------------------------------------
awt.toolkit = sun.awt.windows.WToolkit
com.sun.security.enableCRLDP = true
dukascopy.jforex = false
file.encoding = Cp1252
file.encoding.pkg = sun.io
file.separator = \
http.auth.serializeRequests = true
https.protocols = TLSv1,SSLv3
java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
java.awt.printerjob = sun.awt.windows.WPrinterJob
java.class.path = C:\\Program Files (x86)\\Java\\jre7\\lib\\deploy.jar
java.class.version = 51.0
java.endorsed.dirs = C:\Program Files (x86)\Java\jre7\lib\endorsed
java.ext.dirs = C:\Program Files (x86)\Java\jre7\lib\ext;C:\Windows\Sun\Java\lib\ext
java.home = C:\Program Files (x86)\Java\jre7
java.io.tmpdir = C:\Users\Brent\AppData\Local\Temp\
java.library.path = C:\Program Files (x86)\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;c:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NTP\bin;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\;C:\Program Files (x86)\Toshiba\Bluetooth Toshiba Stack\sys\x64\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;c:\openssl-win32;c:\program files (x86)\java\jdk1.6.0_45\bin;"C:\Program Files (x86)\Java\jre7\bin";.
java.protocol.handler.pkgs = com.sun.javaws.net.protocol|com.sun.deploy.net.protocol|com.sun.deploy.net.protocol
java.rmi.server.RMIClassLoaderSpi = com.sun.jnlp.JNLPRMIClassLoaderSpi
java.runtime.name = Java(TM) SE Runtime Environment
java.runtime.version = 1.7.0_45-b18
java.security.policy = file:C:\\Program Files (x86)\\Java\\jre7\\lib\\security\\javaws.policy
java.specification.name = Java Platform API Specification
java.specification.vendor = Oracle Corporation
java.specification.version = 1.7
java.util.prefs.PreferencesFactory = com.dukascopy.dds2.greed.gui.settings.JForexPreferencesFactory
java.vendor = Oracle Corporation
java.vendor.url = https://java.oracle.com/
java.vendor.url.bug = https://bugreport.sun.com/bugreport/
java.version = 1.7.0_45
java.vm.info = mixed mode, sharing
java.vm.name = Java HotSpot(TM) Client VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Oracle Corporation
java.vm.specification.version = 1.7
java.vm.vendor = Oracle Corporation
java.vm.version = 24.45-b08
javaplugin.proxy.config.type = direct
javawebstart.version = javaws-10.45.2.18
jna.library.path = C:\Users\Brent\Local Settings\JForex\Brent\jfxdll
jnlp.client.mode = LIVE
jnlp.client.version = 2.30
jnlp.login.url = https://www1.dukascopy.com/authorization/live,https://www3.dukascopy.com/authorization/live
jnlp.white.label.href = https://live-login.dukascopy.com/fo/platform/jForex/
jnlpx.heapsize = 32m,512m
jnlpx.home = C:\\Program Files (x86)\\Java\\jre7\\bin
jnlpx.jvm = C:\\Program Files (x86)\\Java\\jre7\\bin\\javaw.exe
jnlpx.origFilenameArg = launch-live-temp.jnlp
jnlpx.remove = false
jnlpx.splashport = 61391
jnlpx.vmargs = -Djnlp.client.mode=LIVE -Djnlp.login.url=https://www1.dukascopy.com/authorization/live,https://www3.dukascopy.com/authorization/live -Djnlp.white.label.href=https://live-login.dukascopy.com/fo/platform/jForex/ -Dsun.java2d.d3d=false
line.separator = \r\n
os.arch = x86
os.name = Windows 7
os.version = 6.1
path.separator = ;
sun.arch.data.model = 32
sun.awt.enableExtraMouseButtons = true
sun.awt.exception.handler = com.dukascopy.dds2.greed.util.b.c$a
sun.awt.warmup = true
sun.boot.class.path = C:\Program Files (x86)\Java\jre7\lib\resources.jar;C:\Program Files (x86)\Java\jre7\lib\rt.jar;C:\Program Files (x86)\Java\jre7\lib\sunrsasign.jar;C:\Program Files (x86)\Java\jre7\lib\jsse.jar;C:\Program Files (x86)\Java\jre7\lib\jce.jar;C:\Program Files (x86)\Java\jre7\lib\charsets.jar;C:\Program Files (x86)\Java\jre7\lib\jfr.jar;C:\Program Files (x86)\Java\jre7\classes;C:\\Program Files (x86)\\Java\\jre7\\lib\\javaws.jar;C:\\Program Files (x86)\\Java\\jre7\\lib\\deploy.jar;C:\\Program Files (x86)\\Java\\jre7\\lib\\plugin.jar
sun.boot.library.path = C:\Program Files (x86)\Java\jre7\bin
sun.cpu.endian = little
sun.cpu.isalist = pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
sun.desktop = windows
sun.io.unicode.encoding = UnicodeLittle
sun.java.command = com.sun.javaws.Main C:\Users\Brent\AppData\Local\Temp\javaws2
sun.java.launcher = SUN_STANDARD
sun.java2d.d3d = false
sun.jnu.encoding = Cp1252
sun.management.compiler = HotSpot Client Compiler
sun.os.patch.level = Service Pack 1
trustProxy = true
user.country = US
user.dir = C:\FutureScalper
user.home = C:\Users\Brent
user.language = en
user.name = Brent
user.script =
user.timezone = America/New_York
user.variant =
----------------------------------------------------
Dump deployment properties ...
----------------------------------------------------
active.deployment.proxy.bypass.local = false
active.deployment.proxy.same = false
active.deployment.proxy.type = 3
deployment.baseline.url = https://javadl-esd-secure.oracle.com/update/baseline.version
deployment.blacklist.url = https://javadl-esd-secure.oracle.com/update/blacklist
deployment.blacklisted.certs.url = https://javadl-esd-secure.oracle.com/update/blacklisted.certs
deployment.browser.path = C:\Users\Brent\AppData\Local\Google\Chrome\Application\chrome.exe
deployment.browser.vm.iexplorer = true
deployment.browser.vm.mozilla = true
deployment.cache.enabled = true
deployment.cache.jarcompression = 0
deployment.cache.max.size = 500
deployment.capture.mime.types = false
deployment.console.startup.mode = SHOW
deployment.control.panel.log = false
deployment.expiration.check.enabled = true
deployment.insecure.jres = PROMPT
deployment.javafx.mode.enabled = true
deployment.javapi.cache.update = false
deployment.javapi.lifecycle.exception = false
deployment.javapi.log.filename =
deployment.javapi.runtime.type = 0
deployment.javapi.stop.timeout = 200
deployment.javapi.trace.filename =
deployment.javaws.appicon.index = C:\Users\Brent\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\appIcon\appIcon.xml
deployment.javaws.associations = ASK_USER
deployment.javaws.autodownload = NEVER
deployment.javaws.cache.update = false
deployment.javaws.concurrentDownloads = 4
deployment.javaws.install = IF_HINT
deployment.javaws.installURL = https://java.sun.com/products/autodl/j2se
deployment.javaws.logFileName =
deployment.javaws.muffin.max = 256
deployment.javaws.shortcut = ASK_IF_HINTED
deployment.javaws.splash.index = C:\Users\Brent\AppData\LocalLow\Sun\Java\Deployment\cache\6.0\splash\splash.xml
deployment.javaws.traceFileName =
deployment.javaws.uninstall.shortcut = false
deployment.javaws.update.timeout = 1500
deployment.javaws.viewer.bounds = 457,421,958,574
deployment.jpi.mode.new = true
deployment.log = true
deployment.macosx.check.update = true
deployment.max.output.file.size = 10
deployment.max.output.files = 5
deployment.mime.types.use.default = true
deployment.modified.timestamp = 1388804134936
deployment.proxy.bypass.local = false
deployment.proxy.override.hosts =
deployment.proxy.same = false
deployment.proxy.type = 3
deployment.security.SSLv2Hello = false
deployment.security.SSLv3 = true
deployment.security.TLSv1 = true
deployment.security.TLSv1.1 = false
deployment.security.TLSv1.2 = false
deployment.security.askgrantdialog.notinca = true
deployment.security.askgrantdialog.show = true
deployment.security.authenticator = true
deployment.security.blacklist.check = true
deployment.security.browser.keystore.use = true
deployment.security.clientauth.keystore.auto = true
deployment.security.disable = false
deployment.security.https.warning.show = false
deployment.security.jsse.hostmismatch.warning = true
deployment.security.level = HIGH
deployment.security.local.applets = PROMPT
deployment.security.mixcode = DISABLE
deployment.security.notinca.warning = true
deployment.security.password.cache = true
deployment.security.revocation.check = ALL_CERTIFICATES
deployment.security.run.untrusted = PROMPT
deployment.security.sandbox.awtwarningwindow = true
deployment.security.sandbox.casigned = PROMPT
deployment.security.sandbox.jnlp.enhanced = true
deployment.security.sandbox.selfsigned = PROMPT
deployment.security.trusted.policy =
deployment.security.use.user.home.java.policy = false
deployment.security.validation.crl = true
deployment.security.validation.ocsp = true
deployment.security.validation.ocsp.publisher = false
deployment.system.cachedir = C:\Users\Brent\AppData\LocalLow\Sun\Java\Deployment\SystemCache
deployment.system.security.blacklist = C:\Program Files (x86)\Java\jre7\lib\security\blacklist
deployment.system.security.cacerts = C:\Program Files (x86)\Java\jre7\lib\security\cacerts
deployment.system.security.jssecacerts = C:\Program Files (x86)\Java\jre7\lib\security\jssecacerts
deployment.system.security.oldcacerts = C:\Program Files (x86)\Java\jre7\lib\security\cacerts
deployment.system.security.oldjssecacerts = C:\Program Files (x86)\Java\jre7\lib\security\jssecacerts
deployment.system.security.trusted.certs = C:\\Program Files (x86)\\Java\\jre7\\lib\security\trusted.certs
deployment.system.security.trusted.clientauthcerts = C:\\Program Files (x86)\\Java\\jre7\\lib\security\trusted.clientcerts
deployment.system.security.trusted.jssecerts = C:\\Program Files (x86)\\Java\\jre7\\lib\security\trusted.jssecerts
deployment.system.security.trusted.libraries = C:\Program Files (x86)\Java\jre7\lib\security\trusted.libraries
deployment.system.tray.icon = false
deployment.trace = true
deployment.trace.level = all
deployment.update.mime.types = true
deployment.user.cachedir = C:\Users\Brent\AppData\LocalLow\Sun\Java\Deployment\cache
deployment.user.extdir = C:\Users\Brent\AppData\LocalLow\Sun\Java\Deployment\ext
deployment.user.logdir = C:\Users\Brent\AppData\LocalLow\Sun\Java\Deployment\log
deployment.user.security.blacklist = C:\Users\Brent\AppData\LocalLow\Sun\Java\Deployment\security\blacklist
deployment.user.security.blacklist.dynamic = C:\Users\Brent\AppData\LocalLow\Sun\Java\Deployment\security\blacklist.dynamic
deployment.user.security.blacklisted.certs = C:\Users\Brent\AppData\LocalLow\Sun\Java\Deployment\security\blacklisted.certs
deployment.user.security.policy = file:/C:/Users/Brent/AppData/LocalLow/Sun/Java/Deployment/security/java.policy
deployment.user.security.sandbox.certs = C:\Users\Brent\AppData\LocalLow\Sun\Java\Deployment\security\sandbox.certs
deployment.user.security.saved.credentials = C:\Users\Brent\AppData\LocalLow\Sun\Java\Deployment\security\auth.dat
deployment.user.security.trusted.cacerts = C:\Users\Brent\AppData\LocalLow\Sun\Java\Deployment\security\trusted.cacerts
deployment.user.security.trusted.certs = C:\Users\Brent\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs
deployment.user.security.trusted.clientauthcerts = C:\Users\Brent\AppData\LocalLow\Sun\Java\Deployment\security\trusted.clientcerts
deployment.user.security.trusted.jssecacerts = C:\Users\Brent\AppData\LocalLow\Sun\Java\Deployment\security\trusted.jssecacerts
deployment.user.security.trusted.jssecerts = C:\Users\Brent\AppData\LocalLow\Sun\Java\Deployment\security\trusted.jssecerts
deployment.user.security.trusted.libraries = C:\Users\Brent\AppData\LocalLow\Sun\Java\Deployment\security\trusted.libraries
deployment.user.tmp = C:\Users\Brent\AppData\LocalLow\Sun\Java\Deployment\tmp
deployment.version = 7.21
deployment.webjava.enabled = true
java.quick.starter = false
----------------------------------------------------
Done.


Any help gratefully received. Maybe if I rewrite the .jnlp I can persuade
Web Start to respect it ?

Here is a discussion of this sort of thing on the official Oracle site:

https://docs.oracle.com/javase/6/docs/te ... #resources

https://docs.oracle.com/javase/tutorial/ ... rties.html

Thanks!
HyperScalper


 
 Post subject: Re: Java 7 Web Start and JForex platform launch Post rating: 0   New post Posted: Sat 04 Jan, 2014, 05:34 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
This stripped version succeeds in running the Server VM.
So, by a process of elimination one can get rid of the
properties which Java Web Start (arbitrarily?) silently
ignores.

MY CONCLUSION from this is that you can no longer
provide the full range of java-vm-args as was possible
in the past. They are restricted by a list which Web Start
arbitrarily filters.

The rules are in this document, and if you don't play nice,
your properties, etc will be silently ignored:
https://docs.oracle.com/javase/6/docs/te ... .html#jnlp

Here's a document stating what is acceptable in the
java-vm-args tag... this appears to be part of the key to
solving this.

Also this code eliminates Dukascopy's heap specifications
and the heap specs in my java-vm-args appear now to
take effect ! So there is hope in a desperate world...

In particular: java.vm.name = Java HotSpot(TM) Server VM
now appears in a system properties dump in the Java Console,
and it seems that it has accepted my heap specs as well.
(I deleted Dukascopy's heap spec line which I guess would
have overwritten things...)


jnlpx.vmargs = -Xmx400m -Xms400m -XX:ThreadStackSize=128 -XX:MaxInlineSize=500000 -Xss128k -Djnlp.platform.mode=jforex -Djnlp.client.version=2.30 -Dswing.metalTheme=steel -Djnlp.client.mode=LIVE -Djnlp.login.url=https://www1.dukascopy.com/authorization/live,https://www3.dukascopy.com/authorization/live -Djnlp.white.label.href=https://live-login.dukascopy.com/fo/platform/jForex/ -Dsun.java2d.d3d=false -server




<?xml version="1.0"?>
<jnlp spec="1.6+" codebase="https://live-login.dukascopy.com/client/live/jclient/" href="https://live-login.dukascopy.com/fo/platform/jForex/">
    <information>
        <title>jForex platform</title>
        <vendor>Dukascopy</vendor>
        <description kind="one-line">jForex platform</description>
        <description kind="short">jForex platform</description>
        <description kind="tooltip">jForex platform</description>
        <icon href="images/jforex_icon.png"/>
    </information>
    <shortcut online="true" install="true">
        <desktop/>
        <menu submenu="Jforex"/>
    </shortcut>
    <security>
        <all-permissions/>
    </security>
    <update check="timeout" policy="always"/>
    <resources> <j2se version="1.6.0+" java-vm-args=" -server  -
-XX:ThreadStackSize=128  -
-XX:MaxInlineSize=500000  -
 -Xss128k -Xms400m -Xmx400m -
-Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel -Dswing.metalTheme=steel -
-Ddeployment.security.mixcode=DISABLE -
-Duser.timezone=America/New_York  -Duser.language=en -Duser.region=US />

        <property name="jnlp.platform.mode" value="jforex"/>
        <property name="jnlp.client.mode" value="LIVE"/>
        <property name="jnlp.login.url" value="https://www1.dukascopy.com/authorization/live,https://www3.dukascopy.com/authorization/live"/>
        <property name="jnlp.white.label.href" value="https://live-login.dukascopy.com/fo/platform/jForex/"/>
        <property name="sun.java2d.d3d" value="false"/>
                <extension name="AppFramework" href="https://live-login.dukascopy.com/fo/platform/libs/"/>
    </resources>
    <application-desc main-class="com.dukascopy.dds2.greed.GreedClient"/>
</jnlp>




This is no doubt not a complete solution but it shows how Java Web Start
"silently" ignores specifications, and I don't even think it says so in the
trace files for Web Start either... Geez !

Why not just allow me to run anything I want, if I have administrative
privileges on the system? Wouldn't that be a nice solution? The Oracle
Java designers don't seem to think so.

HyperScalper


 
 Post subject: Re: Java 7 Web Start and JForex platform launch Post rating: 0   New post Posted: Sat 04 Jan, 2014, 06:06 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
Just one more thing: Yes, it picks up the Server VM and it also picks up
my new Heap specs which, in this case, are 600m fixed heap size.

Oddly enough, JForex "Show Java Memory Heap" shows
575m but my spec was 600m. That's OK, but it isn't
an exact match.

Not a big deal, just a little strange. But it does pick up my
heap specs, apparently.

This is my spec as shown by a Java Console System dump.
jnlpx.vmargs = -Xmx600m -Xms600m .........

Maybe the calculation in JForex is changed, but I used to
see exactly what I specified and now it is not quite what
I specified. BUT that's OK !!! It's close enough.

HyperScalper


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com