Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-07-2008, 12:07 PM
Member
 
Join Date: Dec 2007
Posts: 16
Cazrin is on a distinguished road
Jar Files on Vista
Does anyone else have an issue with being able to just run (double-click) jar files on Windows Vista? For some reason it just won't work for me, I keep getting Main-Class not found errors etc. Although I'm not sure whether this is a 1.6.0 issue or a Vista issue, as I compiled the same program with the same Manifest file on version 1.5, and it runs fine on the computers at work (they haven't upgraded yet).

Just wondering if anyone could shed some light on this for me, cheers.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-07-2008, 12:10 PM
roots's Avatar
Moderator
 
Join Date: Jan 2008
Location: Dallas
Posts: 258
roots is on a distinguished road
Try searching if you could pass -jar argument to java.exe along with %1. Either through registry hack or some other method. It is definitely vista's problem
__________________
dont worry newbie, we got you covered.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 01-07-2008, 12:33 PM
Member
 
Join Date: Dec 2007
Posts: 16
Cazrin is on a distinguished road
Thought as much. I've just been creating batch files for each jar I've been wanting to run. Not the most ideal method but I guess it'll do for the time being.

The reason I wanted to know was just incase it was a problem with just my setup or if it was all vista installations. Students are mainly going to be using the program I've written, and no doubt they all got laptops (with vista installed) for christmas, and it sounds like it isn't going to run without this batch file
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 01-09-2008, 04:26 AM
rpwtdj's Avatar
Member
 
Join Date: Dec 2007
Posts: 15
rpwtdj is on a distinguished road
Send a message via MSN to rpwtdj
You need to associate the .jar files with the javaw.exe.
Such as you associate the .jpg files with ACDSee.
When next time you double-click the jar file, Vista will use javaw.exe to open the file, and your app will be launched!
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 01-09-2008, 07:19 PM
Member
 
Join Date: Dec 2007
Posts: 16
Cazrin is on a distinguished road
Nope won't work. Generates "Could not find the Main Class" whereas if I use the batch file it works fine.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing to files within jar files erhart Advanced Java 0 02-04-2008 03:50 AM
Text and image files within jar files erhart Advanced Java 8 01-19-2008 05:43 AM
how to convert mpeg files to .wav files christina New To Java 1 08-06-2007 05:14 AM
convert xls files into pdf files bbq New To Java 3 07-20-2007 04:56 AM
War Files thauber New To Java 0 07-16-2007 07:57 PM


All times are GMT +3. The time now is 01:03 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org