public class Assign8
{
public static void main(String[] args) throws IOException
{
String s1 = ("George");
String s2 = ("Meghabghab");
String s3 = s1.concat(s2);
System.out.println(s3);
String s4 = s2.substring(6);
System.out.println(s4);
String s5 = s2.substring(0, 2);
System.out.println(s5);
String s6 = s5.concat(s4.concat(s4));
System.out.println(s6);
boolean bool1 = (s2.equals(s6));
System.out.println(bool1);
String s7 = s1.substring(0, 1) + s2.substring(0, 1);
System.out.println(s7);
String s8 = new StringBuffer(s1).reverse().toString();
System.out.println(s8);
String s9 = new StringBuffer(s2).reverse().toString();
System.out.println(s9);
String s10 = s8.concat(s9);
System.out.println(s10);
}
}
Main method to create an executable
Page 1 of 13 Replies - 3822 Views - Last Post: 09 December 2012 - 07:00 PM
#1
Main method to create an executable
Posted 08 December 2012 - 09:06 AM
I have the code written for my last assignment.However, his instructions mention, "The file will contain a main() method which makes it an executable file." I've reviewed our material and found no references about using the main() method to make an executable. Can someone point me in the right direction on this? Below, you'll find my code so far.
Replies To: Main method to create an executable
#2
Re: Main method to create an executable
Posted 08 December 2012 - 09:13 AM
I believe the main() method you have complies with the instructions, at least as you've given them to us. I don't think the instructor meant an executable file as in an .exe file, but rather that the file could be compiled and run as a .class file.
#3
Re: Main method to create an executable
Posted 08 December 2012 - 09:18 AM
Quote
I don't think the instructor meant an executable file as in an .exe file, but rather that the file could be compiled and run as a .class file.
This post has been edited by g00se: 08 December 2012 - 09:19 AM
Reason for edit:: typo
#4
Re: Main method to create an executable
Posted 09 December 2012 - 07:00 PM
EXE4J expects a .jar as input
this .jar should contain:
- all the .classes of your application
- all the .classes of all the librairies you call...
just extract all the .classes from the .jar you use and put them into the one you use as input the EXE4J
this .jar should contain:
- all the .classes of your application
- all the .classes of all the librairies you call...
just extract all the .classes from the .jar you use and put them into the one you use as input the EXE4J
Page 1 of 1

New Topic/Question
Reply


MultiQuote



|