How should I deploy my java application

Let's say I have a package with a main class, and the main class uses some class in the package
I export it all in the package in a jar file using Eclipse
Then, I put the jar file in the lib
and run using
java -cp "A1.jar";"lib/*" package/Mainclass
Is this the correct way of running java application?

Well that's one way of running it yes, but certainly not the easiest; this way I'd create a shell script for it.
But you should look into making it an executable jar. Then you can just run it with 'java -jar A1.jar', or if the app does something with a user interface you can probably just double click it in your OS's graphical shell.

Similar Messages

  • What is the best way to deploy a java application ??

    Hi,
    I have a question about "deploying" a java application on to a weblogic server.
    Please advise me how to automate in a best way to Deploy 10 different applications(.ear/.war) to 10 different Clusters(containing 40 Managed servers) in wls6.1......and that too in a Production environment.
    I know of using Weblogic Console OR the "deploy" utility to do so ......BUT if i have like 100 clusters .....then i would have to "deploy" 100 times ......
    is there any way that we can BEST AUTOMATE this process.
    Thanks a lot.
    -sangita

    HELLO!!! WELCOME BACK!! I THINK YOU SHOULD USE
    deploy....Hey Thanks.
    is there any network congestion OR any other problem that i can anticipate before i use "deploy" utility. I have heared of some problems(i couldn't remember them now ....because honestly, i couldn't understand them atall when a BEA consultant told me those...).
    so, any problem that may arise ....that i need to think about before deploying ~10 applications to like ~70-80 clusters ....all at a time.
    thanks again for your advise. iam learning to see the big picture of application deployment.
    -sangita

  • How can I run a java-application on starting of Windows 2000

    How can I run a java-application without any user on starting of Windows 2000?
    For example, if the computer is restarted and nobody enter into it yet, my java-application should run anyway.
    How can I do that?

    Hi, you have to put it in a Windows service.
    To do this you have a program, Srvany.exe that allow to insert a .exe or .bat program in a Windows service.
    For example, i develop a program, TomcatGuardian and i put it in a service because i need to run it in a server without Administrator logged in.
    Regards,
    Ivan.

  • How to call webservice from Java application

    Hi XI gurus
    Pls let me know how to call a webservice from Java application.
    I wanted to build synchronous interface from Java Application to SAP using SAP XI
    For example, i need to create Material master from Java application and the return message from SAP, should be seen in Java application
    Regards
    MD

    Hi,
    If your  JAVA Application is Web based application, you can expose it as Webservice.
    JAVA People will pick the data from Dbase using their application and will send the data to XI by using our XI Details like Message Interface and Data type structure and all.
    So we can Use SOAP Adapter or HTTP in XI..
    If you use HTTP for sending the data to XI means there is no need of Adapter also. why because HTTP sits on ABAP Stack and can directly communicate with the XI Integration Server Directly
    If you are dealing with the Webservice and SAP Applications means check this
    Walkthrough - SOAP  XI  RFC/BAPI
    REgards
    Seshagiri

  • How to send attachments using java application and outlook

    Hi ,
    I created an application in java which is as
    on the Conference Tab i can schedule a conference and with the send command on page it map all the scheduled data to outlook(with all conference details) and using outlook send option the mails are send to appropriate user.
    but now i want to modify this application such as when i use the send command from my jsp page it should attach the file that is in .vcs or .ics format for auto updation of user calender.
    can any one know how to send attachment using java application .

    Last time I checked, SMS was a service between carriers and doing SMS yourself was really tricky. Some services existed to let you do it but as I recall they wanted non-trivial money.
    However, most phone carriers provide an email-to-SMS bridge of some kind.
    So the easiest thing is just to send an email.
    That's sending from a non-phone to a phone. There's a J2ME library to send/receive SMS from/to a phone.
    However, this is from memory, and a little out of date, so I could be entirely wrong. Hope it helps anyway.

  • How to show superscript in ,java application?

    how to show superscript in ,java application? in command prompt and using JOptionPane.showMessageDialog()

    JOptionPane.showMessageDialog(null,"<html>4<sup>2</sup> = 16</html>");

  • How can i get a java application

    how can i get a java application on my mac pro?

    I'm not sure I understand the question. If the application is a standalone applet, you download it as you would any other application or file. If the applet is embedded in a web site, just go to the appropriate web page.
    If you can provide more specifics about what it is you are trying to download/accomplish, perhaps we can be of more specific assistance.
    Regards.

  • How can I debug webdynpro java application?

    hi,
    How can I debug webdynpro java application?
    Thanks

    Check this document
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d0cb32c5-36a7-2910-2c9b-ba4a5bbdbb56
    Also check this sdn thread Re: DeBugginng The WebDynPro Application particularly shailesh kumar posting
    /padmanaban
    Edited by: Padmanaban on Sep 26, 2008 1:55 AM

  • How can I deploy the WAR application in the Tomcat

    How can I deploy the WAR application in the Tomcat. Do I have to do any manifest file.
    Thanks
    S. Nikov

    First of all, which version of Tomcat are you using?
    Deploying a WAR file in Tomcat is very easy. Just put the WAR file in the %TOMCAT_HOME%\webapps directory and start Tomcat. It will automatically find the WAR.
    Please read the Tomcat documentation: start Tomcat and point your browser to http://localhost:8080
    Jesper

  • How should I know which JAVA

    Hello
    How should I know which JAVA I have installed on: when Issue-ing command "java -version".
    I get response like :
    java version "1.4.2"
    Java(TM) 2 Runtime Environment, Standard Edition (build 2.3)
    IBM J9 VM (build 2.3, J2RE 1.4.2 IBM J9 2.3 Linux amd64-64 j9vmxa64142-20080923 (JIT enabled)
    J9VM - 20080922_23329_LHdSMr
    JIT  - 20080815_1845_r8
    GC   - 200809_04)
    I know it comes from files like  "IBMJava2-AMD64-142-SDK-1.4.2-12.0.x86_64.rpm" or " IBMJava2-AMD64-142-SDK-1.4.2-13.2.x86_64.rpm"
    But how to find out. It is an productive system so I can not "try"
    Thank you in advance

    Hello
    In any case java is instaled to /opt/IBMJava2-amd64-142 (this is an unix machine). This is also JAVA_HOME and SAPINST.... variable
    This is when I install from  "IBMJava2-AMD64-142-SDK-1.4.2-12.0.x86_64.rpm" or from "IBMJava2-AMD64-142-SDK-1.4.2-13.2.x86_64.rpm". When I enter java -version I get (as stated before):
    java version "1.4.2"
    Java(TM) 2 Runtime Environment, Standard Edition (build 2.3)
    IBM J9 VM (build 2.3, J2RE 1.4.2 IBM J9 2.3 Linux amd64-64 j9vmxa64142ifx-20090909 (JIT enabled)
    J9VM - 20090908_41946_LHdSMr
    JIT  - 20090210_1447ifx1_r8
    GC   - 200902_24)
    How could I know it comes from "IBMJava2-AMD64-142-SDK-1.4.2-13.2.x86_64.rpm"(version 13 i.e latest) or "IBMJava2-AMD64-142-SDK-1.4.2-12.0.x86_64.rpm"
    Kindly please for help

  • How can i let my java application closes the other opened windows

    how can i let my java application closes the other opened windows: like any other Microsoft Internet Explorer windows ... provided that my java application is not the one i used to open those other windows.... thanks in advance

    you'll have to use JNI to access the windowAPI
    then you need a list of window handles ... I think there was a function called getWindow and in order to close them you use sendMessage .... for details check out msdn (microsoft developer network)
    somwhere I saw a tool called JUtil, which might help you getting started on accessing the win api from java
    regards
    Spieler

  • Deployment of Java application: prepared state

    Hello,
    Weblogic n00b here, so I apologise if this is a seemingly silly question.
    I am deploying a Java application onto Weblogic 11g (server version: 10.3.6.0) via the console, which works perfectly well with no problems.
    However, I now have a requirement to deploy the application onto the server but want to start it (i.e make it active) at a later date... possibly several days in the future.
    Deployment through the console means that the application is made active as soon as I click "Activate changes". Is there any way of completing a deployment so that the application is only "prepared", rather than "active"?
    Thanks for any assistance.

    Hi,
    One thing I would say that when you try to deploy the app and it directly moving into the Active state means that targeted server is already in running mode.
    Make sure that you try to stop the deployment archive when you dont required and it will move to Prepared mode when server is up and running and new state in server shutdown mode.
    Hope this will help you.
    **Note there is so such option for non-active mode deployment.
    Regards,
    Kal

  • I lost my phone, but someone might took it and used my apple id, then how should i, erase all my application, and i don't have a iCloud.

    i lost my phone, but someone might took it and used my apple id, then how should i, erase all my application, and i don't have a iCloud.

    http://support.apple.com/kb/ht2526

  • How to run a pure java application client with ear deployed on 9ias

    Hello all,
    We want to run a pure java application client which is packed with target bean in the same ear file. In the application-client.xml we refer to some EJBs.
    We deployed the ear file which contains ejb jar module and application client module to oracle 9ias 904 through enterprise manager on unix. The jndi.properties we used looks like this
    java.naming.factory.initial=com.evermind.server.rmi.ApplciationClientInitialContextFactory
    java.naming.provider.url=opmn:ormi://opmn_host:opmn_port:oc4j_instance_name/application_name
    java.naming.security.principal=test
    java.naming.security.credentials=test
    Is there anybody knows how to run such an application client? Do we need to provide such a jndi.properties or not at all?
    Thanks,
    9ias user

    Refer OpenEJB User - Oracle ADF Essential and TomEE+
    Also refer Bug in tomee 1.5.2. Fixed in 1.6.
    https://issues.apache.org/jira/browse/TOMEE-756

  • How to deploy a java application -- might be silly but just help me out

    Hi I�ve developed a java application in eclipse. How do I deploy it so that it can be used by others without the help of eclipse? I can run it in eclipse but how do I deliver it to my customers and how can they use it without the help of eclipse or using java runtime commands. Please give me some pointers on this.

    Eclipse can help you to build a jar file for you.
    See: File>Export ...>Java>Jar File
    Don't forget to stick a Manifest file in that jar which points the JVM to
    the class that contains the static main() method.
    kind regards,
    Jos

Maybe you are looking for