• 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
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

JAVA_HOME variable is not working correctrly in batch file.

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I have installed two versions of java in my machine, say c:\jdk1.5 and
c:\program files\jdk1.4.


I would like to invoke appropriate java interpreter by setting
JAVA_HOME variable. For that I have written a batch file, but it
doesn't work correctly.



A is the Java class file.

If I set JAVA_HOME=c:\jdk1.5, the above code works fine.
If I set JAVA_HOME=c:\program files\jdk1.4, produces error.

I think the problem is the space between program and files.
Help me to resolve this problem.

Thanks in advance,
Kaarthick.R
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not an advanced question. Please don't post the same question in more than one forum.
 
reply
    Bookmark Topic Watch Topic
  • New Topic