Results 1 to 12 of 12
  1. #1
    huasen is offline Member
    Join Date
    Dec 2010
    Posts
    11
    Rep Power
    0

    Question How to setting a best environment for java programming under linux

    Im a newbie of java programming. I use Debian Linux.
    I have installed jre,jdk and eclipse on my system.
    I know how to build and run a program within eclipse. But, i am a c programmer before, and i used to use make tools to build my c programs.
    Now, I know how to build my java program using a sample makefile.
    But, if i use eclipse, i only run the class using eclipse run command.
    So, I want to see, the best way to build a java program, or library, and how about a large java project?

    Thanks

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,574
    Rep Power
    12

    Default

    I have used Ant from apache.org and found it very good.

    Compiling and running simple programs from the command line is not difficult either: details at the javac and java man pages. It is perhaps best to start at the command line so you know what all the options are when working with a build system like Ant.

  3. #3
    huasen is offline Member
    Join Date
    Dec 2010
    Posts
    11
    Rep Power
    0

    Default

    Thanks for your help. Its my first glance at ant, a cool make-like tool for java.

    However, there is no man page for java classes and APIs, so, where could i find a help file for immediately references searching?(not online help)
    and btw, do you only use ant for developing?

  4. #4
    Tshegofatsom is offline Member
    Join Date
    Apr 2009
    Location
    Pretoria, Gauteng, South Africa
    Posts
    43
    Rep Power
    0

    Default

    Hi, If I understand you correctly you are looking for the documentation. Its called javadoc and it is normally released/shipped with the JDK. It is in a form of web pages. You can download one for your specific JDK version at Javadoc FAQ
    Tshegofatso Manakana
    a.k.a Untouchable

  5. #5
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,574
    Rep Power
    12

    Default

    Ant has been all I ever needed for my modest needs - and I've found that it's simple to set up and use.

  6. #6
    huasen is offline Member
    Join Date
    Dec 2010
    Posts
    11
    Rep Power
    0

    Default

    Quote Originally Posted by Tshegofatsom View Post
    Hi, If I understand you correctly you are looking for the documentation. Its called javadoc and it is normally released/shipped with the JDK. It is in a form of web pages. You can download one for your specific JDK version at Javadoc FAQ
    Yes, its what i need. Thanks.

    Quote Originally Posted by pbrockway2 View Post
    Ant has been all I ever needed for my modest needs - and I've found that it's simple to set up and use.
    its really a cool tool like make. Its simple and flexible. I will learn it with jdk.

    You are all so kind, thank you.

  7. #7
    huasen is offline Member
    Join Date
    Dec 2010
    Posts
    11
    Rep Power
    0

    Default

    Sorry, pbrockway2, if i do so, how could i debug a program? for c, gdb is available.
    And for Eclipse, it has internal debugger, i think.

  8. #8
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,574
    Rep Power
    12

    Default

    Sorry - I don't know any stand alone debuggers. Others here might.

    Is there some reason you don't want to use Eclipse and its debugger?

  9. #9
    huasen is offline Member
    Join Date
    Dec 2010
    Posts
    11
    Rep Power
    0

    Default

    no. If I use Eclipse, why not only use it as a project manager, code editor?
    In another words, is there any task Eclipse can't?

  10. #10
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,574
    Rep Power
    12

    Default

    I think you can actually set the Ant script that Eclipse uses to build etc. (But I don't have Eclipse on this computer to actually check that). But it means that Eclipse can be made to any task that Ant can do ... because its using Ant.

  11. #11
    huasen is offline Member
    Join Date
    Dec 2010
    Posts
    11
    Rep Power
    0

    Default

    Thanks pbrockway2, thank to you, i know ant, eclipse use ant. Now, I can code simple java code and use ant to compile, pack and run it, further more, i also can debug a java program with debug information using jdb, a tool like gdb.
    This my first lesson to learning Java. I will learn it deeper and deeper in future.

  12. #12
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,574
    Rep Power
    12

Similar Threads

  1. setting the "Java classes" directory in Linux
    By mr_anderson in forum Advanced Java
    Replies: 1
    Last Post: 08-02-2010, 08:18 AM
  2. starting java programming on ubuntu linux
    By hmjsaumya in forum New To Java
    Replies: 1
    Last Post: 01-23-2010, 07:28 AM
  3. Setting the environment variable for j2sdk
    By kiki2009 in forum Java Servlet
    Replies: 3
    Last Post: 07-04-2009, 06:14 AM
  4. Replies: 6
    Last Post: 04-08-2009, 05:05 AM
  5. Setting path under Linux to recognize jre
    By cccccc in forum New To Java
    Replies: 4
    Last Post: 03-31-2009, 07:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •