Embedding Executable (.exe) files into php [closed] - java

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
Basically I want to embed the executable file of "Catacomb Snatch" [new Mojang game] into my html webpage. I've looked around but I can't seem to find much information on this.
If it would make it easier I could even us a mixture of php[instead of html] and an exe [instead of java]to actually get it to work on my page.
What is the simplest way to embed the jar or exe file into a html or php page?
Information much appreciated.

An .exe file is a windows executable file. This means your website won't be able to run it, except if it is a windows server.
In case of a windows server, PHP will still not be able to run an .exe file. PHP can run shell commando's, as stated in the php manual with shell_exec, which can run the .exe file. This will only execute the file on the server tho. Embedding an .exe file is impossible, except if you mean to make it a download.
If you wish make the .exe a download, this answer on stack overflow describes perfectly how to do that.
To run a jar file on your website, you can use a java applet, which would the the simplest way.
Applet tags are not supported in HTML5

Related

How can I make project in java [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 months ago.
Improve this question
We have to do java project like a management system and we have source code but the question is how to run it and where? anyone knows?
Queries
IDE
How to run it?
If you already have the source code,
Open a command prompt window then cd to the directory where you saved the java program.
For example, JavaProgram.java is in C:/
Type 'javac JavaProgram.java' and enter to compile your code.
Now type 'java JavaProgram' to run your program.
You will be able to see the result printed on the window.
Good luck :)
we have source code
You'll need to compile it.
Then you need to execute it. That could involve web containers with WAR or standalone, executable Java JARs, or directly execute a class file. Without seeing your code it's hard to answer that, but you wouldn't use an IDE to actually deploy/run your code outside of individual development.
You'll also need some server to run it on. That's not unique to Java.
Regarding the original question: "Make a project" - you could use Maven Archetypes or Spring and Quarkus have project starter websites, for example...

Is is possible to distribute java Desktop application which uses executables generated using C? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I am developing a Java Desktop application which runs a shell script. This script is supposed to run an executable generated using C.The executable which my C code has generated is dependent on shared libraries.
I don't want to include the C code in the Application. Hence I won't be able to generate a new executable on client's PC when I wish to distribute it. As I have read, the object code as well as the executable are machine dependent and therefore I won't be able to run this executable (generated by compiling and linking on my machine) on my client's machine having different hardware configurations.
Right now I have included only the executable in JAR and I am able to run the shell script in Java (using Runtime.getRuntime().exec(shell_script) in Java). As I have said earlier, this executable is dependent on shared libraries and when the software(executing the script) is run on different PC,it reports an error saying that one of the shared libraries is missing.
I want a suggestion on how to run an executable which is compiled and linked on different machine and which is dependent on shared libraries in a desktop application(which needs to be distributed).
Please comment if I am going wrong anywhere or if you feel that I have misunderstood any concept.
Thanks in advance.
Compile your C code into a different executable for every supported
OS and put them all into your JAR file.
Detect the current OS from your Java application and extract the proper executable for that OS from your JAR file.
Run the extracted executable.

Java web application build procedure beginner using LAMP [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I need to learn java programming, I have a LAMP server running and i need to build a webapplication(dynamic website). I have planned to use HTML, CSS, JS and Java for server side scripting instead of PHP using eclipse IDE.
My question is does the above thing work out and also if i want to deploy the files do i need to send the files to /var/www/html/ or any other method of deployment is there ?
Your question is weird, but yes, you can make a application with Java for the server side, read about JSP. And the files folder depends on the local server you're using , though most of the time for unix thats the right folder.
Good luck , I think you research a lot.
Edit: I was about to edit this for the LAMP definition, LAMP stands for Linux, Apache, MySQL and PHP... So you're not technically using that..

C# pack.xz garbage after end of pack archive [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
I have a C# program that should download a file from the internet and extract it.
The file is a .pack.xz file, i have no problem extracting the .xz, i tried even manually checking the checksum of the file and it was downloaded correctly.
For instance, one of the files i have to download is this:
http://files.minecraftforge.net/maven/com/typesafe/akka/akka-actor_2.11/2.3.3/akka-actor_2.11-2.3.3.jar.pack.xz
I downloaded it from the browser, then extracted the .xz part with 7zip and it was ok. Now i have a .pack file, i tried to unpack it with Java's unpack200 but it says me "garbage after end of pack archive".
It extracts the file anyway but it's corrupted infact if i open it with winrar it says unexpected end of archive. The jar file i extracted was 2,350,874 bytes while it should have been 2,553,197 bytes.
I really don't know how to solve it. I even checked some online programs but they seems to do the same thing i do the same way i do it so i can't figure out what's the problem
As a workaround, you can grab this JAR from a different Maven repository, such as the Central Repository (which has this specific JAR and a bunch of newer versions). See this search to find all the versions. The older version in your original link is on the second page of this search (although it may be less functional or less secure than the latest version).

How to make a standalone application in java [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I use eclipse to run my java code, but I want to make an application that won't use eclipse to run. I want to make it work as a portable stand alone application that only uses the libraries I need.
Right click on Projectfolder (in Eclipse) -> Export -> Java -> runnable JAR -> choose class with main method. Done ;)
I'm going to assume you mean to create a .exe file. for this you'll need a .jar file.
I'm not familiar with Eclipse I know that Netbeans makes the .jar file automatically once the code is compiled.
(For Netbeans)
This .jar file can be found in the dist folder. In case there is none see here to fix that.
In case Eclipse puts into a different folder I'd just look in all the folders related to the project until you find a file with a .jar extension.
Once you have the .jar file you'll need to run an application to change it from .jar to .exe , I would recommend Launch4j.
Here's a handy tutorial to help you with that application if you get stuck.
I know this isn't exactly the answer you're looking for but it's close! Hope this helps!

Categories

Resources