Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

how can i know the JVM is already installed on my computer ?

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello !
how can i know the JVM is already installed on my computer ?
thank you !
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which OS ?
for Windows you can find out in Add Remove Program, or by simpally typing java or javac on Command window.
for MAC check for Library/Java/Home/ **** folder.
cheers
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can search for a file named javac.exe
 
Hiep Nguyen
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks you for your advices!!!
last time i don't tell detaily my request. i use Window OS, now i want to know how an Application can know that my computer is installed JVM or not?
thank you !!!
 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how can javac.exe ensure that JVM is installed on the machine?
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if u type javac at command promt it must display the javac options,then only we confirm that JVM is installed
 
Gaurav Mac Mathur
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let me rephrase the Original Question by HN.
what he intend to ask is how a Application he is developing "Possibally in Java" Get access to the local sytem and determine if JVM is good and working on the machine.
I dont have any Solid Answer for this, but you can access teh CLASSPATH using teh System class and see if JDK_HOME is set there. ( _This is not the best/fool proof way_ )
Cheers
 
bharat nagpal
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
javac is java compiler. I don't think checking the javac will ensure this.
and It's not that JAVA_HOME is always there.
As far as I know in windows you can check this entry in registry.
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This seems like a "chicken before the egg" question since the JVM must be installed before your Java application can run. In order to to ensure that the JVM is installed before a user runs the application you wrote you should use an installation tool. These kinds of tools can make sure the correct components are installed for your application. I see many Java-based programs that use Install Anywhere. There are probably others as well, but I am not familiar with them.
If a JVM is already installed, these tools can also detect if it is the correct version. Alternatively, there is probably a way to check the version once your program is running. As stated earlier, this still requires some version of the JVM to be installed already.
reply
    Bookmark Topic Watch Topic
  • New Topic