• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

VM arguments

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To run my program,I have to give some VM arguments (I am using WSAD to run the program).

The file path that I have my project in is C:\Documents and Settings\My Documents\.....
I cannot change this path because of access rights issues.
The problem when I am using this path is, I am getting an error saying
"No classdef found: and", and I think its because there shouldnt be a space in the folder name.
Is there any escape character or any other work around for this?
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In most cases in Java, you can use the "Unix" syntax. So one possibility is something like "C:/Program Files/MySystem/myfile" (quotes required) or "C:/Program\ Files/MySystem/myfile".

More commonly, what you do is find the alias 8.3 version of the offending component, which gives you something like "C:/PROGRA~1/MySystem/myfile", or, if you insist: "C:\PROGRA~1/MySystem/myfile". Real pedants wil note that "MySystem" isn't a valid 8.3 construct either and should thus also be subbed, but it really doesn't matter there, since there's no spaces and Java is OK with long and funny names - it's only the command-line parser that gives the problems.

"Program Files" isn't ALWAYS named PROGRA~1, BTW. The algorithm is a bit of first-come-first served and varies slightly between versions of windows. In XP, the "/X" option of the DIR command is one way to find the right name.
 
Yes, of course, and I accept that blame. In fact, i covet that blame. As does this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic