[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

compiling .java file into .class file

Posted on 2002-07-15
8
Medium Priority
?
192 Views
Last Modified: 2013-11-23
ok i downloaded the java development kit (JDK) from the SUN website which included the Java Runtime Environment (JRE).

all i am looking to do is compile a .java file i have into a .class file. is there some site (which uses the latest version of the compiler) that will let you submit the .java file and spit back a .class file?  
0
Comment
Question by:Judy Deo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 7155831
 All you need to do is to use the javac command to do it. If you have a program called MyApplication.java you need to do: javac MyApplication.java and this will give you the MyApplication.class file which you can run by doing a: java MyApplication

  Hope it helps.
0
 
LVL 2

Expert Comment

by:mgaurav
ID: 7156298
look at the directory where you installed the java.

 make sure that the directory "JAVA_INSTALL_DIR/bin" is in your path.

 make sure that the file "JAVA_INSTALL_DIR/jre/lib/rt.jar" and "JAVA_INSTALL_DIR/lib/something.jar" (i don't recall right now which one) are in the CLASSPATH.

On Windows:
 set CLASSPATH=path_to_rt.jar;path_to_something.jar

On Linux:

  export CLASSPATH=path1:path2


  If it fails, post here the configuration of your JDK installation (OS, path of installation etc)


HIH,
mGaurav
0
 
LVL 2

Accepted Solution

by:
s_lavie earned 2000 total points
ID: 7156655
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Judy Deo
ID: 7157080
why doesn't the JDK automatically create these settings when it installs? also is there a visual studio version for Java (i.e like microsoft's Visual Studio) created by SUN or some other company?
0
 

Author Comment

by:Judy Deo
ID: 7157091
quick question about experts exchange. why doesn't it let you assign partial points? i am going to give the points to "s_lavie" because the link he provided was for an excellent tutorial but "mgaurav" also gave a good answer.
 
0
 
LVL 2

Expert Comment

by:s_lavie
ID: 7157095
There are plenty.
MS has the VJ++
Borland has the JBuilder
And many more...

There is one for free: http://www.netbeans.org/
0
 

Author Comment

by:Judy Deo
ID: 7157099
led me to the perfect tutorial. very good answer.
0
 
LVL 2

Expert Comment

by:s_lavie
ID: 7157106
Thanks!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
In this post we will learn different types of Android Layout and some basics of an Android App.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question