Java packages into Visual J++ projects

Hi all....
Can anyone help me?
It's possible to use J2SE packages and classes into a MS Visual J++ project? (In particular i need some enanched functionalities in java.io and java.nio packages. These packages are obsolete in MS).
Tanks in advance. Max

Thanks BIJ
I know this. But, it's possible to use these packages (import in some way) from jdk 1.4.1 into Visual J++ packages? I need to use they into an old VJ++ project and compile the java sources.
Tank you very much
Massimo

Similar Messages

  • Can I include java files into my javafx project?

    If I do so, exception always occurs until I delete the created java files.

    Suppose I include the following class in my project (all other classes are of .jx type)
    public interface ServicePortType extends java.rmi.Remote{
        public String getMessage() throws java.rmi.RemoteException;
    }However if I'm trying to run the whole project,
    the following exception occurs:
    Cannot run program "C:\Program Files\Java\jre6\bin\javac.exe": CreateProcess error=2, The system cannot find the file specified
    C:\Documents and Settings\daps-stg\My Documents\NetBeansProjects\ProductionPath\nbproject\build-impl.xml:143: exec returned: -1
    BUILD FAILED (total time: 0 seconds)If I cancel the java source from my javafx project, it runs normally without any bug.
    So how is this happening and what is the potential solution?
    Thx. -- Isaac.

  • Please help with combining two java packages into one iteration

    Hello, I work for a pharmaceutical company and run reports for credits that we have received. Currently the packages are reported seperately from the credit reports and my job is to combine them. There are two models that handle these and I need to link the second to the first with some common entities. Please help me figure out what I need to do in order to add a credit column to the report. I have a sample of the code below and would appreciate any help you can offer.
    First, the info pulled about the boxes:
    rm = (ReportManager) ManagerFactory.getManager(ManagerFactory.REPORTS);
    items = rm.getRVSSearchResults(hvstoresid,
    hvstoregroupsid,
    String.valueOf(request.getParameter("price_type")).trim(),
    String.valueOf(report_by).trim(),
    vendor_type,
    String.valueOf(request.getParameter("vendor")).trim(),
    from_date,
                        until_date,
    debitNum,
                        processing_type,
    sort_field,
    sort_direction,
                        includeAll222s).iterator();
    Second, the page that has the data i need to transpose to the first:
    PackoutModel pm = null;
                             int iter = searchpageposition*resultPageSize;
                             while (iter < packouts.size() && iter<(searchpageposition*resultPageSize)+resultPageSize)
                             { pm = (PackoutModel) packouts.get(iter);
                                  BigDecimal invoiceAmt = DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getInvoiceAmt(),"0.00");
                                  BigDecimal creditRec = DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getAmtReceived(),"0.00");
                                  BigDecimal processingFee = DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getProcessFeeTotal(),"0.00");
                                  BigDecimal shippingFee = DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getShippingHandlingFeeTotal(),"0.00");
                                  BigDecimal balanceDue =(invoiceAmt.add(processingFee.add(shippingFee))).subtract(creditRec);
    All that I need from the second page is to get a value for:
    DataConverter.parseBigDecimalWithAlternateWhenNull(pm.getAmtReceived(),"0.00");
    which I believe must first have the store id, etc equal to the first model. So there is the existing rvs.FOO and the needed pm.BAR but since it is in an iter loop, I can't seem to figure out how to join the two.
    Any ideas?

    could you explain your problem with a simplified schema or a more
    understandable code.
    (don't bother to write the details of your project plz)

  • How to use external java files into my project

    Hi all,
    I need your help to import my external java files in to my project.
    The files are in package folder.
    So how to tell the import command with the path of the folder.
    I read also that I can make a jar file and integrate it into the project.
    How can I make jar file.
    Best regards...

    there is one utility in j2se jar and check the option also
    put that jar file in lib folder of yr application folder
    [email protected]

  • *URGENT* importing third party package into Jdev project

    hi,
    our company has bought a thrid party package instead of developing one to speed up the project pace. Some how we cannot import the package into our project environment,
    this is what we do with the package.
    set the class path to where the *.jar files are, for example: C:\AccBank\beta\creditcheck.jar
    please note that the "C:\AccBank\beta\" is where the project file locates.
    and follow is the import statement
    import thirdparty.package1.*;
    please tell us what did we do wrong, if the case in question is not clear, please tell us the steps we need to do to import and use a third party package with JDev.
    Also, please tell me the different purpose between the directory :
    PROJECTFILES and CLASSFILES under the main project directory
    Thank you very much for your time and your help
    Augustina
    null

    Hello,
    I'm not sure about what you mean,
    but in order to use a given package within JDevelopper, you should:
    - select project/project properties,
    - find the libraries tab
    - click "add", then "new"
    - click "class path"
    - click "add ZIP/JAR" and add the various jar files you want to include
    Note: if the included libraries contain subpackages of packages like javax, and you want to deploy your project (as EJB for instance) you will have to edit the deployment profiles in order to add the 3rd party libraries, otherwise, these subpackages won't be deployed (by default, packages suvh as java.lang, javax etc.. are not excluded from the deployment).
    about the PROJECTFILES and CLASSFILES items, they refer to the directories in which your project's source code (PROJECTFILES) and compiled classes (CLASSFILES) are stored
    Hope this helps, Remi
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Augustina:
    hi,
    our company has bought a thrid party package instead of developing one to speed up the project pace. Some how we cannot import the package into our project environment,
    this is what we do with the package.
    set the class path to where the *.jar files are, for example: C:\AccBank\beta\creditcheck.jar
    please note that the "C:\AccBank\beta\" is where the project file locates.
    and follow is the import statement
    import thirdparty.package1.*;
    please tell us what did we do wrong, if the case in question is not clear, please tell us the steps we need to do to import and use a third party package with JDev.
    Also, please tell me the different purpose between the directory :
    PROJECTFILES and CLASSFILES under the main project directory
    Thank you very much for your time and your help
    Augustina <HR></BLOCKQUOTE>
    null

  • I cannot break my java source into packages

    I would like to convert my java source in my Creator project(s) to standard package naming conventions such as com.mycompany.myapp but I'm having difficulty. After renaming the package within the Java Sources folder, and making necessary related corrections in referencing Java source files and managed-beans.xml I still cannot get the application to run. The IDE is also losing the ability to render the JSP source as well due to a broken binding reference that is not kept in sync. In general is it possible to use packages in Creator where the java source files are in sub-directory packages? I happen to be using Windows 2000. But I can use other operating systems if it will work elsewhere.

    Hello Iwan.
    Unfortunately, I was not able to find a clean workaround for implementing a multi-level package structure on an "existing" application.
    I WAS able to do it eventually knowing the desired tree structure I needed to reach (as already noted), but it required a lot of hand editing as Creator appropriately cautions.
    I even had to get into the private "project.prj" file eventually outside of creator in notepad to clean up my structure before I could finish.
    Anyway, I want to repost my prior instructions for implementing package structures on NEW projects.
    I found an error in yesterday's post and some misplaced words. This is a corrected version.
    Also, this approach was not tested exhaustively - but I think it is probably close.
    Again my environment happens to be running on Windows 2000.
    Updated/corrected notes for building a new "packaged" Creator application.
    =====================================================================
    It turns out you can avoid manual editing if you follow this sequence for new applications.
    It is helpful to understand these concepts that steer our procedure:
    1) The "Web Pages" directory and "Java Sources" directory require synchronized directory trees to accomodate the mirror relationship between packaged *****.jsp and *****.java bean backing files.
    2) The "Web pages" directory tree will not display the highest-level node - it apparently shares/references the highest-level package node immediately under the Java Sources folder.
    You will need to substitute your own names for package nodes as desired.
    This example develops the package named "com.company.division.mypackage".
    As such my project directory tree goal is:
    Project Navigator (Logical View)
    =========================
    MyProject
    -- Web Pages
    ---- Resources (ignore for this exercise)
    ---- company
    ------ division
    -------- webapplication1
    ---------- Page1.jsp
    -- Page Navigation (ignore for this exercise)
    -- Managed Beans (ignore for this exercise)
    -- Java Sources
    ---- com
    ------ company
    -------- division
    ---------- webapplication1
    ------------ ApplicationBean1.java
    ------------ Page1.java
    ------------ SessionBean1.java
    + Library References (ignore for this exercise)
    + Data Source References (ignore for this exercise)
    Steps to repackage your application without manual editing:
    ==========================================================
    1) Create a new default application - in our case my case named WebApplication1:
    Use any method you want to create a new project accepting all default naming.
    You will get a project with 3 java beans (Application, Session, and Page) and Page1.jsp.
    I had confusion because of names similar to WebApplication1 used for the Project, Context, Package, and Application.
    The following two options decouple two of these names - that may or may not be helpful for you.
    Optional: Rename project WebApplication1 to MyProject to avoid naming extension confusion:
    Select the top/main folder in the Project Navigator and right click for context menu options
    Select the Rename Project option, enter your desired name, and click OK
    Please allow several seconds for the project refactoring to rebuild your directories
    Optional: Rename project context from webapplication1 to URL context name appropriate for you:
    Select the top/main folder in Project Navigator (Just named MyProject in the preceding example)
    Enter your desired URL Context Path in the Properties window field and press Enter.
    2) Delete the Page1.jsp file and Page1.java file as follows:
    Select the Page1.jsp or Page1.java file
    Right click for a context menu and select the delete option
    Accept/Acknowledge deletion of the synchronized counterpart bean/jsp
    3) Build your new Web Pages directory tree as shown above without a "com" folder:
    Use either the context menu "New > Folder" or "New > Package" option - they both work
    As shown we need to create a 3 level sub-folder: company, then division, then webapplication1
    4) Build your new Java Sources directory tree starting by renaming your package root:
    In the Java Sources folder rename "WebApplication1" package to "com".
    This is accomplished within the context menu accessed via right-click on your mouse.
    Enter "com", press Ok, and then accept "Yes" to rename all package declaration references.
    Enter "Ok" to acknowledge the need for warning about manual editing being necessary.
    Use the context menu "New > Folder" or "New > Package" option - they both work
    to create / add the remaining sub-directory folders within the newly named "com" folder.
    As shown this is 3 more sub-folders: "company", then "division", then "webapplication1".
    5) Copy your Application Bean java file then delete it from the source:
    Right-click on your ApplicationBean1 file and select copy.
    Select (left-click) the target Java Sources > com > company > division > webapplication1
    folder and paste the file copy (Ctrl-v).
    Now delete the original application bean source in the "com" folder with the delete key.
    6) Copy your Session Bean java file then delete it from the source:
    Right-click on your SessionBean1 file and select copy.
    Select (left-click) the target Java Sources > com > company > division > webapplication1
    and paste the file copy (Ctrl-v).
    Now delete the original SessionBean1 source in the "com" folder with the delete key.
    6) Recreate your request Web Pages folder Page1.jsp - the java bean will be echoed:
    Left-click (select) the folder: Web Pages > company > division > webapplication1.
    Right-click for a context menu and select New > Page and type "Page1" and press Enter.
    You should see a new Page1.jsp file in Web Pages > company > division > webapplication1.
    You should see a new Page1.java file in Java Sources > com > company > division > webapplication1.
    You're ready to create code within your company's packaging structure!
    Regards,
    Craig Hunt

  • How to import other package into Dictionaries in nwds web dynpro project

    Hi
        i'm learning JA312, in some topic, there need a method declaration in component controller, the method like this:
      public void showContext(IWDContext context),
       i can add method in method tab in component controller,but can not add parameter of IWDContext types,because in Dictionaries,there are only com.sap.ide.., and not include com.sap.tc.webdynpro.progmodel.api.
    so,how to import package into Dictionaries, for example com.sap.tc.webdynpro.progmodel.api.
    a step by step article is preferred. thank you

    choose "Java Native Type".

  • How to import BC4J package into JDEV project without server.xml file?

    Dear,
    I need to bring the seeded BC4J package into my JDEV OAF project. Usually to do that, once I am sure that all I need is accessible, I open the server.xml file for the BC4J that I need and I am all set - all the items from under that BC4J are brought in.
    How about if there is no server.xml file for that BC4J, for example, under oracle.apps.icx.por.req.webui, and I need to have a controller from under there in my project? Do I create this package (oracle.apps.icx.por.req.webui) manually? If I do that and then open the controller the controller is being brought into JDEV outside the package.
    Thank you.
    Anatoliy

    Sumit,
    Thank for quick response.
    Yes, I agree for the controller.
    But let's say I want to bring over some other xml staff, like some shared regions for example from under that webui. They are also brought outside the package. You have an idea?
    Regards,
    Anatoliy

  • Netbeans 5.5 Visual Web still not support for Java 5 source in Web Project?

    This is really annoying. I would have thought by now that this would be allowed.

    I just converted a project this morning. It wasn't too difficult, it just took a little bit of time getting everything correct. There are a few more changes needed then just the imports. I used a program called rpl (available on windows and unix) to do the find and replacing that was needed. You could easily use sed or some other program to do the same thing.
    Basically, here are the steps.
    1. Create a new EE 5 project and make sure it has the same name and default java package.
    2. Copy your existing .jsp files to the new web dir and existing .java files to the src directory.
    3. Here are the changes I made to the .jsp files:
         bash-2.03$ rpl 'xmlns:ui="http://www.sun.com/web/ui"' 'xmlns:webuijsf="http://www.sun.com/webui/webuijsf"' *
         bash-2.03$ rpl 'ui:' 'webuijsf:' *
         bash-2.03$ rpl 'action=' 'actionExpression=' *
         bash-2.03$ rpl 'valueChangeListener' 'valueChangeListenerExpression' *
    4. And here are the changes to the .java files. Note that there are still some usages of the com.sun.rave.web, so after converting
    everything to com.sun.webui.jsf, I converts a few back to rave:
         bash-2.03$ rpl 'com.sun.rave.web.ui' 'com.sun.webui.jsf' *
         bash-2.03$ rpl 'com.sun.webui.jsf.appbase.AbstractPageBean' 'com.sun.rave.web.ui.appbase.AbstractPageBean' *
         bash-2.03$ rpl 'com.sun.webui.jsf.appbase.AbstractSessionBean' 'com.sun.rave.web.ui.appbase.AbstractSessionBean' *
         bash-2.03$ rpl 'com.sun.webui.jsf.appbase.AbstractApplicationBean' 'com.sun.rave.web.ui.appbase.AbstractApplicationBean' *
         bash-2.03$ rpl 'com.sun.webui.jsf.appbase.AbstractRequestBean' 'com.sun.rave.web.ui.appbase.AbstractRequestBean' *
         bash-2.03$ rpl 'com.sun.webui.jsf.appbase.AbstractFragmentBean' 'com.sun.rave.web.ui.appbase.AbstractFragmentBean' *
    5. You might have to make more changes then this, but this is all I had to do. If you get errors, it is just a matter of figuring out where the error is and then creating a similar action on a new page and looking to see what the correct format is.
    5. Look at your old web/WEB-INF/managed-beans.xml and copy everything between <faces-config> and </faces-config> to the new managed-beans.xml
    6. Look at your old web/WEB-INF/navigation.xml and copy everything between <faces-config> and </faces-config> to the new navigation.xml
    7. Look at your old web/WEB-INF/faces-config.xml and copy and changes you might have made to your new faces-config.xml
    8. Look at your old web/WEB-INF/web.xml and copy and changes you might have made to your new web.xml
    9. Look at your old web/WEB-INF/sun-web.xml and copy and changes you might have made to your new sun-web.xml
    10. Have fun getting your database to work correctly. I have had difficulty getting datasources correct on both old and new projects in VWP, so this could be difficult or easy depending on your database and what you are trying to do. If you are using something like Java DB then you are probably going to have a much easier time then trying to use a third-party JDBC like I was trying to do (MS SQL 2005 JDBC 1.1).
    -Jeff
    http://www.ragtop.org

  • How do you import a package into Forte?

    I'm attempting to use a Java package from http://www.braju.com that essentially implements the standard C functions printf / sprintf, as part of an exercise to convert a C program to Java.
    I can go into a (gasp!) Windows ME DOS window, set my Classpath to include C:\java\classes (where I put the hb15.zip file), and following the directions on Henrik's website I can type:java com.braju.format.Format -helpand see it work- but when I try to compile with Forte, the line...import com.braju.format.*;causes it to say, "package com.braju.format does not exist."
    I just installed the early release (version 3) of Forte, which has no problem with standard Java imports such as:import java.lang.Math;Does anybody know what the problem is?

    Hi.
    I am using NetBeans 3.2 but I think it's pretty the same.
    So here is how to set your classpath for your compiler :
    1) decide what you're using as a compiler : internal or external compiler
    2) go to main menu : Project - > Settings
    3) Expand "Compiler Types" node
    4) Select from here the compiler you're using (internal, external, fastjavac , etc )
    5) click on the "Expert" tab and you'll find a "classpath" field that must be editable
    6) append/add your location to the existing classpath
    Now it should work.
    They may be some (GUI) differences between the Forte and NetBeans main menu, but I think you've got the idea.
    Regards,
    Rick

  • Package into a native installer fails on Linux (Flex SDK 4.5) : "Invalid AIR file"

    Hi,
    We've moved our application to compile against the 4.5 SDK.
    We're compiling it with Flash Builder (on mac) into an air file and as our application is using NativeProcess API, we're packaging it on each platform into a native installer with the following command (linux example) : adt -package -target native app.deb app.air
    We think we fall into the same issue ashttp://forums.adobe.com/message/3271944#3271944 but for the 4.5 DSK.
    On Linux it used to work with the following environment (env1):
    - Ubuntu 10.10
    - Java Sun 1.6.0_24
    - Flex SDK 4.1.0.16076 + Adobe Air SDK 2.5.0
    It stops to work when we upgrade to the new Flex SDK (env2):
    - Ubuntu 10.10
    - Java Sun 1.6.0_24
    - Flex SDK 4.5.0.20967 (with the default embeded Adobe Air SDK 2.6)
    The faut message is "Invalid AIR file" and nothing is logged in the log file (/home/<username>/.appdata/Adobe/AIR/Logs/Install.log).
    1) The .air file is installing correctly on env2 (without the support of the NativeProcess as expected)
    2) We also tried to compile the project directly on env2 :
    amxml app.mxml
    adt -package -storetype pkcs12 -keystore cert.p12 app.air app-app.xml air.swf
    The .air file is installing fine but the packaging into a native process fails in the same way...
    3) We tried to package a native installer of our .air file on env1 and it works!!! (the installed application seems to work fine also on env2!!!)
    Are we missing something or does it seems to be a bug of the Flex SDK 4.5?
    Are there some restrictions to package a native installer with the Flex SDK 4.1 a air app build with the Flex SDK 4.5 ?
    Thanks in advance,
    Mich

    Hi,
    Finally we figure out how to solve the issue.
    The packaging into native .deb installer fails as explain above because with the hole Flex SDK 4.5 (adt -version told 2.6.0.1920).
    The packaging is successfull if only Air SDK 2.6 is install.
    What is strange that both adt seems to be the same "2.6.0.1920" (found with "adt -version").
    Can someone from the Adobe dev team explain it?
    I suppose as the Flex SDK is not available for the Linux platform, the download only contains the Air SDK for Windows and Mac OS as opposed to the specific download of the Air SDK for te Linux platform...
    Thanks,
    Mich

  • Java package

    Hi I'm facing some problem with package. Currently my project import some classes from the file abc.jar. Before including the package keyword for my new class, everything compiles.
    However after I tried adding for example package testing; at the top of the .java files. I begin to get error like:
    cannot resolve symbol class xxx -> which is suppose to retrieve from abc.jar. The first thing that came into my mind is the classpath, have double confirm on the classpath for the .jar files and its already specified in the classpath. The thing that puzzle me is why adding my new class to a package will have compilation error like the above.
    Anybody faced this problem before or have little hint on how to solve it? Kindly post your advice. Thanks! cheers

    xpy wrote:
    Hi, its that statement.... Cause I tried compiling with and without the package keyword and the result is fail and success respectively.This tells us very little other than that you're probably making a mistake. Most Java code is in packages; this works for most people.
    Its really puzzled me. Btw the way the .jar file which I set in my classpath have no directory. Wait. Do you mean to say that the classes in the jar file are all in the default package?
    Who created this crazy jar file?
    When code is in a package, it cannot access classes in the default package. This is why it's generally bad to put classes in the default package if they're non-trival. You certainly shouldn't any class that you expect to be reused and thus might put it in a jar file, in the default package.
    Therefore after setting the classpath to point to the .jar file, therefore I use it directly in my new class without importing. Do you think this is the reason that caused the problem?Yeah.
    Stop using that jar file, because the person who created it doesn't know what he's doing.

  • Is it possible to add other java packages to JDeveloper?

    I am running JDeveloper 9.0.3 and Java SDK 1.4.2.
    I have downloaded the Java Web Services Development Pack (JWSDP) from Sun, and some of the java source files contain import statements for packages that do not exist in my SDK. For example
    import javax.xml.soap.*
    These packages are contained within jar files that come with the JWSDP install. Is there anyway to import these packages into JDeveloper so that it can compile the source files?
    Thanks
    Paul

    Create a new library which will the jar files from JWSDP and add the library to the project.
    Project | Project properties
    Select Libraries
    Click New
    Enter library name (something like JWSDP)
    In the classpath add the jar files
    CLick ok
    Add the new library to selected list
    raghu
    JDev Team

  • Is there Java package to convert docs format?

    I am involved in a project that require to convert(conversion only, no editing) from various document formats to plain text or html. Does anyone know of any packages in JAVA that can do this.
    There are software that do this, but I need java package that will do this instead. Thanks anyone who can give me some direction to look.
    I have got two link from previous other java forum
    1. Jakarta POI project (http://jakarta.apache.org/poi/)
    2. iText site (http://www.lowagie.com/iText/)
    Thanks to them both and anyone that know of the something similar.

    My advice to you:
    1. Design VB/activeX control to do what you want to do. I'm pretty sure there are easy to use activeX controls for this
    2. Wrap your control into a COM interface.
    3. Call your COM object from java.
    Or, if your vehemently anti-ms, you can try to do it all in java. My guess is that trying to do it all in java is pretty hopeless and you'll end up giving up, but it's up to you

  • How can I share a *.java source file across multiple projects in NetBeans?

    I'm sure this simple and a pretty common operation but how can I share a *.java source file across multiple projects in NetBeans? Right now I keep cut, coping and pasting the same source file between multiple projects to re-use the same code. But I could I make this source file a library file or something like that so that I could access it from any project. I assume this would be a generic operation but I mentioned NetBeans for clarity. Thanks.

    fiebigc wrote:
    I know I mentioned NetBeans but I'm most interested in the generic method for creating a library of source files that I can call into whatever program I am developing. I've done such a thing in C using header files and such but I'm trying to get a direction on how this is accomplished in Java. I'm sorry if I could edit the title I would. If anyone wants to be specific about NetBeans I welcome that too.
    Edited by: fiebigc on Jun 20, 2008 5:57 PM
    >I know I mentioned NetBeans but I'm most interested in the generic method for creating a library of source files that I can call into whatever program I am developing. I've done such a thing in C using header files and such but I'm trying to get a direction on how this is accomplished in Java. I'm sorry if I could edit the title I would. If anyone wants to be specific about NetBeans I welcome that too.
    Edited by: fiebigc on Jun 20, 2008 5:57 PM
    Create a class library.
    Write your code, compile it to .class files, put those class files in a .jar file and include the jar file in the classpath whenever you want to compile a project against it.

Maybe you are looking for