Forum Stats

  • 3,838,748 Users
  • 2,262,397 Discussions
  • 7,900,749 Comments

Discussions

PROBLEM INSTALLING .EXE FILE VIA JAVA

3830351
3830351 Member Posts: 1
edited Nov 13, 2018 11:25AM in Java Programming

I downloaded a .exe file that needs to run via java but despite having both jdk and jre v1.7.0_80 installed in my windows 7 32-bit  pc, I am always being directed to install java again. What  could  be  wong  and how  do  I  rectify this, please?

Answers

  • Unknown
    edited Nov 13, 2018 11:25AM
    I downloaded a .exe file that needs to run via java

    What does 'run via java' mean to you?

    Java can launch external programs by using the ProcessBuilder API

    https://docs.oracle.com/javase/8/docs/api/java/lang/ProcessBuilder.html

    See the example in the doc

     but despite having both jdk and jre v1.7.0_80 installed in my windows 7 32-bit pc, I am always being directed to install java again.

    Sorry - but that makes no sense and doesn't appear to relate at all to the 'run via java' question you ask.

    Java itself (the java.exe) runs when you launch it from the os. Your own Java app will run when you launch Java and specify a class with a main method or a jar file whose manifest specifies a class with a main method.

    An external app won't get launched by your Java app unless you included code (e.g. using ProcessBuilder) to launch it.

    A launched app is NOT going to 'direct' you to install Java again unless it is coded to do that - for example because it needs a DIFFERENT version of Java than what you have.

    So, depending on which of the above scenarios you have, you need to contact the exe developers and find out what version of Java is needed and ask them for help.

    To get help here you need to SHOW US:

    1. WHAT you do

    2. HOW you do it

    3. WHAT results you get