Meaningless Drivel is fun!*
The moose likes Distributed Java and the fly likes Urgent : Java Executable in Windows and Linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Urgent : Java Executable in Windows and Linux" Watch "Urgent : Java Executable in Windows and Linux" New topic
Author

Urgent : Java Executable in Windows and Linux

madhankumar kumaravelu
Greenhorn

Joined: Nov 30, 2011
Posts: 17

Hello

I have to deliver a pilot applicationfor a java project involving Struts, Hibernate, SFTP for encrypted file transfer,GNU Privacy Guard (GPG) for Decryption/Encryption
and postgre. This has to be executed in either Windows/Linux environment.

The client wants the executable file of this application which should run in both windows and linux.

I have to send an executable file to my client by friday (this week).

Please suggest me how to do this.

Thanks
Madhan
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3418
    
  12
With a requirement as vague as that, this is about the best I can come up with.

1. Learn java, Struts, Hibernate, SFTP for encrypted file transfer,GNU Privacy Guard (GPG) for Decryption/Encryption and postgre
2. Write code.
3. Create executable jar file.
4. Test
5. Repeat 2, 3 and 4 until program works
6. Package jar file and any required third party stuff
7. Send to client.

Joanne
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
How would an executable file that contains a web app work? Should the double-clickable app start up an embedded servlet container that can then be used to serve the web app? Certainly doable, even in a cross-platform compatible way, although rather unconventional.

What's more, GPG is native code - have you figured out yet how to use that as part of a web app?

You didn't say how far along you are in this project, but if a question this fundamental (about how to deploy your app) comes up only now I very much doubt that it's going to happen until Friday.
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
madhankumar kumaravelu wrote:
Hello

I have to deliver a pilot applicationfor a java project involving Struts, Hibernate, SFTP for encrypted file transfer,GNU Privacy Guard (GPG) for Decryption/Encryption
and postgre. This has to be executed in either Windows/Linux environment.

The client wants the executable file of this application which should run in both windows and linux.

I have to send an executable file to my client by friday (this week).

Please suggest me how to do this.

Thanks
Madhan


When I first read "I have to deliver a pilot application", i thought if it rocket science being discussed, then I read the word "java" I sighed... I continued reading, and by the time it came to "by friday (this week)."...

Madhan Ease up.


Keep Smiling Always — My life is smoother when running silent. -paul
[FAQs] [Certification Guides] [The Linux Documentation Project]
madhankumar kumaravelu
Greenhorn

Joined: Nov 30, 2011
Posts: 17

I want to know only how to create an executable jar file in linux/windows and

whether it can contain all the technical stuffs i have mentioned.

Obviously i cannot be in a position to start coding now and deliver by friday.

Implementation and testing are done.

Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
So this is a web app, then? How did you envision running a web app from within a jar file? How did you test it if you don't know how to deploy it?
Akhilesh Trivedi
Ranch Hand

Joined: Jun 22, 2005
Posts: 1526
madhankumar kumaravelu wrote:
I want to know only how to create an executable jar file in linux/windows and

whether it can contain all the technical stuffs i have mentioned.

Obviously i cannot be in a position to start coding now and deliver by friday.

Implementation and testing are done.



You can always create a jar that runs both on windows and linux. That is why Java is platform independent. But you are looking for jar or war, and if implementation and testing are done, then what is pending?
madhankumar kumaravelu
Greenhorn

Joined: Nov 30, 2011
Posts: 17
Actually, i have implemented and tested with the Eclipse IDE.

1)

I want to know the command that will create jar file.

The client should only double click it and the application should run.

2)

The created jar file can only contain the souce code.
The client should have the same environment (e.g. postgre installed) to execute it?


Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
The client should have the same environment (e.g. postgre installed) to execute it?

Since the app apparently requires a servlet container and a DB, yes, the user will need those. You can substitute the servlet container by starting up an embedded one in the double-clickable jar file. As to the DB, you could embed something like HSQLDB or Derby in your app as well. Native-code DBs like Postgres or Mysql are pretty much out of the question, unless you expect the users to be able and willing to install non-trivial software on their machines.

The created jar file can only contain the souce code.

Um, what? Why would you want to ship source code? And how do you expect to run the app if you ship *only* source code? What would there be to execute?
madhankumar kumaravelu
Greenhorn

Joined: Nov 30, 2011
Posts: 17
Source code means the class files in the jar file.


You can substitute the servlet container by starting up an embedded one in the double-clickable jar file.


Can you detail the above comment?
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Source code means the class files in the jar file.

Class files are not source code, they're executable code.

You can substitute the servlet container by starting up an embedded one in the double-clickable jar file.


Can you detail the above comment?
This may be a start: http://java.dzone.com/articles/embedded-tomcat-minimal. The Tomcat documentation probably has more about this.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Urgent : Java Executable in Windows and Linux
 
Similar Threads
How to deploy a GUI Swing application?
Looking for wrapper/installer for all platforms
running a .exe from JAVA on Linux
Platform Independent Command Line
How to run a commandline command from a java program