File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes JRE specified for JAR's Application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JRE specified for JAR Watch "JRE specified for JAR New topic
Author

JRE specified for JAR's Application

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

I wrote some help desk software for my department. For distribution purposes, I copied the JRE folder onto one of our servers along with the JAR file and created a batch file that runs the JAR file using that specific JRE because we run some other legacy applets that are not complient with Sun's jdk1.4. (MS crap).
What I am wondering is if there is anyway, be it with the menifest file or whatever, to control which JRE is used when simply double clicking on the JAR file. As of right now, it will use the JRE installed on the local machine (if there is one).


GenRocket - A Test Data Generation Platform
John Dale
Ranch Hand

Joined: Feb 22, 2001
Posts: 399
If you are talking about Windows, what program (e.g., javaw.exe, jview.exe, etc.) is run when you double-click a JAR file is determined by the Windows configuration. For instance, for Windows NT, go to Windows NT Explorer, and View - Folder Options - File Types. Look for the file type configured for JAR, perhaps Executable JAR File.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

I had thought about that, but I was hoping that I could do it with something contained in the JAR file because I don't want to have to set something on every PC that runs it. I know that I am probably wanting something that doesn't exist, but it was worth a post.
Thanks
John Dale
Ranch Hand

Joined: Feb 22, 2001
Posts: 399
There are some install program systems, such as InstallShield Multi-Platform, I think it is called, that can install the JRE of your choice with your application.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JRE specified for JAR's Application
 
Similar Threads
Putting a java.[...].class in a JAR for browser
ImageIO installer
EXE in Java?
package,classpath and servlet
Regarding Jar File