• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 213
  • Last Modified:

Creating CGI exe

How do I create an executable CGI in linux?
I'm using the Apache web server and I write the CGI in Java.
I want the exe to include the class and the virtual machine.
  • 2
1 Solution
Cut and paste the follwing into a file, e.g. YourClass, and then give it executable permissions:

chmod u+x YourClass

Make sure the owner of the file is allowed to execute cgi programs (look at webserver conf to see what user)


java YourClass.class $@
Sorry to answer all three questions. I guess there was a mistake and you didn't really want to offer 150 points!

Have you considered using servlets and the Apache jserv module.

Servlets will do the same things as CGI but, without going into details, are a lot faster, efficient and powerful. CGI is dead with the advent of servlets, especially in the Java language.

Have a look at www.servlets.com to find out more,


Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now