Problem starting java program with windows

0

Important explanations:

  • I have an application created in JAVA;
  • An "EXE" executable was created using Launch4J;
  • I need to run this application after windows startup.

FIRST ATTEMPT

A shortcut has been created in C:\Users\Elfab\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

This option was not effective with my application.

SECOND TRY

An entry has been created in the windows logs in the keys below

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

PROBLEM

The above options were not efficient, but with other applications this method proved to be efficient. The program does not start and does not generate error LOG

QUESTION

  • Are there other ways to make an application start with windows?
  • Java programs need the JVM to work, can this be a JVM dependency problem? can the JVM not start before trying to open my java application?
  • If the dependency problem exists, is there any way to start the application only after the JVM has its dependencies initialized?
  • asked by anonymous 05.05.2016 / 22:19

    1 answer

    3

    Are there other ways to make an application start with windows?

    The most indicated way to do this in Windows is to use Task Scheduler, it has a command-line application (Schtasks.exe ) that allows you to create and remove tasks, and they can be scheduled to start at startup, just your application, or installer, run the command with the arguments you need.

    Java programs need the JVM to work, can this be a JVM dependency problem? can the JVM not start before trying to open my java application?

    Normally not, when a Java application starts it loads the JVM, you do not have to start the JVM before. But I do not know if there is anything different in case of using Launch4J

    If the dependency problem exists, is there any way to start the application only after the JVM has its dependencies initialized?

    See the previous answer, it should not be necessary to start Java before running an application.

        
    05.05.2016 / 23:40