Deployment issues-java desktop database application

hello,
i'm vasant...recently visited an online tutorial for creating java desktop database application
here is the URL [http://www.netbeans.org/kb/docs/java/gui-db.html#running-outside-IDE] ...
everything works fine...when building and executing the application from within the NetBeans IDE..6.7
but as instructed in that tutorial...when I tried to run the .jar file after exiting the netbeans IDE, it didnt run...
infact direction has been given in that tutorial for this in the last section....which says that i've to start Java DB from outside the Netbeans IDE...that's where difficulty arises....
i've no idea how to start Java DB manually...
i'd really appreciate if nybody der could...help me out plz
thanx

spring_patel wrote:
i really appreciate you trying to solve my problem..
but i think...my estion is fairly simple and straight forward...and i've provided every detail of my problem(if uv'e read my opening post of this thread)....
and as far as that link goes...i've already checked it b4 u guys mentioned it... as it is provided right there in the tutorial i've provided link of...
and i've tried my options b4 making use of this forum...and i didnt find a solution that's why i'm taking ur help..
nevertheless...i repeat my question...
there's a tutorial at this link...[http://www.netbeans.org/kb/docs/java/gui-db.html]...in it is described how to create a java desktop database applicaiton...
at the end of the tuorial there is a section called: "Building and Deploying the Application"
in that section they have instructed to exit netbeans IDE and try and run the application outside it...which is not happening
the reason they say is that i've to start Java DB from outside of the IDE...that is wat my problem is ..
i dont know how to start Java DB from outside the Netbeans ide...You are not telling us anything.
If I tell you "my automobile doesn't work" how do you know what is wrong. Instead I need to tell you one of the following.
1. The engine didn't start.
2. The wheel fell off.
3. The engine caught fire.
4. When I went to the driveway the car wasn't even there.
When you "run" something then something happens. When I run notepad from a console window if notepad is not in the path then I will get an error about command not found. if it is in the path then the command executes and notepad pops up. Even if I don't see notepad pop up I know that the command seemed to execute from the command window.
The above are examples of describing what you did and what did happen. In detail.
"It doesn't work" provides neither detail about how you ran it nor what did happen when you did attempt to run it.

Similar Messages

  • Simple java/mysql database application question about triggers

    I am planning a new database application using java and mysql. I may want to use some triggers to automatically update the tables when a change is made. my question is this: If I write the trigger, and I use Java to modify the database, will java automatically pause and let the trigger finish doing its task before it continues? what if it writes more to the table before the trigger is finished modifying the table? how do I get java to pause and let the trigger finish?
    thanks for your response

    lduren wrote:
    I am planning a new database application using java and mysql. I may want to use some triggers to automatically update the tables when a change is made. my question is this: If I write the trigger, and I use Java to modify the database, will java automatically pause and let the trigger finish doing its task before it continues? what if it writes more to the table before the trigger is finished modifying the table? how do I get java to pause and let the trigger finish?
    It doesn't have anything to do with java at that point.
    When you execute, for example, an insert statement, then the database executes that statement. The database (not java, not the driver) decides with that statement is complete. Control returns to java when the database decides that execution is complete.
    And except for tricks that one might do (or attempt to do) via SQL or triggers then when the statement execution finishes then everthing has completed running.

  • Deployment issues java.io.IOException: [J2EE Deployment SPI:260]"

    I m using weblogic.Deployer to deploy webservice and getting this error
    java.io.IOException: [J2EE Deployment SPI:260080]Unable to define application install directory at '/tmp/WebService.war'. Directory could not be created or is a file.
    at weblogic.deploy.api.internal.utils.InstallDir.<init>(InstallDir.java:60)
    at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.upload(ServerConnectionImpl.java:624)
    at weblogic.deploy.api.spi.deploy.internal.BasicOperation.uploadFiles(BasicOperation.java:300)
    at weblogic.deploy.api.spi.deploy.internal.BasicOperation.execute(BasicOperation.java:385)
    at weblogic.deploy.api.spi.deploy.internal.BasicOperation.run(BasicOperation.java:169)
    at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.deploy(WebLogicDeploymentManagerImpl.java:369)
    at weblogic.deploy.api.tools.deployer.DeployOperation.execute(DeployOperation.java:47)
    at weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:145)
    at weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:93)
    at weblogic.utils.compiler.Tool.run(Tool.java:158)
    at weblogic.utils.compiler.Tool.run(Tool.java:115)
    at weblogic.Deployer.run(Deployer.java:70)
    at weblogic.Deployer.main(Deployer.java:54)
    I tried to set different tmp dir location as "-Djava.io.tmpdir=${WL_DOMAIN_HOME}/tempdir", but still i get the same Error.
    Any thoughts/help, how to set the location while deploying using weblogic.Deployer.
    Thanks
    Kraz
    Edited by: user10687441 on Dec 5, 2008 4:57 PM

    java weblogic.Deployer -usenonexclusivelock -adminurl http://153.2.3.101:5432 -username test -password test-t -upload -debug -deploy -source ../current-testnet/UdcWebService.war -targets udc
    I added this "-Djava.io.tmpdir=${WL_DOMAIN_HOME}/tempdir" in the start scripts of my admin and managed instances. Thinking by default the deployments were using /tmp/filename
    After some trial-n-error, renaming the war to UdcWS.war ....worked and I m happy :)
    But still curious how it is related to the name "WebService"
    Same command with only name change was successful, nothing changed inside the .war nor start scripts
    java weblogic.Deployer -usenonexclusivelock -adminurl http://153.2.3.101:5432 -username test -password test-t -upload -debug -deploy -source ../current-testnet/UdcWS.war -targets udc
    Any thoughts ?
    Edited by: user10687441 on Dec 6, 2008 5:41 PM

  • Error in deploying the java studio creator application to tomcat

    Hi,
    I'm trying to deploy my Sun Java Studio application to Apache Tomcat 5.0.28.
    A simple JSF web application built using the creator works fine after deploying the war file under tomcat/weapps directory.
    In case of a application with databse connection I'm getting the
    " com.sun.rave.web.ui.appbase.ApplicationException: org.apache.jasper.JasperException: org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null' "
    above error. My application connects to Oracle database using the Oracle Server type provided by the Studio Creator.
    I have copied
    jstl.jar
    standard.jar
    to webapps\%app%\WEB-INF\lib
    The below url is currently not available ( Page not Found )stated as a solution in most of the querries regarding the deplyment to tomcat.
    http://developers.sun.com/prodtech/javatools/jscreator/reference/tips/deploy_to_tomcat.html
    Thanks for any help
    abhi

    I had similar problems.
    I used mysql with tomcat and have mysql in my Creator environment as well but still had the driver message you experienced.
    I found that simply copying the WAR file into the webapp directory in tomcat caused a faulty deployment (it was creating /etc/tomcat5/localhost/YourProject.xml as a directory, not as a file)
    I updated my Projects/MyProject/build.xml to include a deploy target and I manually execute the ant deploy step (having not figured out how to tweak the internal ant within Creator)
    Note that this requires two jar files (see comments in the ant definition)
    <project name="YourRoster" default="default" basedir=".">
        <description>Builds, tests, and runs the project YourProject.</description>
        <import file="nbproject/build-impl.xml"/>
       <property file="build.properties"/>
       <property name="appdir" value="."/>
       <property name="distdir" value="${appdir}/dist"/>
       <property name="warfile" value="${distdir}/${app}.war"/>
       <property name="builddir" value="${appdir}/build"/>
       <path id="classpath">
          <pathelement location="${servlet.api.jar}"/>
          <pathelement location="${jsp.api.jar}"/>
          <fileset dir="${builddir}/WEB-INF/lib">
             <include name="*.jar"/>
          </fileset>  
       </path>
       <!-- requires tomcat/server/lib/catalina-ant.jar -->
       <target name="lrp-init">
          <tstamp/>
          <fail unless="app" message="Run ant -Dapp=... or update 'build.properties'"/>
       </target>
       <target name="deploy-tomcat" depends="dist"
          description="Deploy web application.">
          <echo message="Deploying ${app} ..."/>
          <taskdef name="deploy"  
             classname="org.apache.catalina.ant.DeployTask"/>
          <deploy url="${manager.url}" username="${username}"
             password="${password}" path="/${app}"
             war="file:${warfile}"/>
       </target>
       <target name="undeploy-tomcat" depends="lrp-init"
          description="Undeploy web application.">
          <echo message="Undeploying ${app} ..."/>
          <taskdef name="undeploy"   
             classname="org.apache.catalina.ant.UndeployTask"/>
          <undeploy url="${manager.url}" username="${username}"
             password="${password}" path="/${app}"/>
       </target>
       <!-- requires ant-contrib (http://ant-contrib.sourceforge.net) -->
       <target name="try.undeploy-tomcat" depends="lrp-init"
          description="Call the undeploy task (which may fail).">
          <taskdef resource="net/sf/antcontrib/antcontrib.properties"/> 
          <trycatch>
             <try>
                <ant target="undeploy-tomcat"/>
             </try>
             <catch/>
          </trycatch>
       </target>
       <target name="redeploy-tomcat" depends="try.undeploy-tomcat,deploy-tomcat"
          description="Undeploy and deploy web application.">
       </target>
    </project>In addition, the build.properties...
    jsf.dir=/opt/jsf-1_1_01
    tomcat.dir=/opt/tomcat5
    app=YourProject
    username=tomcatAdminUser
    password=tomcatPassword
    manager.url=http://localhost:8080/manager
    servlet.api.jar=${tomcat.dir}/common/lib/servlet-api.jar
    jsp.api.jar=${tomcat.dir}/common/lib/jsp-api.jar
    jsf.lib.dir=${jsf.dir}/lib
    jstl.lib.dir=${tomcat.dir}/webapps/jsp-examples/WEB-INF/lib
    commons.lib.dir=${tomcat.dir}/server/lib
    jsf.libs=jsf-api.jar,jsf-impl.jar
    jstl.libs=jstl.jar,standard.jar
    commons.libs=commons-beanutils.jar,commons-digester.jarHope this helps.
    ...Lyall

  • Java Webstart Database applications

    Hello all
    Is it possible to write a webstart application that downloads to a remote client and accesses a database on a server via an internet connection? Would the client need JDBC drivers installed? Can these be packaged in the webstart application download? What are the security issues involved?
    If anyone could point me to a good website about this then that would be great!
    Chris

    Most of database does not let you accessing them by a computer other than localhost.
    We are using Servlet to extract the necessary information from the database and to send it (zipped) to the Java Web Start client. The network communication is then very limited.
    That is probably the more efficient and reliable than to access the db directly by the client.
    Regards,
    Benoit

  • HFM deployment issue on EPMA - The application already exists

    The first time I deploy the HFM application everything works fine until I try to redeploy after deleting the application. I have tried registering the application to SS and then try deleting it from there but that does not work. Here is my deployment abort details:
    Submitted Time : Saturday, March 21, 2015 3:38:22 PM
    Last Updated Time : Saturday, March 21, 2015 3:38:33 PM
    User Name : hypadmin
    Process Name :
    Thread : 0
    Server :
    Detail : Initiating Product Action...
    Generating Headers and Callback Information...
    Generating Application Data...
    Posting Product Request...
    Waiting For Status Updates...
    PRODUCT_UPDATE:  Update from product
    Financial Management is transforming metadata from EPMA...
    Creating Application...
    The application already exists.
    Please help and thank you.
    Gideon Seroney

    Got around this issue by creating a classic application over the epma app, provision admin then delete it from consolidation admin.
    Unfortunately it seems that the epma application should never have been registered like a classic app. Always perform 'deploy' and never 'register' since it get stuck in SQL data tables. Unless you are a DBA I would not suggest monkeying with the tables to begin with.
    Thanks!

  • Deployment issue of webcenter portal application

    Hi,
    While deploying webcenter portal application I am getting below exception:
    Caused By: java.lang.ClassNotFoundException: oracle.webcenter.lifecycle.listener.FeatureMetricApplicationListener
    This is what I did:
    1. Created a separate schema using webcenter RCU.
    2. Extended domain for 'custom managed sever' using oracle.wc_custom_portal_template_11.1.1.jar template.
    3. For 3 new data sources (custom), used new schema details.
    4. Restarted domain.
    5. I could see my new managed server running, however there was no machine associated to it and I did that from console.
    Now when I deploy my webcenter portal application on this managed server I am getting problem.
    I tried below solutions but no luck:
    1. Tried deploying ear from console but same error.
    2. Tried deploying ear on admin server but same error.
    Kindly suggest if I am missing any step...
    Thanks!

    it's working now.
    this is what i did:
    1. commented following in weblogic-application.xml file:
    <!--listener>
    <listener-class>oracle.webcenter.lifecycle.listener.FeatureMetricApplicationListener</listener-class>
    </listener-->
    2. then i started getting following error:
    [03:36:42 PM] Weblogic Server Exception: weblogic.application.ModuleException: Failed to load webapp: 'myapp'
    [03:36:42 PM] Caused by: java.lang.ClassNotFoundException: oracle.webcenter.portalwebapp.servlet.PortalErrorServlet
    i found this PortalErrorServlet servlet entry in web.xml file, so i commented that as well.
    n now application is deployed.
    and i got this clue when i deployed sample application available on yannick's site, which got deployed successfully and that application didn't has entry for above classes...
    thanks.
    Edited by: user5636757 on Dec 3, 2012 7:50 AM

  • Using JavaFX to rewrite GUI layer for Java Desktop Swing application

    From the faq's on javafx.com I read the following:
    I currently build applications in Java. Can I reuse my Java libraries in JavaFX Script?
    Yes. You can leverage the power of Java by using any Java library within a JavaFX application.
    This way you can preserve your investment in Java and use JavaFX to build engaging visual experiences.
    Can I use JavaFX to develop a user interface for my Java program?
    While it's easy to write your application in JavaFX and call into Java where necessary,
    the inverse - writing a Java application that calls into JavaFX for the user interface - is not yet true.
    We expect this to be addressed in the near future.
    * Perhaps I'm missing something, but I do not see the difference between the two questions, but they give completely different answers?
    * We have a swing application that we might want to use JavaFX to replace the current Swing user interface, however, we also have alot of business logic / communications code written in
    * Java that we aren't going to rewrite.
    Could someone tell me why the two questions have different answers?
    Thanks. Cheers.

    Hi Josh,
    I'm facing serious issue trying to invoke a javafx class from my java code. Could you please suggest a way to do it. Even hacks would be ood enough for now.
    I have created file Clock.fx. When run individually from my IDE (i'm using NetBeans) it works fine. But when i try to invoke it from a java class in project in throws exception.
    public static void main(String[] args) {
    ScriptEngineManager manager = new ScriptEngineManager();
    JavaFXScriptEngine fxEngine = (JavaFXScriptEngine) manager.getEngineByName("javafx");
    System.out.print("created fxEngine");
    try {
    Object o = fxEngine.eval ("Clock { property: \"Clock\" }");
    fxEngine.invokeMethod (o, "create");
    } catch (Exception ex) {
    ex.printStackTrace();
    I get following exception
    Exception thrown in JavaFX pretty printing: java.io.FileNotFoundException: \tmp\___FX_SCRIPT___.fxdump from StringInputBuffer (The system cannot find the path specified)
    Exception thrown in JavaFX pretty printing: java.io.FileNotFoundException: \tmp\___FX_SCRIPT___.fxdump from StringInputBuffer (The system cannot find the path specified)
    javax.script.ScriptException: compilation failed
    at com.sun.tools.javafx.script.JavaFXScriptEngineImpl.parse(JavaFXScriptEngineImpl.java:255)
    at com.sun.tools.javafx.script.JavaFXScriptEngineImpl.eval(JavaFXScriptEngineImpl.java:145)
    at com.sun.tools.javafx.script.JavaFXScriptEngineImpl.eval(JavaFXScriptEngineImpl.java:136)
    at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:247)
    at newpackage.Main.main(Main.java:29)
    Could you please give a solution to it. I would be obliged.

  • Simple Java ME Database Application Question -JSR-169

    Howdy,
    Using Netbeans to make a simple DB app using Derby's EmbeddedSimpleDataSource, show here:
    [http://wiki.apache.org/db-derby/JavaMESupport]
    I'm almost there except for adding the JSR-169 jar file. Apparently you cant just add the folder to the class path. I don't quite understand why they say the JSR-169 jar file needs to be built? I tried adding the classes to the project - no dice. Tried adding the folder to the class path, which usually works, but still no dice.
    Is there a link or anyplace that the JSR-169 jar file can be downloaded? I/m on windows - to be honest I am not sure how to make that file. Forums show a lot of people having trouble trying to make it.

    If you follow the steps from the above link, you should not get any Security Exception. Please note that Derby folks say that you should add jdbc.jar (or jsr169.jar) to your boot class path, not to your class path. This is exactly what needs to be done to avoid the Security Exception. Alternatively you can add the jar to the extension directory (e.g. /lib/jclFoundation11/ext if you use j9 foundation 1.1).

  • EPMA Deployment Issues (Rollback Database)

    I have seen some posts where users were able to rollback their EPMA databases. This could be helpful when running into deployment issues. Can anyone outline the steps that are needed to rollback an EPMA database?
    Thank you

    spring_patel wrote:
    i really appreciate you trying to solve my problem..
    but i think...my estion is fairly simple and straight forward...and i've provided every detail of my problem(if uv'e read my opening post of this thread)....
    and as far as that link goes...i've already checked it b4 u guys mentioned it... as it is provided right there in the tutorial i've provided link of...
    and i've tried my options b4 making use of this forum...and i didnt find a solution that's why i'm taking ur help..
    nevertheless...i repeat my question...
    there's a tutorial at this link...[http://www.netbeans.org/kb/docs/java/gui-db.html]...in it is described how to create a java desktop database applicaiton...
    at the end of the tuorial there is a section called: "Building and Deploying the Application"
    in that section they have instructed to exit netbeans IDE and try and run the application outside it...which is not happening
    the reason they say is that i've to start Java DB from outside of the IDE...that is wat my problem is ..
    i dont know how to start Java DB from outside the Netbeans ide...You are not telling us anything.
    If I tell you "my automobile doesn't work" how do you know what is wrong. Instead I need to tell you one of the following.
    1. The engine didn't start.
    2. The wheel fell off.
    3. The engine caught fire.
    4. When I went to the driveway the car wasn't even there.
    When you "run" something then something happens. When I run notepad from a console window if notepad is not in the path then I will get an error about command not found. if it is in the path then the command executes and notepad pops up. Even if I don't see notepad pop up I know that the command seemed to execute from the command window.
    The above are examples of describing what you did and what did happen. In detail.
    "It doesn't work" provides neither detail about how you ran it nor what did happen when you did attempt to run it.

  • Web database application design examples wanted

    Hi! I�ve written a couple of smaller web database applications in Java but I�m not completely satisfied with my design, especially where and how to put the database code. Now I�m looking for small open source examples of good design of web database applications in Java. I would appreciate if you could direct me to a good example application, preferably easy to understand. Also feel free to mention any other resource that you think I should look at. At the moment I don�t have the time to read a complete book but I plan to do this later � so book recommendations for professional Java developer are also very welcome.
    Summary of recommendations I would like to get:
    1) Java web database application with good design
    2) Design book for professional Java developers
    3) Any other design related resource
    Thanks!

    http://www.springframework.org/docs/MVC-step-by-step/Spring-MVC-step-by-step.html

  • Questions on deploying Java desktop applications

    Hello,
    I have searched the forums and been unable to find the information I need. I am not sure this is the appropriate forum to post at but had to start somewhere!
    I have a Java desktop application which has only been used internally at my organization for R&D. We are now working with our legal folks on setting up various licensing options. The funding organization today said that they wanted the software set up such that deploying it externally would have behaviors such as:
    * preventing one CD being used to install on multiple machines,
    * preventing someone from copying the installed software from one machine to another,
    * have a way for the software to "expire" after a set amount of time.
    I have never had to deploy software externally before (nor does it seem has anyone else at my organization - we do science R&D) and am at a loss as to how to best do this. I have googled around a bit but not found any solutions. Has anyone here done this and could perhaps give me some pointers?
    Much Thanks,
    Keri

    kgoorley wrote: Hello,
    I have searched the forums and been unable to find the information I need. I am not sure this is the appropriate forum to post at but had to start somewhere!
    Given you new not only to deployment, but also
    posting to these forums, I will take the opportunity
    to point out that I let this post be for a couple of
    days since in had no Dukes assigned. To my
    eye, dukes indicate how important a question is
    to whoever asked it, and I do not generally have
    time to answer questions that are not important.
    You can add dukes to a thread at any time.
    kgoorley wrote: ..licensing options. ..
    * preventing one CD being used to install on multiple machines,
    * preventing someone from copying the installed software from one machine to another,
    * have a way for the software to "expire" after a set amount of time.
    Web start apps. are usually deployed directly off
    a server/internet site. Although deployment off CD
    is theoretically possible, it is uncommon.
    The basic answer to all your questions as asked is 'no'.
    However, if the legal people can take a slightly different
    line, and that server/site has some 'active' element to it
    (e.g. it is generated using servlets), there might be other
    options worth considering.
    The basic approach would be not to sell licenses
    per machine, but per 'use', in the sense that if
    I were to sell you a license, it would be for 'nn users',
    rather than 'nn machines'. This means that if you
    had a license for 'two' users (let's call them Bob
    and Harriet), both Bob and Harriet could use any
    PC in the organization to use the software,
    but once they were both logged in, no further
    users of the software would be allowed.
    The way to achieve this is to have the application
    'phone home' to the server and tell it the
    username(/password). Every 2-3 minutes,
    the app. should get back to the server and
    confirm it is 'still running..'. If the app. cannot
    reach the server, it reports a problem to the
    user, and exits.
    If the server does not get a 'still running' confirmation
    in a time longer than that few minutes, it assumes
    the app. is off-screen, and frees that 'licence slot'.
    The reason to keep letting the server know it is
    there, is that if Harriet were to be logged in, and
    Bob accidentally trips over the power cord and
    drops Harriet's computer in a screaming heap,
    her app. will never have the chance to 'log out'
    and inform the server to free the slot.
    As such, it is important to allow her to log-in again in
    'a few minutes' (which is probably about the amount
    of time it will take her machine to reboot, and chide
    Bob for his oafish carelessness).
    Using this system, the first & second requirements
    above become redundant - as it is not the number of
    PC's that we care about - just the number of users.
    The third requirement could easily be handled on
    the server-side, checking licenses as users
    log-in, and confirming that license is still valid.
    Edited by: AndrewThompson64 on Sep 27, 2007 7:30 AM

  • Java desktop application run problem

    Hi.
    I have designed java desktop application which includes some libraries (XMLparserV2.jar, Ojdbc6.jar,xdb.jar, Orai18n-mapping,jar) with XML ini file.
    Then I have done deploy to jar. After it I relocated jar file and XML ini files to separate directory and ran javaw -jar myjarfile.jar. I can't see anything.
    Where I can see any errors ?
    Thanks for reply in advance.
    Andrii.

    Try running java -jar myjarfile.jar from the command line and see if you get any errors showing up (probably missing classes in your path)

  • Deploying Java Desktop App using executable JAR files

    Hi there.
    Today I am very optimistic about java. I am a beginner, and I had tried (in my few free time) to understand how to deploy java desktop apps.
    I am using the lattest NetBeans IDE to do the programming and it is very very fast and optimized.
    Going to the point, I tried some time ago to deploy an application (made with this IDE) using JAR files, but even though the application run well on my IDE, when I packed it, it rised an error saying that
    java.lang.NoClassDefFoundError: org/netbeans/lib/awtextra/AbsoluteLayout
    I was using an absolute layout on my JFrame forms and this AbsoluteLayout is provided by netbeans and not by the normal SDK.
    I then looked for the absolute layout class and found a jar file in the following path:
    C:\netbeans\modules\ext\AbsoluteLayout.jar
    So I mounted the Jar file in my File Systems and then added the contents of the file to myApp.Jar file.
    I used the automated Jar Recipe Packaging feature of netbeans, that is why I needed to mount the AbsoluteLayout.jar file into my file systems.
    Now it runs fine by just right clicking the MyApp.jar file from Windows Explorer.
    In a next reply to this topic I will include some sample code so that anybody requiring to do such implementation can take this for help.
    Regards!
    JN

    Well,
    I will take some time here to show the basic source code and procedure to create a desktop application, pack it up in a Jar file for deployment, add other classes or jars to the deployment jar file and finally open the jar file as an executable. This applies for either windows and linux environments.
    Take in count i am using Netbeans IDE 3.x (3.5)
    First I open the IDE and create a new project called MyDesktopApp. This is done by going to the menu Project / Project Manager. Then click on the New button and specify the project name and click on OK.
    At this point, the Filesystems tab in the project explorer is empty. So I mount a directory to store myDesktopApp in it. I selected c:\MyDesktopApp but you can select any name you want.
    To mount the directory you follow these steps:
    1. Right-click on File Systems
    2. From the contextual menu select Mount > Local Directory
    3. In the filechooser window, you just browse it and SELECT the directory to mount. Be aware that you can even create the directory on this window. Do not enter (double-click) into the directory you want to mount, just select it and click on finish...
    4.Then the directory entry appears under the filesystems node of the project explorer.
    Now you have to create your application. You can either create a package (special configured and tracked directory) or you can create the clases directly inside the directory. For tidy project, I will create the package.
    To create the package follow these instructions:
    1. Right-click on the mounted directory and from the contextual menu select New > Java Package
    2. In the New Wizard - Java Package window, type the package name and click on finish. I use the "MyDesktopApp" as package name.
    OK. Now the package is created under the mounted directory. Now we have to create the Main Class. In this case I will use a JFRAME as the main class but you can create any class you want.
    To create the JFRAME as main class follow these steps:
    1. Right click on the java package you just created and select New>JFRAME from the contextual menu. If you do not see the JFRAME option on the NEW sub menu you will have to select the All Templates option. I explain the All Templates option now on, it will be easier to use the JFRAME if available. Once you use JFRAME with the all templates then the JFRAME will show up in further NEW usage.
    2. So finally we used the All Templates, and you select the Java GUI Forms > JFRAME form option and click on NEXT.
    3. Give it a name. (I used MyDesktopAppFrm) and click on finish. Be aware you can set advanced options by clicking on next. But for the purposes of this topic we will use default options so click on FINISH
    4. A new JFRAME form appears inside your package. Right click on the form and select Set layout > Absolute Layout.
    5. Add some controls and code. I added a label and a button. And coded the ActionPerformed event of the button to say hello! on the label. this is up to you. The code just looks as follows:
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    // Add your handling code here:
    jLabel1.setText("Hello folks!");
    6. Compile and execute the form.
    Let's say this is our Desktop Application. Now We will pack it in a Jar in two steps...
    A. Create a JAR file (Recipe)
    1. Right-click on your package and select New > All Tempaltes (Long Route) You can also select New > JAR Recipe if available.
    2. On the New Wizard Window, choose the JAR ARchives > JAR Recipe template and click on NEXT
    3. I used MyDesktopApp as the file name and Defaults and then click on Next.
    4. Specify the JAR Contents. Select the Package (not the mounted folder) from the mounted file system and click on add and then click on NEXT twice...
    5. On the JAR Manifest window, click on GENERATE
    6. Edit the manifest in the window to add the following code:
    Main-Class: MyDesktopApp.MyDesktopAppFrm
    7. Ensure the Main-Class definition is the same as your java package and JFRAME name. Click on FINISH
    8. At this point we have a jar file in your project directory but this file wont run because it is missing some Netbeans clases that we will add in the next set of steps... Just to check, compile the file (right click on the JAR file and compile) and try to execute. It must compile but must not execute.(well if it executes you are done. It may execute if you did not set the lay out of the form as AbsoluteLayout)
    B. Add the AbsoluteLayOut to the JAR
    1. Right click on File Systems and select Mount > Archive Files
    2. Look for your netbeans installation folder and select the following file:
    .../netbeans/modules/ext/AbsoluteLayout.jar
    3. Click on finish
    4. Now the JAR File is mounted in the file systems.
    5. Right-click on your MyDesktopApp.JAR file and select properties.
    6. Look for the contents property click once on it and then on its elipsis button [...]
    7. From the FileSystems box in the Contents window, select the AbsoluteLayOut file and click on Add
    8. Then the system asks you if you are sure. Of course you are so click OK. (If not sure, just read the message text and click OK...:-))
    9. Click on OK
    10. Compile your JAR Recipe (right click on it and Compile)
    11. Now you must be able to run the file by right clicking it and EXECUTE.
    12. Also you must be able to run the file by double clicking the file from a Windows Explorer. You may receive a message asking to select the program to run the file with. You must browse and select the Javaw.exe file in the bin directory of your Java RUn Time installation. This is typically located at C:\j2sdk1.4.0_01\jre\bin or something like that. Use the File-Search feature of window to locate the JAVAW.exe file if needed.
    I hope this long explanation helps somebody to deploy Java Desktop applications. Please reply the message if it helps you just to know it was useful.
    Thanks for your time....
    JN

  • Error code:-2147467259 Error code name:failed Java desktop application

    Hi guys,
    I'm trying to run
    Java_JRC_Desktop_View_Report_and_set_database_logon downloaded from this link:
    http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/d0d6f979-3e11-2c10-35a8-ac93994a30ed
    but at runtime my java desktop application throws this Exception:
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: org/apache/log4j/Logger---- Error code:-2147467259 Error code name:failed
    From what depends?
    thx all.

    Hi,
         I am trying to run a java code to export .rtf file to .pdf format. Below is the code
    *String reportname = "D:\\multiLingual.rpt";;*
    *String exportfilename ="D:\\multiLingual.pdf";*
    *//Open report.*
    *ReportClientDocument reportClientDoc = new ReportClientDocument();*
    *reportClientDoc.open(reportname, 0);*
    *//NOTE: If parameters or database login credentials are required, they need to be set before.*
    *//calling the export() method of the PrintOutputController.*
    *//Export report and obtain an input stream that can be written to disk.*
    *//See the Java Reporting Component Developer's Guide for more information on the supported export format enumerations*
    *//possible with the JRC.*
    *ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream)reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF);*
    *//Release report.*
    *reportClientDoc.close();*
    *//Use the Java I/O libraries to write the exported content to the file system.*
    *byte byteArray[] = new byte[byteArrayInputStream.available()];*
    *//Create a new file that will contain the exported result.*
    *File file = new File(exportfilename);*
    *FileOutputStream fileOutputStream = new FileOutputStream(file);*
    *ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(byteArrayInputStream.available());*
    *int x = byteArrayInputStream.read(byteArray, 0, byteArrayInputStream.available());*
    *byteArrayOutputStream.write(byteArray, 0, x);*
    *byteArrayOutputStream.writeTo(fileOutputStream);*
    *//Close streams.*
    *byteArrayInputStream.close();*
    *byteArrayOutputStream.close();*
    *fileOutputStream.close();*
    I am running it through eclipse as a standalone with all the required jar files in the buildpath. However when i run it gives following error in console.
    *com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: An error occured while exporting the report---- Error* *code:-2147467259 Error code name:failed*
    *     at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)*
    *     at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)*
    *     at com.crystaldecisions.reports.sdk.PrintOutputController.export(SourceFile:54)*
    *     at test.main(test.java:34)*
    Thanks in advance
    Abhijeet
    Edited by: Abhijeet D on Jul 7, 2010 5:10 PM
    Edited by: Abhijeet D on Jul 7, 2010 5:24 PM

Maybe you are looking for

  • Can multiple web pages use the same cookie?

    I have an applet that will reside in several different web pages. The applet creates a cookie that saves user preferences and loads them when the user next uses the applet. The problem is that I want the same cookie to load when the user views the sa

  • Problem with finding BADI for transaction F9K2

    I Found many BADIs for the transaction...but am not able to decide which is suitable for my requirement.. my requirement is ..i need to keep check box removing radiobutton in the the transctio F9K2 in tab 'accounts statements'  in  Bk.st.orig column.

  • "The settings saved on this computer for the network"

    Well, I was bored and I thought it would be cool to put a password on my wireless router, and it ended up messing up all 6 laptops in the house... This is probably a frequent question but I've looked it up and many people say the solution is to go to

  • JAVA  File handling. ( Urgent  Response Appreciated)

    Hi I'm pretty new to Java. I would appreciate if any one could write programme for me for the below scenario: Write a Java program which accepts the name of a text file, reads in that file, and prints out the following information about the file: 1.

  • CJR 2 Planning - CO Document

    Hi, When i am doing WBSE planning through CJR2 transaction, system is not generating any CO document, and i could not able to see the line items in PS standard reports of S_ALR_87013543. Regards, S Vasu