How to package a java code with batch file in it to be shipped to the users?

I have java project that creates a GUI. I would like to package this project to ship to the users.

Aside from the java code, I also have a batch file which java calls. So it also needs to be in the package.

How can I package this to be shipped to the users?

Thanks,
TolgarAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
I would try to avoid installers if possibe. You should be able to use Java Web Start and then download the script from the originating host. Save it to java.io.tmpdir and then you can run it
0
TolgarAuthor Commented:
Is there good doc you can recommend?
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

TolgarAuthor Commented:
@cehj: I have two questions about java web start:

1- Is it free? Or do I need to pay for it?

2- Am I going to have to use my client side java application on the browser? Because if so, this may not work for me. The reason is my java application needs to be able to read and write files on the user's machine?

If these two are not problems, can you please help me how I will do it. Because the example in the link was not very clear.

Thanks,
0
CEHJCommented:
1- Is it free? Or do I need to pay for it?
Free

2- Am I going to have to use my client side java application on the browser? Because if so, this may not work for me. The reason is my java application needs to be able to read and write files on the user's machine?
The code will need to be signed, which isn't really a big problem
You will need to place the code on a web server, which you would of course normally do for most other kinds of deployment
0
TolgarAuthor Commented:
@CEHJ: What do you mean by "signed"? And I am not very sure if this is really going to work for me. Because, if it will be on a web server then it will not be a client side application. I am wondering that this may cause problem as I mentioned before. Because, then the user will use the tool on the browser and this will limit some of the critical read/write functionality in the application.

For the long term, if the limitations that I am talking about are not valid, I can think about it. For now, I would like to create an executable file and I will ship it to the customers. This will be a pilot. So it is not a big deal. But later, I would like to consider this approach, as I said if the limitations that I talked about does not exist.

So, at this point, can you recommend me a way to create one executable file or something else that the user can just run to start the application?
0
CEHJCommented:
Because, if it will be on a web server then it will not be a client side application.
It will. The app runs on the client

http://docs.oracle.com/javase/tutorial/security/toolsign/

I could help with deploying it all once it's finally built but it would have to be on a professional basis (see my profile)
0
TolgarAuthor Commented:
I will consider this option but is there more simple option? As I said something like creating one executable.

Thanks,
0
CEHJCommented:
You'd then need an installer. I don't know anything about installers in Java. I've never been interested since the free ones are often too basic and installers defeat the cross-platform purpose of Java
0
TolgarAuthor Commented:
I see. I think I will use IzPack and PackJacket for now. But I will consider Java Web Start for the long term.

Thanks,
0
CEHJCommented:
OK. I think i might have some JWS executor code somewhere, so i could try to dig it out
0
TolgarAuthor Commented:
oh, Thanks. That would be great!
0
CEHJCommented:
Try running http://technojeeves.com/jws/shrun/shrunner.jnlp

It will run a script listing the current directory (batch on Windows, shell script on *nix)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CEHJCommented:
:)

So you see - no need for installers ;)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.