Import statement and directory structure

First of all, sorry for such a long post, I believe part of it is because I am unsure of the concept of importing in Java. Secondly, Thanks to anyone who can ultimately enlighten me to the concept of import. I did ask this question before in the "erorr and error handling" forum, and the people who have helped me there did a great job. But, I believe I require a little more clarification and thus have decided to post here.
Anyhow, my question..
Could someone explain to me the concept of the import statement, or direct me to a webpage with sort of explanation for newbies? For some reason, I am having a hard time grasping the concept.
As I understand it, the import statement in Java, is very similar to the namespace keyword in C. That is to say, import doesn't actually "import" any source code, the way that the #include statement does in C.
So I suppose what my question is, say I have a java class file like below:
//filename: sentence.java
//located: c:\school\csc365
package csc365;
class sentence
//some variables here..
//some constructor here..
//some methods here..
And some sample program like the one below which implements the above..
//filename: test.java
//located: c:\school\csc365
import csc365.*;
import java.io.*;
class test.java
//creates some sentence object
//uses the object's methods
//some other things.
As I understand it, the test.java file should not compile because the csc365 package is not in the correct directory. (assuming of course, the classpath is like c:\school\csc365;c:\school )
But, ... where then should the sentence.java be located? In a subdirectory of c:\school called csc365 (i.e c:\school\csc365\) ?
And thus that would mean the test.java file could be located anywhere on the hard drive?
I suppose, I just need a little clarification on the correlation between a package's "name" (i.e package csc365; ) and its corresponding directory's name, and also how the javac compiler searches the classpath for java classes.
..So, theoretically if I were to set the classpath to look in every conceivable directory(provided the directory names were all unique) of the harddrive, then I could compile a test.java anywhere?
As a note: I have been able to get the test.java file to compile, by leaving out the import statement in the test.java file, and also leaving out the package statement for the sentence class, but I assume this is because the files are defaulted to the same package?

Hi Mary,
No, import isn't analogous to C++ namespace - Java package is closer to the namespace mark.
import is just a convenience for the programmer. You can go your whole Java career without ever writing an import statement if you wish. All that means is that you'll have to type out the fully-resolved class name every time you want to use a class that's in a package other than java.lang. Example:
// NOTE: No import statements
public class Family
   // NOTE: fully-resolved class names
   private java.util.List children = new java.util.ArrayList();
}If you use the import statement, you can save yourself from typing:
import java.util.ArrayList;
import java.util.List;
public class Family
   // NOTE: fully-resolved class names
   private List children = new ArrayList();
}import isn't the same as class loader. It does not bring in any source code at all.
import comes into play when you're compiling or running your code. Java will check to make sure that any "shorthand" class names you give it live in one of the packages you've imported. If it can't find a matching fully-resolved class name, it'll give you a message like "Symbol not found" or something like that.
I arrange Java source in a directory structure that matches the package structure in the .class files.
If I've got a Java source file like this:
package foo.bar;
public class Baz
   public static void main(String [] args)
        Baz baz = new Baz();
        System.out.println(baz);
   public String toString()
       return "I am a Baz";
}I'll store it in a directory structure like this:
root
+---classes
+---src
      +---foo
           +---bar
                +---Baz.javaWhen I compile, I go to root and compile by typing this:
javac -d classes foo/bar/*.javaI can run the code from root by typing:
java -classpath classes foo.bar.BazI hope this wasn't patronizing or beneath you. I don't mean to be insulting. - MOD

Similar Messages

  • Package and Directory Structure

    Hello --
    I work in a group that supports 3 web sites. (b2b, b2c, b2e)
    We're just beginning to develop Java in-house and
    currently using Solaris and JDK 1.2.x.
    I need to propose a package and directory structure strategy.
    The "reverse the domain name" guideline makes sense to me.
    My first thoughts are: ("classes" dir could be created anywhere)
    classes/com/ppco/b2X/ <--- for .java and .class files (development)
    lib/ <--- for b2X JAR files (ready for test or production)
    util/ <--- for our utility classes like DBAccessor
    lib/ <--- for our JAR files
    sun/ <--- for classes like com.sun.mail pkg
    lib/ <--- for JAR files like mail.jar
    org/ <--- for classes in org.omg.CORBA pkg
    lib/ <--- for JAR files
    We need to handle 3rd party classes.
    Development would be done in the b2X tree and JAR files would
    be installed the lib/ dir for testing and release to production.
    Does anyone have recommendations or experiences to share ?
    Are there some things to avoid ?
    Thanks !
    Al

    Hello Al,
    you are on the right track. A typical convention I follow is:
    <project>
          bin - for startup scripts, etc. to run your application
          build - for build scripts (not necessary if you build using your IDE. See below.)
          classes - for my compiled classes
          lib - for my 3rd party libraries
          src - for my source code
          test - for my test code (see http://junit.org/ )
    That's the project hierarchy. The src (i.e. the package heirarchy) structure is another story.
    As you say, you start with the reverse domain name. This is to give your packages a unique namespace. After that, your best guide is practice. Packages can be larger or smaller, depending on your coding practices. Usually you would have these (exact names may differ), plus others:
          com/ppco/client
          com/ppco/server
          com/ppco/common
          com/ppco/db
    I think your break down of sun, org, etc. is a bit too much. If you would like to do so, however, I recommend you do the separation under /lib. This way, the top level project directory is not polluted by the different types of libraries in use.
    Regards,
    Manuel Amago.
    From build above: I would suggest you always build your release distribution directly with the JDK, not using any IDE compiler. This is because Sun's JDK is the reference implementation, thus, any compatibility issues are not yours.
    An easy way to achieve this is by using ANT (see http://jakarta.apache.ort/ant/ ).

  • An intelligent way to import already existing directory structure to Aperture

    Hello,
    is there an intelligent way to import already existing big directory structure of photographs (over 2TB) archive into Aperture?
    I have my catalogue on a disk created in a way:
    date - short shot description (i.e. “2011-02-14 Name Surname (portrait)”)
              Originals
              Converted
              PSD
              Final
    I would like, when importing “date - short description”, it to become an Aperture Project with the same name and subfolders Originals, Converted, PSD and Final to become Aperture Albums or Folders in that Project.
    The only way I found is to create a Project and Albums in that project manually and then import all the pictures from the corresponding folders, one-by-one,  to Aperture’s Albums. I use references only to preserve the current archive structure on a disk as well.
    thank you for your time.

    You can try and experiment with the various options in File->Import Folders as Projects, specifically the option Import Folders as  to see if you get what you are looking for but I doubt  you will get exactly what you are looking for.
    One way to achieve your goal would be to import the projects and then once that is done create the other entities (either folders or Albums) once and then paste them into each project.
    The only way to truly automate this would be to write an Applescript and unless this is an ongoing requirement by the time you developed the script you could have just created the structure and pasted into the projects.

  • Problem with package and directory structure

    Please... I need help with a directory/package structure that I don't understand
    why it is not working...
    I want to create a custom login SWF which several other SWF movies will use in case they need some kind of login logic (in this case it is a login logic... but the problem doesn't have anything to do with that logic...)
    I have created a FLA movie (LOGIN.FLA) and two helper classes (MAINLOGIN.AS and MAINLOGINEVENT.AS)... they are all under the same directory, for example:
    c:\
         abc\
              def\
                   ghi\
                        login
    In LOGIN.FLA, I have included the source path, c:\abc (for example).
    MAINLOGIN.AS and MAINLOGINEVENT.AS, have both a package like:
         package def.ghi.login
    MainLogin class uses MainLoginEvent (it dispatches events of that type)... but I don't have to import anything as all 3files are in the same directory...
    LOGIN.FLA has its class defined as def.ghi.login.MainLogin
    And that's all... now comes the problem:
    1. If I leave everything as described and try to publis LOGIN.FLA, it throws error 5001 ("The name of the package def.ghi.login.MainLoginEvent doesn't reflect....) for class MainLoginEvent... don't understand why... it is placed exactly as MainLogin and has the same package definition!
    2. I have tried several other options, but when I get the SWF to get published, then, the problem comes when trying to use this SWF from another movie:
    The way to publish LOGIN.FLA with no errors is: MAINLOGIN.AS and MAINLOGINEVENT.AS with empty package definition ("package" alone...) and LOGIN.FLA with class MainLogin (not def.ghi.login.MainLogin)... LOGIN.FLA doesn't have to include source path to c;\abc in this case. This way, I can publish LOGIN and get LOGIN.SWF.
    The problem now is how to use this information from another Movieclip... I want to be able to use and receive events of type MainLoginEvent but can't (it gives error 5001 again, on MainLoginEvent, saying that the name of the package '' doesnt' reflect....)... If I include the path to c:\abc\def\ghi\login on the FLA, then it gives errors in MainLogin when trying to use a class of its library...
    Basically, the problem here is that, the movie which wants to use the LOGIN.SWF, is in c:\abc\def, and it is including the source path c:\abc, so if I import def.ghi.login.*
    it is when it throws error 5001 (I understand why, but I dont know how to fix it...), but if I dont import def.ghi.login.* then I can't use MainLogin nor MainLoginEvent...
    What is the good way of doing this kind of structure... mainly it is creating a SWF, which can be used from other SWF's and which can dispatch events, which the container SWF will capture...
    If anyone can please give me a hint... THANK YOU!

    Hi kglad , I don't understand the first point... "don't use absolute paths"... I'm not using them (or I don't understand what you mean).
    For the second one... the structure is like:
    c:\
         abc\
              def\
                   LOGINCONTAINER.FLA
                   ghi\
                        login\
                             LOGIN.FLA
                             MAINLOGIN.AS
                             MAINLOGINEVENT.AS
    In LOGIN.FLA, I include the source path c:\abc, so MAINLOGIN.AS and MAINLOGINEVENT.AS have a package of "def.ghi.login", and the class for LOGIN.FLA is "def.ghi.login.MainLogin"... when trying to publish LOGIN.FLA, Flash throws error 5001 for MAINLOGINEVENT...¿?
    What I want to get is a SWF (LOGIN.SWF), which can be loaded from any other SWF (in this example, LOGINCONTAINER.SWF). LOGINCONTAINER.FLA, has a class path "c:\abc" (the same as the other LOGIN.FLA, because of the directory structure), and it has to be able to receive events of type MAINLOGINEVENT... that is why it has to do an import of "import def.ghi.login.*" (for example)
    Any idea of why it is not working (or how to organize it correctly)?
    Thank you

  • Import already existing directory structure into DFS namespace?

    Hi all,
    I'm planning to migrate three file servers to a single DFS namespace and after reading the official docs and numerous blog posts I'm still unsure about the right way to do it.
    The "main" server already has a share with a complex directory structure, called \\server1\team, and that share shall become the root of the new DFS namespace, lets call it  \\domain.local\team.
    Part of that already existing directory structure is this folder: \\server1\team\admin\communication\archive. The folder "archive" contains thousands of files in numerous folders and shall become a dfs link to another share \\server2\archive. But
    before I can create the folder "archive" as a dfs link I have to create the folder "admin" in the dfs hierarchy of course, then below that the folder "communication"
    Question: When I try to create a folder "admin" in the dfs namespace, I get the error message "the folder cannot be created in the namespace. The file exists."
    Ok, the folder "admin" indeed exists, but how can I "import" this branch of the existing directory hierarchy into the dfs namespace?
    Do I have to rename the existing folder "admin" to e.g. "admin2", then create the dfs folder "admin" and move the complete directory structure below "admin2" to "admin"? Or can I simply make the existing folder
    "admin" a dfs folder?
    Thanks in advance!
    Regards
    Christoph

    Mandy, thanks for your feedback!
    I have to describe my problem more precisely: creating the root of the new DFS namespace is *not* the problem. This worked for me exactly as you expained it. The problem appears when I try to create a folder below that root in the DFS namespace. If that
    folder already exists in the share you cannot choose how to handle security settings but you get an error message, and that's it.
    This may be helpfull to explain what I want to achieve:
    Old structure:
    \\server1\team - folder admin - subfolder "archive" - lots of subfolders and files
    Now I want to move all files and folders from "archive" to \\server2\archive and link this share into the new DFS namespace, so that our users don't notice any change when they access that archive folder.
    new structure:
    1. Create DFS namespace root: \\domain.local\team  -> \\server1\team   (works!)
                |
    2. Create folder admin  (problem!)
                |
    3. Create subfolder "archive" -> \\server2\archive (not possible becaues "admin" couldn't be created)
    I could perhaps create a DFS namespace with the root \\server1\team\admin\archive and link that to \\server2\archive, but I would like to avoid creating a new namespace for each share which from \\server2 which I mount into some subfolder of \\server1\team...
    Thanks for reading.
    Regards
    Christoph

  • Standby Redo Log Files and Directory Structure in Standby Site

    Hi Guru's
    I just want to confirm, i know that if the Directory structure is different i need to mention these 2 parameter in pfile
    on primary site:
    DB_CONVERT_DATAFILE='standby','primary'
    LOG_CONVERT_DATAFILE='standby','primary'
    On secondary Site:
    DB_CONVERT_DATAFILE='primary','standby'
    LOG_CONVERT_DATAFILE='primary','standby'
    But i want to confirm this wheather i need to issue the complete path of the directory in both the above paramtere:
    like:
    DB_CONVERT_DATAFILE='/u01/oracle/app/oracle/oradata/standby','/u01/oracle/app/oracle/oradata/primary'
    LOG_CONVERT_DATAFILE='/u01/oracle/app/oracle/oradata/standby','/u01/oracle/app/oracle/oradata/primary'
    Second Confusion:-
    After transferring Redo Standby log files created on primary and taken to standby on the above mentioned directory structure and after restoring the backup of primary db alongwith the standby control file will not impact the physical standby redo log placed on the above mentioned location.
    Thanks in advance for your help

    Hello,
    Regarding your 1st question, you need to provide the complete path and not just the directory name.
    On the standby:
    db_file_name_convert='<Full path of the datafiles on primary server>','<full path of the datafiles to be stored on the standby server>';
    log_file_name_convert='<Full path of the redo logfiles on primary server>','<full path of the redo logfiles on the standby server>';
    Second Confusion:-
    After transferring Redo Standby log files created on primary and taken to standby on the above mentioned directory structure and after restoring the backup of primary db alongwith the standby control file will not impact the physical standby redo log placed on the above mentioned location.
    How are you creating the standby database ? Using RMAN duplicate or through the restore/recovery options ?
    You can create the standby redo logs later.
    Regards,
    Shivananda

  • Data guard: OMF and directory structure

    hi everybody,
    i guess this problem is not too complicated, but maybe i´m missing something.
    assumption:
    - 10.2.0.4
    - data guard with physical standby (primary: node_a, standby: node_b)
    - primary db_unique_name=primary, standby db_unique_name=standby
    - using OMF, primary db_create_file_dest=<myDir>/oradata
    - standby_file_management is set to AUTO
    - want to use same directory structure for data files on both nodes (<myDir>/oradata/PRIMARY/)
    data guard is working as expected so far, data files on both nodes are created in <myDir>/oradata/PRIMARY/datafile/
    next assumption:
    - failover is initiated
    - physical standby is recreated on former primary node (node_a)
    from now on, data files are created in <myDir>/oradata/STANDBY/datafile/, old data files remain in <myDir>/oradata/PRIMARY/datafile/.
    is there a way to avoid a second directory (and still use the benefits of OMF)? at least at the current standby node it´s possible to avoid this by setting db_file_name_convert, but what about the new primary?
    thanks for your input,
    peter
    Edited by: priffert on Sep 14, 2009 3:07 AM

    I have a similar setup with the exception that I'm using ASM for datafiles. The issue I'm having with OMF is that if I create a datafile within a disk group that is not in the location specified by db_create_file_dest then on the standby it's created in the db_create_file_dest. Apparently this will not give me the ability to maintain the exact configuration on both primary and standby without requiring modification after role changes.

  • Changing file name and directory structure for use outside of iPhoto

    Hi,
    I was wondering if its possible to get iPhoto to name the files from my library to reflect the names that I've given the files in iPhoto. I'm thinking along the lines of iTunes, where its possible to chose in the preferences how the files are named, and there is some logical directory structure, such as "Artist/Album/01 - Track 1.mp3". These file names are updated to reflect any changes made in iTunes.
    I've heard the argument that I shouldn't ever want to do anything with the files themselves because iPhoto can do everything I would ever want to do, but I want to organize the files so that not all of my organizational work is lost if I decide to stop using iPhoto and transition to a different system. Any suggestions would be appreciated.
    Thanks,
    Adrian

    Adrian
    No it's not possible.
    You can rename the files before bringing them into iPhoto, you can rename them with the titles on Export (Use the File -> Export command, it gives you the option to use the title and filename) but when it's inside iPhoto you cannot rename the files.
    However, all is not entirely lost. Using Film Rolls (View -> Film Rolls) you can move pics between rolls, name rolls, create rolls and so on, as long as you do this in the iPhoto Window, and these changes will be reflected in the iPhoto Library Folder.
    If at some point you decide to chuck iPhoto then (if the new app won't read iPhoto database files) you can simply export each album you've created to a Folder (using the File -> Export command as I suggest above), this, along with exporting slideshows will preserve your organisational efforts.
    The iTunes database has a rather simple job to do: track a file and it's assorted metadata. iPhoto, on the other hand, tracks a file and it's assorted metadata, plus a Modified version, plus a thumbnail. If you consider what happens when you edit a pic, for instance - Copy Original, perform edit, save modified version, remove Original Thumbnail and then create new one - you can see it's a rather more complex job.
    Finally, the standard warning: It is strongly advised that you do not move, change or in anyway alter things in the iPhoto Library Folder as this can cause the application to fail and even lead to data loss. Any changes you make must be made in the iPhoto Window.
    Need more info? by all means post again.
    Regards
    TD

  • PC - Moving catalog and directory structure to a new HD

    Having filled my internal HD with images, I went out and purchased a new and bigger external hard drive. I want to move my images to the new drive while preserving both my directory structure and catalog information. From what I can see of the "move" command in PS Elements, it moves selected images to a new directory, but that's not what I want to do. I probably have a hundred named folders and I would like to keep the images in folders of the same name on the new drive. I don't want to have to move one directory at a time. Copying through the file manager can obviously do this, but I don't know if it will preserve my tags, etc.
    Is there a straightforward way to move files from one drive to another that preserves both directory structure and catalog information?
    Thanks in advance.
    Artie

    Humm, this is strange-Version 4 is supposed to move entire folders; Version 3 did not do this.
    Okay, Plan B.
    Open Elements and do a Full Backup and point to your external hard drive.
    When this has finished running, do a Restore. You should get a pop up asking if you want to use the existing folder structure. Answer Yes and point to your External HardDrive (EHD). This should copy your photos and the Organizer file over to your (EHD).
    Now look in Preferences under Files (I think, don't have program open) and you will see one value for where to store photos and one for Organizer location. Change these to your EHD so future photos and tags/collections are written to the EHD.
    Verify all your tags and collections came over correctly.
    If you are satisfied the transfer went correctly, you can erase your photos from your hard drive to free up space. You can also delete the Organizer file if you want.
    Option 2-Use Windows Explorer and move all the files from your hard drive to your EHD. This will keep your folder structure, but will cause havoc with Organizer.
    Open Organizer and do File>Reconnect All Missing. It will be all of them. You should have an option to change the drive to your EHD. It may take quite a while to reconnect all of them, but since all the folders/files are the same name it should find them all.
    If you wish, you can change the drive location manually. However, I've found many users 1) do not have MS Access on their machine and 2) are not experienced in using the program. If you are comfortable with the program, let me know and we'll get some directions.
    Finally, I see a copy of the post in the Technical side. Since most forum users read both sides of this forum, I'm going to reference this thread in that post so anyone can see what we have tried so far.

  • Aperture import - folder and project structure!

    Hi, everyone!
    I am a long time Picasa user, and I really enjoyed the way my imported images simply put themselves into folders in the interface, all named by date automatically. I have been trying out Aperture for some time now, and I just can´t find a good way to mimic this. There is seemingly no way for Aperture to automatically name my projects by date, unless it gets to split up some dumb album/project that I have to name myself.
    I guess what I am asking here is: Is there any way to make Aperture automatically name, keep and update the same structure under "Projects and Albums" as id does in Finder?
    And yes.. I know I should name my projects myself with sweet relevant names, but I don´t wanna! I really want everything to be sorted by date.
    My solution at the moment: Import photos using no name in projects, Aperture splits anyway, I delete project in Aperture and then I drag and drop folder from Finder.  Gahh... This is heavy work for one used to simple and obedient Picasa 
    Thanx!

    Hello,
    My solution at the moment: Import photos using no name in projects, Aperture splits anyway,
    How are your "Impert Preference" settings and "Import Settings"?
    In the Aperture -> Preferences -> Import   set the "Split Projects" Selector to the longest possible value, two weeks.
    And don't drag projects from the Finder, select them in In the "Import" Panel; 
    make sure you have all import options visible by enabling them in the "Import Settings" drop down, then uncheck: "Automatically split Projects" in the "Aperture Library Brick"
    Regards
    Léonie

  • ST02 Export / Import buffer and directory entries

    What would cause the number of (Export / Import) directory entries to steadily increase in ST02 until there were none left. I currently have the directory size set to 30,000 and over the course of about 7 days they are all used up and then I have extensive swaps. The swaps are at 1,060,431 after about one month.

    lots of data input through interfaces for example...if the values are too small you have to increase them and checek again until the value is sufficient...
    GreetZ, AH

  • FTP - Libraries and Directory Structures

    Hi,
    I have several questions, that hopefully someone will be able to help me out with. What I need to be able to do is connect to an FTP server and pull down an entire directory to overwrite a directory on the users computer. I have used the apache commons library before to do simple file pull downs, but don't see an easy way to get and entire directory. So my questions are as follows:
    1. What would be the best FTP library to accomplish this goal.
    2. If no library supports this explicitly what is the best way to download all the files and preserve the file structure.
    Thanks for any help,
    Nathan

    Nath5 wrote:
    I have used apache commons several times to download files using FTP, I was just wondering if there was a way to download an entire directory instead of individual files.I don't believe there's such a method in the Apache Commons product. However there IS a method to list the files in a directory on the server, so using that it should be pretty straightforward to download each file in the directory. Hopefully you would agree that the end result of this would be the same as "downloading the entire directory".

  • Question about blazeds turnkey, tomcat and directory structure

    hi. this question is pretty basic...been reading sujit reddy g's blog on installing/setting up blazeds.
    in one article he creates a samplewebapps directory in C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\samplewebapps and copies the blazeds WEB-INF/lib into that directory and the configuration files in the flex folder across as well...http://sujitreddyg.wordpress.com/2009/04/07/setting-up-blazeds/
    in another article on invoking java methods from flex he configures the remote-config.xml file directly in the blazeds\WEB-INF\flex folder....http://sujitreddyg.wordpress.com/2008/01/14/invoking-java-methods-from-adobe-fle x/
    wasn't sure why in the first example he copied the files and folders to the samplewebapps directory while in the second example he just configured the files within the blazeds directory...thanx...(i'm a newbie at server side development)

    I'll take a stab at it. The key thing to realize is the BlazeDS code is ADDED on
    to the appserver. E.g. for Tomcat/WebLogic/et al one adds the reference in the web.xml file in WEB-INF.
    So, what is that add-on?
    1. Executable files. These are jar files and typically stuck into WEB-INF/lib
    2. Configuration files. flex/services-config.xml is specified in web.xml. It refers to the other config files in WEB-INF/flex
    So, the config in web.xml tells Tomcat (and its forked commercial products) to load up the Flex jars and run some classes. By standard, the "run some classes" follows the servlet lifecycle and runs specific methods in the class when the servlet is loaded, called, destroyed. So, Flex jars have a class which implements the servlet interface.
    Incidentally, you may also see references to log4j, Spring, and other frameworks in the web.xml as well. They do the same sort of stuff. So, Tomcat does the passing of the HTTP packets and stages them into Java classes and the hooked in frameworks do add their own behaviours to the setup.
    HTH,
    TimJowers
    P.S> Also note in Flex when you setup the project properties for a Flex Project then you need to match up your URL and "context" to what you have on your server. In his exampe, the "samples" context may have already been setup so easier to use. What is a "context"? The idea is to have more than one webapp running on an appserver. In Tomcat, its basically just the subdirectory under "webapps". That directory name becomes part of the URL. E.g. webapps/samples -> http://localhost:8080/samples  or webapps/mytest -> http://localhost:8080/mytest

  • Question about blazeds turnkey installation and directory structure

    hi. this question is pretty basic...been reading sujit reddy g's blog on installing/setting up blazeds.
    in one article he creates a samplewebapps directory in C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\samplewebapps and copies the blazeds WEB-INF/lib into that directory and the configuration files in the flex folder across as well...http://sujitreddyg.wordpress.com/2009/04/07/setting-up-blazeds/
    in another article on invoking java methods from flex he configures the remote-config.xml file directly in the blazeds\WEB-INF\flex folder....http://sujitreddyg.wordpress.com/2008/01/14/invoking-java-methods-from-adobe-flex/
    wasn't sure why in the first example he copied the files and folders to the samplewebapps directory while in the second example he just configured the files within the blazeds directory...thanx...(i'm a newbie at server side development)

    There's really not much difference. In some cases, you might already have a web application you are using so you could just copy the contents of the blazeds web app into your existing web application.
    Application servers can host more than one web application and a Flex application that uses BlazeDS can be deployed on a different web app than the one where BlazeDS is running or a different server entirely so it really just depends how you want to set things up.
    Hope I'm not just making things more confusing for you. . .
    -Alex

  • Import statements and type renames

    Hi,
    I have some errors compiling this code with sunf95.
    I'm not sure if the code have something wrong, but I understand this correspond to the 2003 standard.
    I hope someone can tell me something about this.
    thanks
    ------- print_coord.f90 -------
    subroutine print_coord(coord)
    real(8), dimension(3), intent(in) :: coord
    print*,coord
    end subroutine print_coord
    ------- print_data_type.i90 -------
    !module DATA_TYPE_mod
    !use data_type_module, only: data_type => point_t
    private
    interface print_type_coord
    subroutine print_coord(point)
    import:: data_type
    type(data_type), intent(in) :: point
    end subroutine print_coord
    end interface print_type_coord
    public:: print_type_coord
    !end module DATA_TYPE_mod
    ------- test.f90 -------
    module types
    public
    type point_t
    real(8), dimension(3) :: coord
    integer :: id
    end type point_t
    type sphere_t
    real(8), dimension(3) :: coord
    real(8) :: radius
    integer :: id
    end type sphere_t
    end module types
    module point_mod
    use types, only: data_type => point_t
    include "print_data_type.i90"
    end module point_mod
    module sphere_mod
    use types, only: data_type => sphere_t
    include "print_data_type.i90"
    end module sphere_mod
    program test
    use types
    use point_mod, only: print_point_coord => print_type_coord
    use sphere_mod, only: print_sphere_coord => print_type_coord
    type(point_t) :: point
    type(sphere_t) :: sphere
    point = point_t( (/0.0,0.0,0.0/) , 1 )
    sphere = sphere_t( (/1.0,1.0,1.0/), 0.5, 2 )
    call print_point_coord(point)
    call print_sphere_coord(sphere)
    end program test
    ---------------------------------

    >
    My mistake, is not an error, is a warning. But it is correct?Yes. The warning message is correctly reporting a violation of the requirements of the Fortran standard. The code as written will work on almost all existing Fortran implementations, but it is not required to work. For example, the Fortran standard allows implementations to reorder the components of a derived type that is not a sequence type. I know of only one compiler that ever took advantage of that freedom, and it did not for very long. The code would fail on any implementation that moved a component of the derived types ahead of the component named coord.
    So, the code is not standard conforming, it will work as is on almost all implementations, but it could fail on a standard-conforming Fortran implementation.
    I define the procedure print_coord, but is an external procedure, then it is not a problem the use of different types in the interface definition. I rename the types to data_type, but never are both public with the same name. So, the warning is just a comment about the situation or a possible problem when I run the code?The warning is both a comment about problem with the code and a possible problem. The chances of the problem occurring in practice are small.
    Bob Corbett

Maybe you are looking for

  • Google Search results and google home page display as symbols

    Any attempt to use "google" within Firefox 15 or 16 on my laptop returns a page full of symbols. All other pages and sites that I visit work just fine. The kind of symbols I see ...a subset of .... are pasted below

  • Syncing iphoto to ipad

    I am having a problem syncing any photos from iphoto to my ipad 2. I am using iPhoto 9.1.5 and running Lion. The iPad 2 was purchased 2 months ago. The long version is, when I first synced the iPad, it would boot iPhoto automatically and lock up. Had

  • How to set Reminder to vibrate?

    Hi everybody, this is my first message in this forum I installed the Reminder application on my Nokia C7. I noticed that it beeps even when I set the phone in "meeting", "vibration" or "silent mode". Ringtones and Reminder settings seem to be indepen

  • How to unlock windows admin password

    Dear Support, Please tell me how to unlock the password of administrator in windows 8.1 Ashok Marodia 9873506200

  • My iMac keeps shutting down suddenly.  Does anyone know what's causing this?

    My iMac keeps shutting down suddenly.  Does anyone know what's causing this?