Register on the forum now to remove ALL ads + popups + get access to tons of hidden content for members only!

Go Back   Site Owners Forums - Webmaster Forums > Web Programming > Programming General > Java

Notices


Reply
 
Thread Tools Rate Thread Display Modes
Old 02-09-2012, 10:53 PM   #1
bozzauto
Registered User
 
Join Date: Jan 2012
Posts: 217
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?
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
bozzauto is offline   Reply With Quote

Old 02-11-2012, 12:00 AM   #2
taipres
Registered User
 
Join Date: Jan 2012
Posts: 27
You can try this http://gcc.gnu.org/java/
__________________
Check out
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
for cheap vps listings! Updated daily! Now has a great feature search!
taipres is offline   Reply With Quote
Old 03-05-2012, 03:37 AM   #3
albertnewton
Registered User
 
Join Date: Mar 2012
Posts: 24
You need jdk to compile java application
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
albertnewton is offline   Reply With Quote
Old 03-26-2012, 11:27 PM   #4
webguru11
Registered User
 
Join Date: Aug 2011
Posts: 24
In JDK, open DOS and type..
javac filename.java
and to run/execute the file type-
java filename
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
webguru11 is offline   Reply With Quote
Old 05-17-2012, 02:31 AM   #5
JohnPlessis
Registered User
 
Join Date: May 2012
Posts: 3
You must to share path to your client.They are same path in their pc.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
JohnPlessis is offline   Reply With Quote
Old 05-21-2012, 05:57 AM   #6
seo123
Registered User
 
Join Date: Sep 2011
Posts: 113
java class name.java
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
seo123 is offline   Reply With Quote
Old 07-26-2012, 01:52 AM   #7
AdamNagourney
Registered User
 
Join Date: Jul 2012
Posts: 4
You can set path ,than after use cmd and type class name xyz.java.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
AdamNagourney is offline   Reply With Quote
Old 09-21-2012, 10:44 PM   #8
milina788
Registered User
 
Join Date: Jul 2012
Posts: 34
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".
__________________
Hire a professional
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
milina788 is offline   Reply With Quote
Old 04-19-2013, 02:33 AM   #9
kevinbayne
Registered User
 
Join Date: Apr 2013
Posts: 11
JDK is required to compile the java code using 'javac' command.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
kevinbayne is offline   Reply With Quote
Old 04-25-2013, 12:25 AM   #10
Avilash
Registered User
 
Join Date: Apr 2013
Location: meerut
Posts: 23
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.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Avilash is offline   Reply With Quote
Old 05-24-2013, 02:00 AM   #11
shivendra11
Registered User
 
Join Date: May 2013
Posts: 14
Compile Java

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

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
shivendra11 is offline   Reply With Quote
Old 07-19-2013, 01:49 AM   #12
dewanshahedur
Registered User
 
Join Date: Sep 2012
Posts: 68
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
dewanshahedur is offline   Reply With Quote
Old 09-04-2013, 10:46 AM   #13
sojolcpi
Registered User
 
Join Date: Sep 2013
Posts: 2
Yeah i agree with kevinbayne, you have need jdk. That can be solved your problem.
sojolcpi is offline   Reply With Quote
Old 10-04-2013, 03:12 AM   #14
amitsharma11
Registered User
 
Join Date: Sep 2013
Posts: 86
In JDK, open command prompt and
to compile type..
javac filename.java
and to run/execute the file type-
java filename
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
amitsharma11 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Have you ever wondered what is inside a java class file? cianfie Java 6 01-28-2015 10:09 PM
Java SE development Spoint_Vinil Java 8 10-10-2014 04:51 AM
Where from i should start to learning java? janejackson Java 15 09-23-2014 04:37 AM
The conclusion provided by the Black Hat Java Script andrebreton2121 Search Engine Optimization 6 10-17-2012 11:06 PM
biggest teature of String in java? cianfie Java 0 12-08-2011 08:03 PM


All times are GMT -7. The time now is 11:05 PM.


Powered by vBulletin Copyright © 2013 vBulletin Solutions, Inc.