Alex Rivera | Logout

Run exe which is packaged inside jar file

Asked 2009-03-01T17:31:35.553
31

I am executing an exe through my java program. The path is hardcoded in Java.

I have packaged my the exe in the jar.

But am stuck as I have the path name hardcoded in the Java file, so I am not able to execute my jar as a stand alone program.

Any hints for packaging such jar i.e having an exe inside and able to run it as a stand alone program?

Edit
Report

1 Answer

2

Use

getClass().getResource(what).openStream()

and copy to another file in the disk.

answered 2013-02-08T13:37:40.463

Your Answer