Calling Java Progammers

Posted:
in Genius Bar edited January 2014
I have a question. How do you creat Java packages in project builder? I tried making a group folder hierarchy of com/mycompany/myutil, but when I build the project it can't find the java classes in the package.



Any help would be appreciated.

Comments

  • Reply 1 of 5
    Quote:

    Originally posted by Mr Beardsley

    I have a question. How do you creat Java packages in project builder? I tried making a group folder hierarchy of com/mycompany/myutil, but when I build the project it can't find the java classes in the package.



    Any help would be appreciated.




    I have no experience in ProjectBuilder (I use eclipse instead). Do your java files contain the statement

    Code:


    package com.mycompany.myutil;





    at the beginning of the file?
  • Reply 2 of 5
    I've been playing with it a little more and I've got it closer to working. I added a new target and I set it as a java package. My first line is



    package mypackage; // I simplified it just to see if I could get it to work.)



    Then in my main class file I call



    import mypackage.*; // This doesn't work I have to import each class



    It builds, but when I run it has all sorts of trouble with the java.util. I think project builder doesn't understand the

    import something,*; syntax.



    You mentioned you used eclipse, is it pretty good?
  • Reply 3 of 5
    Eclipse is a cross platform open source Java IDE, originally developed by IBM as base for its commercial WebSphere Application Developer (WSAD) package. There are currently versions vor Windows, Linux, MacOS X, AIX, Solaris, HP-UX and QNX available. I use eclipse and WSAD at work. In my opinion, it is currently the best available Java IDE (and eclipse is free).



    In fact, eclipse is more than a Java IDE, it is a general purpose workbench where you can add new functionality by installing plug-ins. There are tons of free and commercial plug-ins available, from chat tools to UML designs tools, J2EE environments etc.



    eclipse has no interface builder included, but apart from that, the IDE is very powerful (including a whole lot of goodies like context sensitive name completion, generation of import statements, try-catch blocks, on-the-fly error detection (like the spellchecker in Word), a very good debugger, a possibility to evaluate code snippets etc.)



    And it has no problems with import bla.*;
  • Reply 4 of 5
    Sounds good. How does it stack up next to NetBeans?



    My goal is to get a good handle on Java before I start with WebObjects. I don't know how much I'll create pure java apps with an interface. The only thing I can think of wanting to do with it is make an app that uses regular expressions to flag irregularities in windows event log files.
  • Reply 5 of 5
    Quote:

    Originally posted by Mr Beardsley

    Sounds good. How does it stack up next to NetBeans?



    I never used NetBeans but I have some colleagues that worked with NetBeans. When my room mate was complaining about it, I always answered "well, with eclipse you could ..." . Eventually, they migrated to eclipse and never looked back. I heard the newer versions of NetBeans are better.



    Of course, a real comparison can only be based on personal preferences: The question is always: Does the environment support your style of working? I know guys that prefer emacs or vi to all IDEs and are very efficient. I would probably get much more gray hairs if I would have to work with emacs...



    AFAIK, NetBeans is rather sluggish due to the useage of Swing as GUI. eclipse uses its own GUI-Framework (SWT). SWT uses the Host-Widgets (kind of 'AWT done right'), which has some positive and negative implications:

    + SWT looks and feels more like a native application

    + SWT is faster

    - SWT is platform dependent, so for each new platform, the corresponding mappings between host widgets and their SWT counterparts must be written.

    - SWT deopends on the host widgets capabilities, so some cool stuff that is possible with Swing is not possible (or at least not easy) with SWT
Sign In or Register to comment.