Results 1 to 8 of 8
Thread: referencing files in .exe
- 07-24-2010, 06:01 PM #1
Member
- Join Date
- Jul 2010
- Posts
- 21
- Rep Power
- 0
referencing files in .exe
With a current project, I am using scanners and filewriters on, text files, and I am opening wav files, gif files, and batch files all in the same folder. It has been working, but I made a jar, and then a .exe file from the jar. The text files work fine, but the gif, batch, and wave files are not being opened. Any help would be appreciated.
Thanks.
- 07-24-2010, 10:40 PM #2
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,606
- Rep Power
- 5
Are the files within the jar, or in the same folder as the exe? How are you opening the files? Code helps
- 07-24-2010, 10:59 PM #3
What does that do to the classpath?then a .exe file from the jar
What remains of the JVM when a jar is made into a .exe?
- 07-24-2010, 11:41 PM #4
Member
- Join Date
- Jul 2010
- Posts
- 21
- Rep Power
- 0
I actually figured out what the problem was. Basically, I was referencing things like "blah.txt". If I have a folder with my exe file in it, it cant find blah.txt, so I had to put all the other stuff outside the exe.
- 07-26-2010, 10:05 AM #5
Moderator
- Join Date
- Apr 2009
- Posts
- 10,460
- Rep Power
- 16
Another reason not to create an exe.
- 07-26-2010, 08:18 PM #6
Member
- Join Date
- Jul 2010
- Posts
- 21
- Rep Power
- 0
Actually, I needed to. I didnt know how to make a jar file that would execute with a click. My brother is autistic, and his school (of like 15) couldnt find a timer to use, and they needed a simple click file, so I made a exe. I ended up making an installer out of it so that the files all downloaded correctly.
- 07-26-2010, 08:27 PM #7
That's a OS thing. I have all my jar files start with a double click. I think there is an OS setting that will start/execute a program with a single click vs a double click.make a jar file that would execute with a click
Also you can create shortcuts with a command-line to start the execution of a jar file.
I'm on WinXP. I'm sure it can also be done on linux. Don't know about the Mac
- 07-26-2010, 08:28 PM #8
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,401
- Blog Entries
- 7
- Rep Power
- 17
When/if you find the time, read up on MANIFEST.MF; it's a small file in your .jar that tells the JVM what class is supposed to start your application and a lot more. Associate the .jar extension with the javaw command and you're in business; there's no need for those .exe files.
kind regards,
Jos
Similar Threads
-
Using weak referencing to gc listeners.
By MartinR in forum New To JavaReplies: 0Last Post: 05-29-2010, 11:37 PM -
Referencing Image Locations within Eclipse
By haroldjclements in forum EclipseReplies: 0Last Post: 03-23-2009, 02:34 PM -
Referencing a collection size in JSTL
By jfputnam in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 10-08-2008, 04:02 PM -
[SOLVED] Referencing Variable within Loop
By Judoon_Platoon in forum Java AppletsReplies: 2Last Post: 05-22-2008, 11:54 AM -
Referencing JPanel Class
By uncopywritable in forum New To JavaReplies: 2Last Post: 08-12-2007, 01:31 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks