I have an exe and with java I need to make it starts at Windows Startup.I tried copying the exe in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp but I don't know if it is correct. What is the code to do that?
Related
I have created a java program (in Eclipse). I have successfully compiled it to a .jar file which I can run on windows without any problems. I want to give this program to a friend who has a MacOSX. So my aim is to:
Create a file which can be run on MacOSX
The twist is that I have to configure it on my Windows computer since I don't have access to a Mac. Any advice would be of great help!
I am not sure what you are referring as "create a file which can be run on macOSX"
If you want to run on any OS you just need a JRE on that particular system without it you cant run. It will provide a runtime environment to run a jar file. Then use below command to run the jar.
java -jar Myjar_file.jar
I have tried the following:
in terminal it works
In Intellij it works
I have tried to launch it with javaw.exe but nothing changes
Are there any other options?
This looks like an OS problem that an application building one -- because you said that it works in your IDE and terminal.
Make sure that you installed Java properly in your machine.
In Windows/MacOs, after installing Java, the *.jar files are automatically associated with the java -jar command and makes it runnable via double-click.
In linux, this varies on the flavour or DE you are using. But there's probably a utility in your OS to open *.jar files using java -jar command.
I have a Java application from one of our suppliers. After installing the application as Admin, I try to open the application as Admin, but nothing happens. I have gone to where the program icon points to, and it goes to a Javaw.exe file:
"C:\Program Files (x86)\Infra12\jre\bin\javaw.exe" -jar Infra12.jar
If I run this Javaw.exe file directly as Admin, nothing still happens. By nothing, I mean there are no windows that open at all.
I have run sfc /scannow and it found nothing.
I didn't have Java itself installed, so I thought maybe that was the issue. So I installed Java (Java 8 Update 191), uninstalled the Java application then reinstalled it, still nothing happens when I try to open it.
I can't go back to the supplier, as they don't support the software any more - it is used to communicate with infrastructure equipment.
Any ideas how I can get this application to work?
Edit
Not sure if this makes a difference, seems to refer to some variables - maybe that can help with opening it?
This is because javaw points to the Java Virtual Machine. If you want to run the application - find the .jar it uses and then double-click that. Or use javaw to run said application:
[WIN] + [R]
Type "cmd"
Enter: javaw -jar path-to-your-jar-file
javaw by itself will do nothing.
EDIT: You need to use the -jar option.
I am trying to make a .exe file from a .jar file, and it is working fine. My only problem is that when trying to run it on another computer that I didn't make it on, Windows SmartScreen says it's an unknown app and blocks it from running. I am running Windows 10. Any ideas?
Thanks!
What the title says really. I've tried exporting it to a Runnable Jar File, checked the Manifest.MF, and tried running it with Java multiple times but with no luck. However, it does work when I navigate to the file using the command prompt and launch is using java -jar Name.jar. This shows it works but I just can't get it to launch by double clicking.
I guess you're trying to launch a commandline-app. This kind of application can be launched by double-clicking aswell. There's only one problem: Java doesn't create a commandline-window by default and instead uses the commandline of the parent-process of the JVM, which in case of double-clicking doesn't own a console-window. In other words: the output to the console gets lost somewhere in the depths of your OS and the JVM and the program hangs as soon as any input is expected.
(Assuming your on Windows OS), if you right-click on it, do you see the option 'Open with' and then 'Java (TM) Platform SE binary', or something like that? And if you opt to open with that, does it execute?
If so, then you've probably set .jar files to open with a different application by default. For example, I have my computer set up to open .jar files with jd gui as the default application.