Site Owners Forums - Webmaster Forums

Site Owners Forums - Webmaster Forums (http://siteownersforums.com/index.php)
-   Java (http://siteownersforums.com/forumdisplay.php?f=12)
-   -   How to compile Java (http://siteownersforums.com/showthread.php?t=54583)

bozzauto 02-09-2012 11:53 PM

How to compile Java
 
We all know Java compiles down into byte format which requires a JVM to run. Often for deployment we can not guarantee that our clients will have the JRE installed, nore can we supply them with a jar file. What solutions do people use to compile their Java code into native code for simple use and execution?

taipres 02-11-2012 01:00 AM

You can try this http://gcc.gnu.org/java/

albertnewton 03-05-2012 04:37 AM

You need jdk to compile java application

webguru11 03-26-2012 11:27 PM

In JDK, open DOS and type..
javac filename.java
and to run/execute the file type-
java filename

JohnPlessis 05-17-2012 02:31 AM

You must to share path to your client.They are same path in their pc.

seo123 05-21-2012 05:57 AM

java class name.java

AdamNagourney 07-26-2012 01:52 AM

You can set path ,than after use cmd and type class name xyz.java.

milina788 09-21-2012 10:44 PM

If you want to compile a java file then first of all you have to set the path of that file after that you can only run any of the file available on that location by using CMD and typing "javac filename.java".

kevinbayne 04-19-2013 02:33 AM

JDK is required to compile the java code using 'javac' command.

Avilash 04-25-2013 12:25 AM

To compile java file you need to use javac command e.g. javac myfile.java
this will compile the myfile and make the .class file.

shivendra11 05-24-2013 02:00 AM

Compile Java
 
Compile Java through command line command is javac file name.java, example javac Hello.java

dewanshahedur 07-19-2013 01:49 AM

1st of all download JDK and install it on your PC and now you can use Windows Command prompt to run your code. Otherwise you can also use Eclips, Netbeans. For new comer I prefer Windows cmd option to run a Java code.
------------------------
Question | Expert

sojolcpi 09-04-2013 10:46 AM

Yeah i agree with kevinbayne, you have need jdk. That can be solved your problem.

amitsharma11 10-04-2013 03:12 AM

In JDK, open command prompt and
to compile type..
javac filename.java
and to run/execute the file type-
java filename


All times are GMT -7. The time now is 07:19 AM.


Powered by vBulletin Copyright © 2020 vBulletin Solutions, Inc.