Spaces in JVM arguments

On Windows, I want to hand a directory path to the JVM in the following way
java -Dworking.dir=<mydir>
Unfortunately, the <mydir> is provided by the %USERPROFILE% environment variable and
contains whitespace (c:\documents and settings\username). How can I quote this argument to prevent the JVM from complaining about the bad option 'and' which supposedly starts after the first whitespace?
Thanks a lot
Andreas

If I do:
set JAVAOPTIONS=-Dworking.dir="%USERPROFILE%"
java ...
quoting does NOT workWindoze shell (cmd.exe) deals with the quotes you supplied EXACTLY as it is supposed to.
contrary to the
straightforward shell command.
I need JAVAOPTIONS because it is the only way to
have the parameter passed to Java WebStart.The exact behavour varies between different Windoze versions.
You need to think laterally. Starting from
set _JAVA_OPTIONS=-Dworking.dir=%USERPROFILE%first, there are spaces in that so we need the whole thing quoted
set _JAVA_OPTIONS="-Dworking.dir=%USERPROFILE%"next, that probably won't work as it is, assuming JAVAOPTIONS expands to
-Dworking.dir=C:\Documents and Settings\fubarso we need to insert some escaped quotes as well
set _JAVA_OPTIONS="-Dworking.dir=\"%USERPROFILE%\""which, with any luck, should see JAVAOPTIONS expanding to
-Dworking.dir="C:\Documents and Settings\fubar"If you still have problems, Google for how to escape special characters in the Windoze shell.

Similar Messages

  • Why are my JVM arguments not taking effect

    Hi,
    I'm trying to set the  -Dweblogic.security.SSL.protocolVersion=TLS1 at the server level as well as application.
    For the application (Agile PLM), I added the above into the Arguments section in the Console UI and I can see the change in the config.xml but I can still connect to .../Agile  using nothing SSL3 when I set my browser to use it only. I know my browser works OK because I changed our Atlassian product and it gives me errors with just SSL3.0.
    I'm also trying to set the set setting at the server level because I believe that the LDAP SSL error that I'm getting is due to the Domain Controller no longer accepting SSL 3.0 but I tried changed SetDomainEnv.cmd and SetEnv.cmd and neither would work as I can still get the /Console page.
    I'm on Windows 2008R2, WLS 12.c Agile 9.3.4
    in every case, I shut down WLS and restarted it.
    What is the correct file for WLS12.c on Windows to set the JVM arguments as I find answers to update different files or use WLST which I haven't used it yet but I should be able to just update the correct file and get the Protocol enforced?
    The command that I added to my two files:
    on SetDomainEnv.cmd:
    set JAVA_OPTIONS= -Dweblogic.security.SSL.protocolVersion=TLS1 %JAVA_OPTIONS%
    on SetEnv.cmd:
    SET JAVA_OPTIONS_WIN=-Dweblogic.security.SSL.protocolVersion=TLS1   
    Thanks
    Anatole

    Connect your device to a computer's itunes - that's the most reliable way to copy photos.  You should be doing this anyway, otherwise if the device craps out, you may end up losing all your photos.  Even if you have backup to icloud turned on - many users have discovered that a restore didn't return their pictures.
    As for photo stream...
    Check the following:
    From your Home screen, tap Settings > iCloud > Photo Stream, and make sure the slider is set to the ON position.
    From the Home screen, tap Settings > Wi-Fi, make sure the slider is set to ON, and that your device is connected to a wireless network.
    Ensure that Camera app is closed on the device where you took the photo. Photo Stream will not upload photos from an iOS device until the Camera app is closed.
    Ensure your iOS device has not fallen below 20% battery power. To preserve battery life, Photo Stream downloading and uploading are disabled when the battery reaches this threshold. Downloading and uploading will resume once you charge your device, and the battery charge is greater than 20%.

  • Specified in jnlp jvm argument but not   applied   by browser

    jlnp file specifies passing passing vm arguments   using java-vm-arguments attribute , it also provides list of acceptable arguments  as mentioned here http://docs.oracle.com/javase/7/docs/technotes/guides/javaws/developersguide/syntax.html.
    In my case , jvm argument  is   -Djava.security.debug=sunpkcs11,pkcs11. I added   this to jlnp file but this  is never loded by the browser jvm.  This is not mentioned in the above link so can this argument be passed to an applet?
    here is my jnlp file
    <pre>
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="" href="">
        <information>
            <title>Applet</title>
            <vendor>ARTMS</vendor>
        </information>
        <resources>
            <j2se version="1.7+"  java-vm-args="-Djava.security.debug=sunpkcs11,pkcs11"/>
            <jar href="dsapplet.jar"/>
        </resources>
        <property name="java.security.debug" value="sunpkcs11,pkcs11"/>
        <applet-desc
             name="Applet"
             main-class="com.service.TestApplet"
             width="900"
             height="300">
                 <param name="java_arguments" value="-Djava.security.debug=sunpkcs11,pkcs11"/>
         </applet-desc>
      <security>
      <all-permissions/>
      </security>
         <update check="background"/>
    </jnlp>
    </pre>

    I tried with java web start still the jvm argument is not applied , please advice can this argument  -Djava.security.debug=sunpkcs11,pkcs11    be applied to java web start ?

  • Why does buckminster not resolve my passed JVM argument?

    I have a jenkins job which uses buckminster to build an eclipse product.
    At the beginning I have an "Extended Choice Parameter" where the "customer" key can be selected.
    In the buckminster configuration I use this "customer" variable to select the right cquery:
    import '${WORKSPACE}/source/scodi-customer/${customer}/server/features/ch.scodi.${customer}.server.feature/site.cquery'
    Since the variable "customer" is per default not available in the commands, I added the following to the "JVM arguments":
    -Dcustomer=${customer}
    This all used to work well, but now I updated the server and build environment from Java 1.7 32-Bit to Java 1.8 64-Bit. Since then I get the following error trying to build:
    java.io.FileNotFoundException: [Path to job]\source\scodi-customer\${customer}\server\features\ch.scodi.${customer}.server.feature\site.cquery (The system cannot find the path specified)
    Before the variable was resolved fine.
    Is this a buckminster or java8 problem, not being able to resolve the ${customer} variable? Is there maybe another (cleaner) way to pass the variable to the buckminster configuration?
    I did some further testing and added the following to the JVM arguments, I get the same exception referring to a missing ${customer}. It looks to me that JVM arguments are ignored.
    -Dcustomer=CUSTOMER

    Finally I found a workaround.
    I had to rename my "customer" variable to "CUSTOMER", now it is resolved in the buckminster command area:
    From:
    import '${WORKSPACE}/source/scodi-customer/${customer}/server/features/ch.scodi.${customer}.server.feature/site.cquery'
    To:
    import '${WORKSPACE}/source/scodi-customer/${CUSTOMER}/server/features/ch.scodi.${CUSTOMER}.server.feature/site.cquery'
    Also my JVM parameters from:
    -Dcustomer=${customer}
    To:
    -Dcustomer=${CUSTOMER}
    Found out the JVM parameters are not relevant to the buckminster command interface but are used later in "cspex" files.
    Running Jenkins on a Windows machine this might be the Problem...
    So the actual problem was the naming of the "Extended Choice Parameter", not being capitalized.

  • Default JVM arguments

    Hi
    I would like to know what are the default JVM arguments when server jvm is started without any additional flags, like this:
    java -server myapp
    I have been unable to find bullet proof document from those. I'm running Sun 1.5.0_08 on 32bit Win2003.
    I would espacially be interested on thread stack size, useTLAB?, xmx & xms...
    Br
    Draes

    Ah, yes - it is the defaults for MaxPermSize
    that are 32m for client and 64m for server.The default MaxPermSize is 64m for both client and
    server, at least in 1.4 and later releases.
    However, starting with 1.5, the default value for
    PermSize, which is the initial size of the
    permanent generation, is different: server is 16m,
    client is 8m in 1.5 and 12m in 1.6.Already from 1.4.2: http://java.sun.com/docs/hotspot/gc1.4.2/faq.html (FAQ #30)
    I do find it strange that I can find no mention of these changes in the release notes;
    http://java.sun.com/products/archive/j2se/1.4.0_04/ReleaseNotes.html
    http://java.sun.com/products/archive/j2se/1.4.1_07/ReleaseNotes.html

  • Setting jvm arguments

    Hello,
    I know there is a way to get jvm arguments from a java program using the java.lang.management.RuntimeMXBean.getInputArguments() method.
    But, is there a way to set them from a java program ?
    Would appreciate any help.

    For a web application, the JVM properties indeed need to be set for the application server's JVM and as such it cannot be set in the IDE. (The IDE cannot pass the parameters anyway since it merely invokes the commands provided by the appserver to start/stop/deploy-apps).
    To solve your problem, you will need to set the JVM arguments at the appserver. You can set the JVM arguments in the admin console of the appserver. If you jush wish to set some environment properties for a given webapp, then you can use 'System.setProperty("environment.setting","local");' in the app's initialization code.

  • White space in utl_mail arguments

    Hi,
    this is the command i am trying to execute
    begin
    utl_mail.send('PROD APPLICATION', '[email protected]', NULL, NULL, 'TEST', 'TEST');
    end;
    but i keep getting the error:
    ERROR at line 1:
    ORA-29279: SMTP permanent error: 501 5.5.4 Invalid arguments
    because i have a white space in the senders name.
    but the situation is, we need to have that white space.
    if we have to remove the white space then a lot of changes need to be done enterprise wide which is not feasible at all.
    is there any way around this problem.
    is there a way i can pass in the white space as a special or ascii character.
    if then can you please tell me how.
    Thanks in advance.
    Philip.

    'PROD APPLICATION' is not a valid email adress
    I'm not sure about the syntax, but try something like this:
    begin
    utl_mail.send('"PROD APPLICATION" <[email protected]>', '[email protected]', NULL, NULL, 'TEST', 'TEST');
    end;
    /

  • Adding JVM arguments programmatically

    Hi,
    I want to start my JVM without -Xdebug etc. arguments. E.g. java MyClass
    And on specific event it will programmatically (without restarting JVM) set the debug arguments and will be accessible for remote debugging. Is it possible and how?
    Thanks.

    Benzion wrote:
    I already explained. We want the Server to run without debug, to get best performance. And to be able to switch debug on and off when we need debugging. Without restarting the server.No, you didn't explain that at all. You just said you wanted to turn debug on and off. You didn't say why.
    Have you measured any kind of performance degradation with leaving it turned on all the time? I doubt there is any. It will just sit listening for a debugger to connect. If one doesn't, then no resources will be consumed (apart from one listening server socket).

  • Specifying log file as jvm argument not working

    I've long used the java.util.logging by having a logging.properties file and specifying the "java.util.logging.FileHandler.pattern" in that file and specifying the location of the logging.properties as a jmv arg (-Djava.util.logging.config.file=logging.properties). No issues with that.
    I now, however, want to override the file pattern by using a jvm arg (-Djava.util.logging.FileHandler.pattern=somename.log), but when I do that, I get no file log output. If I leave it specified in the logging.properties it uses the value there and NOT the jvm arg value. If I comment it out of the logging.properties file is uses nothing (no file output).
    I see (via Google) others using this parameter, but I am having no luck.
    All in latest JDK release (6u11).
    Can't find any documentation on doing this on Sun's site (it might be there, but I haven't been able to find it). Don't see posts of others having this problem. I've got the same results on linux and OSX, different releases and all.
    Thanks for any insight in advance!

    This is easy to do! Remember you can write things like
    ... ${user.home}...In your config file. So write something like:
    log4j.rootLogger=debug, R
    log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
    log4j.appender.R.File=${my.file}Then launch your app with:
    java ... -Dmy.file=goomba.txt ...

  • Where can I find a list of valid -X and -D JVM arguments?

    I just searched the web and Sun's site and came up with... Nuttin'! I only searched for a half hour but this is ridiculous! Where is it? Does anyone know?

    For -X arguments, type the command "java -X" to get a list.
    For -D arguments, check the API docs for the System.getProperties method.

  • Jar Manifest with JVM arguments

    It is possible to get VM argument from manifest, if it is, how to do ?
    if not how it possible to get VM argument in executable jar file ?
    Thanks all
    s@id

    Hi everybody,
    I happy, that I'm not the only one suffering from this limitation. Right now I'm writing a Java application which will be used not only by persons who have Java experience. I guess most of them wouldn't even know how else to start it than double-clicking on the jar-file. And in my opinion, that's perfectly alright! When starting an native executable, you also don't think about defining a maximum heap size and even non-developers can easily use these applications. But I don't what to start if native applications are better or not. I really love Java and I don't want to miss it, that's for sure.
    But I don't understand, why on the one hand Java tries to "sell itself" as a real alternative to native applications and one the see the intention to let Java applications more and more "feel" like them (e.g. with introduction of features like TrayBar support or making it easy to open/edit/... files with any application assigned to that file type), but on the other hand there is no official way to easily setup the environment to start these Java apps. I mean, you can use Applets or the WebStart facility for deployment, but that can't be the right way! I can think about so many applications which I would really like to have as a real offline tool. What is, if the PCs I want to use my app on don't have an internet connection?
    Ok, but to make a long story short, I'm really looking for any way to make it easy for the users of my application to "just use it" rather then telling them when how to increase the maximum heap size or which script they have to use to run it. And the only way I see right now is the idea of using a wrapper just for starting a new VM with additional parameters. Even this is a bad hack in my opinion, but I'll try if this is useful for me.
    Anyway, I hope that maybe someone already found a better solution cause I can't believe that this problem is really uncommon.
    If I find a better solution I'll let you know.
    Regards,
    Black Widow

  • Jvm argument to log exception stack trace?

    I am attempting to debug an application where the developers decided to catch the root exception and throw a generic application exception. Hence the original exception is lost. Is there any arguement that can be passed to the JVM during startup that would tell the JVM's exception handler to write the root exception to standard out?

    You should to fix the application.
    An application may produce exceptions in the normal running of the application. If the application is catching the exception, the JVM would not know which one you didn't want to catch it.
    You could try running the application in a debugger. In many debuggers you can trap on exception. As I my previous point you may need to get through a few irrelevant exceptions.
    Another option is to decompile (e.g. jad) the application main class (one class should be enough) Change it and run with the changed class. You will then see the exception.

  • JVM arguments

    Hi,
    I am using a pre-determined set of VM arguments where -Xmx was 500m. I am a bit skeptic about the 500m, would there be any problem of not using VM memory arguments which are not multiples of 256m(I am not sure if there is a word for memory sizes which are exact figures like 256, 512, 1k etc).
    Would there be any performance difference(big or small) between using 500m and 512m as the -xmX VM argument.
    Thank you very much,
    Amnesiac.

    1) You have allocated 500 MB. You use 296.
    2) You have allocated 512 MB. You use 296.
    Do you think there's a performance difference? :) There won't be unless your program's GC behavior accidentally leads to thrashing in that lat particular 12 MB, which is unlikely.
    The word you are looking for are "powers of 2" I think, by the way.

  • RefreshKrb5Config=true from command line JVM argument

    Can we set refreshKrb5Config=true from command line JVM argu,ent like we set java.security.krb5.conf using -D option ? We are not using jass config file.

    doubled the amount of code!If the code size is measured in the number of lines. More subtle size measurements are also conceivable.
    Once in the past we got a new boss who introduced an exact measurement for the programmers' efficiency based on the statistics taken from the cvs (Concurrent Versioning System) repository.
    Soon the colleagues began to comment out whole code blocks and reintroduce them instead of simply modifying them. Thus the number of the code lines changed by them skyrocketed.
    There was a nice guy there. During his studies, he used to be the system & network administrator at a hostel for students of the electrical engineering faculty at the technical university. We feel it must have been a nice job. We plain programmers used Linux as desktop OS, but he used Solaris: even good old Linux was not good enough for him. (Windows? Naturally out of question!) I put up a big fight with our chief until I persuaded him to allow the Exchange server's supporting the standard (non-proprietary) mailing protocols, so that we were able to use the mailing infrastructure from our Linux and his Solaris boxes albeit without the calendar functions.
    Well, this guy was an expert for difficult technical questions, he engineered the site-wide single-sign-on system etc. When he perused a piece of code, he shrank it by eliminating obsolete methods, by refactoring parallel ones etc. His measured output was negative...

  • Monitoring memory space in JVM

    anybody know about how i see the memory status in java virtual machine.
    is there any free software is available for that.
    helppping me

    thank u so much for answering my question. my problem is solved.
    but there is one more problem that is jconsole and visualvm is work
    under above the jdk1.4. then how i see the memory status in jdk1.4

Maybe you are looking for

  • Thumbnails & Preview filenames do not match Master filename

    Hi - can't find any threads regarding this... Basic problem is that Aperture is not renaming the Preview & Thumbnail filenames when it renames images on import - anyone else experiencing this problem? I have a managed Aperture Library (2.1.3). I rena

  • Report running for longer time

    Hi, I have a report in dashboard which does not stop running and the clock on it keeps on ticking. Please suggest what must be the possible reasons that this report is taking so much time to run . So I that I can backtrack it. Thanks.

  • Refurbished vs. Non Refurbished

    I see there is a Refurbished Apple LED Cinema Display (24" flat panel) for sale at $699. What's the problem with buying Refurbished compared with new? Also, what apple care do you buy for this? Thanks

  • Viewing D-Link videos on an iMac

    I am unable to view on my iMac or iPhone a video I recorded on a D-Link 933L camera.  Does anyone know what software will work?  I recorded the video on a pc.

  • ChaRM: Change status by means of tasklist

    Who knows how to change status of charm document by means of task list? Reason: I want to schedule some operation in task list and after its completing I want that status of my document will change. Please help me if you can...