PDA

View Full Version : compiling java



haha123
May 3rd, 2008, 05:20 PM
hello everyone.I started learning java few days back.The tools I have for java are GCJ,sun-java6-jdk .when i am compiling a file named main.java i am using command "javac main.java" . my question is while giving javac is gcj working or jdk? my friend suggested me to use jdk.how to compile,run java files using JDK? thanks in advance.....

LaRoza
May 3rd, 2008, 05:28 PM
hello everyone.I started learning java few days back.The tools I have for java are GCJ,sun-java6-jdk .when i am compiling a file named main.java i am using command "javac main.java" . my question is while giving javac is gcj working or jdk? my friend suggested me to use jdk.how to compile,run java files using JDK? thanks in advance.....

See sticky, there is a section on using sun-java6-jdk to compile.

malfist
May 3rd, 2008, 06:29 PM
vist java.sun.com and follow the instructions it install the JSE JDK.

CptPicard
May 3rd, 2008, 06:34 PM
vist java.sun.com and follow the instructions it install the JSE JDK.

Don't.

The one in the repos works just fine. You just need to do the update-alternatives thing mentioned probably in the stickies. And yes, use the Sun version.

haha123
May 3rd, 2008, 08:10 PM
i am just asking how to make jdk as default for compiling..............

CptPicard
May 3rd, 2008, 08:32 PM
i am just asking how to make jdk as default for compiling..............

Read the sticky :)