Results 1 to 2 of 2
Thread: .jar wont run?
- 06-30-2011, 07:11 AM #1
Member
- Join Date
- Jun 2011
- Posts
- 21
- Rep Power
- 0
.jar wont run?
Hey all,
I'm having a problem running a .jar under Mac that I wrote. There's a dialog that pops up and the dialog says to check the console. The console says I don't have permission to open that file. Do I need to include something else in the code? Here it is:
Java Code:import java.util.Scanner; public class apples { public static void main(String[] args) { Scanner myScanner = new Scanner(System.in); String first,last,yorn; System.out.println("What's your first name?"); first = myScanner.nextLine(); System.out.println("What's your last name?"); last = myScanner.nextLine(); System.out.println("Really? Your name is " + first + " " + last + "?"); System.out.println("Do you like your name? PRESS Y/N"); yorn = myScanner.nextLine(); if (yorn.equals("y")) System.out.println("Really? Dang. I wouldn't."); else{ System.out.println("Tough luck!"); } } }
- 06-30-2011, 10:11 AM #2
First can you explain how you make this jar? I think you know that you need make special run JAR, There you can read about it. Running JAR-Packaged Software (The Java™ Tutorials > Deployment > Packaging Programs in JAR Files)
Skype: petrarsentev
http://TrackStudio.com
Similar Threads
-
wont print zero
By jjth39347 in forum New To JavaReplies: 16Last Post: 03-27-2011, 01:35 AM -
Able to compile OK, But wont run..Help
By subiedude101 in forum New To JavaReplies: 2Last Post: 02-20-2011, 08:37 PM -
Why wont this compile?
By Student101 in forum New To JavaReplies: 8Last Post: 11-18-2010, 05:33 AM -
wont validate
By karq in forum XMLReplies: 1Last Post: 10-07-2010, 05:33 PM -
why wont it compile
By bje98f in forum Advanced JavaReplies: 1Last Post: 04-23-2009, 10:55 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks