• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Environment variables (Win 2K)

 
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
I am creating an installer for a Java application. I have to set the environment variables as part of creating the installer. I am facing a problem and need some suggestions.
I am using Win 2K Professional Edition (SP4).
If I install my application in following directory:
C:\myfolder\myapp
and set
myapp_home=C:\myfolder\myapp
then, everything works fine and my application runs.
But if I install it in:
C:\my folder\myapp (Please note the space in "my folder")
and set
myapp_home=C:\my folder\myapp (Please note the space in "my folder")
then my application is installed but does not run. I get the following JVM Launcher error message: "Could not find main class. Program will exit".
Basically I want to install my application in
C:\Program Files\myapp (Please note the space in "Program Files")
So the important point here is that if there is a space in the path (while setting environment variable), then my application does not run. If there is no space then it runs.
I've spent quite afew hours trying to figure out the exact problem & its solution but my efforts have gone in vain. Your valuable suggestions are welcomed.
Danish
[ February 19, 2004: Message edited by: Danish Shaukat ]
[ February 19, 2004: Message edited by: Danish Shaukat ]
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try puttinbg quotes around your path
myapp_home="C:\my folder\myapp"
 
Danish Shaukat
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Gregg !
I've tried the following:
myapp_home="C:\my folder\myapp"
myapp_home=C:\my folder\myapp
As I mentioned, I actually want to install it in C:\Program Files\myapp. So I've tried all the following:
myapp_home=C:\Progra~1\myapp
myapp_home=C:\Program files\myapp
myapp_home="C:\Program files\myapp"
myapp_home=%ProgramFiles%\myapp
Nothing works
Any other suggestion...
Danish
 
Ranch Hand
Posts: 4716
9
Scala Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hmmm...i would have expected myapp_home="C:\Program files\myapp"
to work. i would have thought myapp_home=C:\Progra~1\myapp
would work as well
 
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
see this link it it can help you.
http://www.ss64.com/ntsyntax/esc.html
 
Watchya got in that poodle gun? Anything for me? Or this tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic