can i invoke the java complier from my program to compile another class without using command prompt?
370055
Something like this maybe:\n\n Runtime.getRuntime().exec("C:" + pathSeparator +\n"jdk1.3.1" + pathSeparator + "bin" + pathSeparator + "javac.exe " + file);  } catch(Exception e)  { e.printStackTrace();  }  }  }
498345
Go to http://java.sun.com\nJAVA Developer's Source
106404
As far as I know you can't make .exe files in java, as java is an interpreted language. That's why you need the jre to run java applications. Instead you can package youre class files in a .jar (java archive) file and have it automaticly deployed(i mean start whe user clicks on it) if that is your target. For this there is an application called jar that comes with java. \nHope this helps you
277785
You first need to import the class (or classes) and then you will be able to use their methods or  create objects with those classes.\n\nexample: import java.util.*
1038565
check for file chooser program in \n\nwww.java2s.com\nwww.javareference.com\nif code required please mail me
963901
wat does your program doese also can you state the name of the compiler you are using
214214
You can use Perl with Java. The simplest interface is called Inline::Java, and can be found in the CPAN.  You can also intermingle Java and Perl applications, using the "JPL" library.
507588
Hi, as of everyprogramming languge. You can input commandline arguments. In java's main method. So this is how you would do your thing:\n\n\n/**\n* This is the main method in your class\n* In this example we will get all parametres \n* and input them in the array list\n*/\npublic static void main(String[] args) {\n\n// Lets initialize the arraylist\nList mylist = new ArrayList();\n\n// Lets input the commandline arguments in the array list\nfor (int i = 0; i < args.length ; i++) {\n\n// Add to ArrayList\nmylist.add(args[i]);\n\n}\n\n// Now we finished loading all\n// the arguments in the arraylist\n// Now lets  Print the list...\n\n// Lets make a Iterator for mylist\nIterator i = mylist.iterator();\n\n// Lets traverse the List\nwhile (i.hasNext()) {\nSystem.out.println(i.next());\n}\n\n// We are done!!\nSystem.out.println("Hope I helped!!! Enjoy :D");\n}
587233
More details pls.\nGo to the source:\nhttp://www.java.com/en
30653
You can execute the system call of dir and pipe output to a file/string/strings and then do a search or pattern match on that.\n\nRemember u need not make system call, but this following code compiles to sufficient commands in Java class file, and JVM runtime machine will execute that instructions and makes system calls depending on OS and Environment, on behalf of user and returs the results to the hash/buffer/stack area of JVM used by that class-file/code under running. And other important thing is that there is no eazy and free way for pattern match. You might want to write your own patten matching if it were simple patterns.\n\n\nhttp://javaalmanac.com/egs/java.io/GetFiles.html?l=rel\n\n\nFor using Java's Pattern matching, u might want to do this. But for your case of searching executables, just compare last 4 characters and if it matches ".exe" then u r good to go.\n\nhttp://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html
515059
http://java.sun.com/docs/books/tutorial/index.html
630161
have u computer installed with JAVA?
1060143
Install the JDK (http://java.sun.com)\n\nMake sure the path to the JDK bin directory is in your PATH variable\n\ntype:\n\njavac myjavafile.java  \n\nto compile\n\nTo run:\n\njava myjavafile  \n\n(assuming your class is myjavafile in the file myjavafile.java)
711328
If the files you have downloaded have a .java extension, then these steps will work for you.  If the files have a .class extension, you will have to look fourther down the page to section 'Getting the Command Prompt'.\n\nGetting the Compiler:\n\nYou will need to have the java compiler.  It is free.\nYou should read the read me file here\nhttp://java.sun.com/j2se/1.5.0/README.html\n\nYou are advised to read the 'Installation Instructions', available here\nhttp://java.sun.com/j2se/1.5.0/install.html\nor for windows here\nhttp://java.sun.com/j2se/1.5.0/install-windows.html\n\nThe compiler is available from here.\nLook down the page until you the the section headed 'JDK 5.0 Update 9' and press the '>> Download' button to the right.\nhttp://java.sun.com/javase/downloads/index.jsp\n\n\nGetting the Command Prompt:\n\nAfter getting the compiler and installing it, you need to open the command prompt.\nThis is accessed from the Start Menu, click on the windows 'Start' button.\nClick on 'All Programs'.\nLook for 'Accessories', and click on it (if needed).\nIn here should be 'Command Prompt'.  Click on this.\n\nNow is perhaps the hard part.  You need to navigate through the command prompt to get the to folder you have the java files in.\nFor simplicity, I will call the file that holds these java files, 'C:&#92;code'\nThis means, it is a folder on your C drive.\nYou need to type this into the command prompt, without the quotes.\n'cd C:&#92;code'\nThen press enter.\nYou may need to change this, according to where your files are located.\n\nIf you do not have to compile the '.java' files as you have the '.class' file, go to 'Running the Program'.\nIf you need to compile the '.java' files, continue to 'Compiling the Files'.\n\n\nCompiling the Files:\n\nYou should be in the folder that contains the .java files.\nFor simplicity, I will assume the name of the .java file is 'Example.java'\nType into the command prompt, again without the quotes\n'javac Example.java'\nThe compiler, named 'javac', should compile the code.\nIf there are no errors, it should produce a .class file, named 'Example.class'.\nIf you have errors, hmm, you may have to go back to where you got the file, or ask another question.\n\n\nRunning the Program:\n\nOnce you have the .class files, I will call them 'Example.class', you can compile the program into a functioning program.\nType into the command prompt the following line, without the quotes.\n'java Example'\n\nThis should run the program.\n\n\nNote:\nIf you have more than one file, you will have to compile each file seperately, as mentioned above in 'Compiling the Files', before you can run the program.\n\nIt is the file with the 'public static void main(String[] args)' method that you call from the command prompt with 'java Example'.
142743
First make sure that the class which contains ur               main (String args[])\nfunction hass got the same name as ur file name.\nIf u r using command prompt to run ur program make sure u have set the classpath properly or copy ur file to the bin directory of the jdk installation and run it from there.
1131033
The first is a Java Class called Main.\n\nThe second is the constructor for this class. This is what isused to basically set the class up and make an instance of it.\n\nThe third is a method called main which takes in a string array which you have named args. You could call args whatever you want, its juts a general name most coders put on it. It has a modifier which is static and is public so other classes can invoke it. The main method is what is looked for by the java compiler at run time when you execute the program.\nSo a class may look like this:\n\npublic class Main\n{\npublic String greeting;\n\n public Main()\n{\ngreeting = "hello"\n}\n\npublic static void main(String[] args)\n{\nSystem.out.println(args[0]);\nSystem.out.println(greeting);\n}\n}\n\nThis would result in the value stored at args[0] being printed out. Then "hello" printed out on a new line.\nThe args are the arguments that you pass to your program. Most programs take in strings or ints.
595983
do u mean Java jar files, do u??\nif yes then here is the answer, u will not find them, u make them, but ill give u an advice, if u want to program in java just use netbeans its a free java IDE, its perfect and it will make jar files directly after compile\n\nIf u donn wanna use Netbeans, then u can create jar files using packager.exe ull find it in ur JDK