How to Compile java project on command prompt

Hello Friends,
I have created one java project in eclipse. It has 3 packages, 4 external jars and one Link source (meaning it uses other java package that is not in the same project folder)
It runs perfectly using eclipse.
Now I want to compile my project and want to run that project.
I tried using "javac -classpath........." but it didn't work for me. Here is the command I used:
I am running this command under my main project folder
javac -classpath ./../../../lib/tools/lib/blur/blur_formats-1.0.jar;./../lib/commons-codec/commons-codec-1.3.jar;./../lib/commons-httpclient/commons-httpclient-3.1.jar;./../lib/commons-logging/commons-logging-1.1.1.jar;./../lib/org.json/org.json.jar;./../lib/smack/3_0_4/smack.jar;./../../../device/branches/viper/Service/blur/common/push/src* ./src/com.proj.hnm.push.StartService.java*
1) /device/branches/viper/Service/blur/common/push/src - is a different package I am referring (not in my current project folder) - it has java files in com.pushsync package
2) ./src/com.proj.hnm.push.StartService.java is my main class, com.proj.hnm package also contains another 2 package, and those other packages also have .java files
Please tell me how do I run my java project?
Thanks

Hi
Since it works fine in Eclipse you should install the [Fat Jar eclipse plugin|http://fjep.sourceforge.net/] which will pack everything thats in your eclipse project into a single jar file. Then you can run: java -jar myProject.jar and it should work.

Similar Messages

  • Running eclipse java project on command prompt

    Hi all,
    I have one simple java project and that is very well running in eclipse. I have added some external JARs to that project. It performs this job- it creates connection to server, and listens to the signals from server.
    My question is - how do I run that java project on command prompt?*
    I want to run that using ANT or simply I want to make a JAR file so I can execute JAR on command prompt. I created JAR, but it doesn't contain external jar which I added to the project. So I was not able to run that project.
    Can you please tell me any of the method - using ANT or by making JAR?
    Also can you be little bit more explanatory in reply?
    Thanks

    I want to make a JAR file so I can execute JAR on command prompt.This is very likely a good way to proceed. It is explained in great detail in Sun's Tutorial in the section on [Packaging Programs in JAR Files|http://java.sun.com/docs/books/tutorial/deployment/jar/index.html].
    I created JAR, but it doesn't contain external jar which I added to the project. So I was not able to run that project.Yes - the jar file you create has to know about the classes and other resources in that external jar. Otherwise, at runtime, the program will not be able to get at the stuff it needs. Usually you don't include that other jar (or its contents) in the jar file you are creating. Instead you provide your jar file with a manifest that describes the other jar's location. Details are also in the tutorial.
    One thing to note is that Sun's tutorial provides a lot of explanatory, conceptual, material. To that end it keeps the context simple and transparent by describing the steps as they would be carried out by someone working at the command line. The Eclipse documentation and forums might provide a more click-this-drag-that "explanation". If you do follow the method in the Tutorial and get stuck, post a description of the actual commands you used and their outcome.

  • How java runs in command prompt and why java runs on it

    how java runs in command prompt and why java runs on it

    command prompt was used before the development of IDEs like RAD,eclipse etc.
    its still used for better understanding of the compilation and errors.
    type the java file and save the file(source file) in the bin folder of ur jdk environment with extension .java. the source file must be the one that has the main method declared.
    in the cmd prompt screen , set the path of bin folder.
    eg:C:/program files/jdk(some version)/bin/...
    for compilation,type:
    javac (source file_name).java and press enter
    for running the file:
    java source file_name

  • How to Compile this prog. i DOS prompt.

    Hey Friends,
    I don't know how to compile this prog. on DOS prompt, kindly tell.
    // My Java Prog.
    package package1;
    import java.awt.Graphics;
    import java.lang.Number;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.awt.Color;
    import java.awt.event.*;
    import java.applet.Applet;
    import java.io.*;
    import java.util.*;
    import java.Applet.*;
    /* <applet code="abc" width=600 height=1000 > </applet> */
    public class abc extends Applet implements Runnable {
    Hashtable dataFile = new Hashtable();
    StringBuffer sb;
    String Date,Time,Freq;
    double KarDmd,KarDwl,KarShr,KarGen;
    boolean flag = true ;
    Thread myThread = null;
    * init
    public void init(){
    setBackground(Color.gray);
    * start
    public void start() {
    System.out.println("Start called"+this.getDocumentBase());
    System.out.println("Start called"+this.getCodeBase());
    myThread = new Thread(this );
    myThread.start();
    }//close thread
    public void run(){
    while (flag){
    try {
    URL url = new URL(this.getCodeBase(),"servlet/FileReadingServlet");
    HttpMessage message = new HttpMessage(url);
    InputStream in = message.sendGetMesage(null);
    ObjectInputStream ois = new ObjectInputStream(in);
    //String readStream = (String)ois.readObject();
    dataFile = (Hashtable)ois.readObject();
    //sb = new StringBuffer(readStream);
    System.out.println("Applet Read :"+dataFile);
    this.repaint();
    try {
    Thread.sleep(10000);
    }catch (InterruptedException io){}
    }catch (Exception e){
    e.printStackTrace();
    flag = false;
    }//while
    }//close run
    public void paint (Graphics g){
    g.clearRect(0,0,700,450);
    g.drawString("Date :", 500,16);
    g.drawString((String)dataFile.get("DATE"), 550,16);
    g.drawString("TIME:",500,32);
    g.drawString((String)dataFile.get("TIME"), 550,32);
    g.drawString("FREQ :",500,48);
    g.drawString((String)dataFile.get("FREQ"), 550,48);
    // "KARNATAKA"
    g.setColor(Color.cyan);
    g.drawRect(10,50,150,100);
    g.fillRect(10,50,150,100);
    g.setColor(Color.black);
    g.drawString("KARNATAKA",25,65);
    g.drawLine(160,100,250,100);
    g.drawString("GENERATION ",12,87);
    String KAR_GEN = this.getGeneration((String)dataFile.get("KAR_DMD"),
    (String)dataFile.get("KAR_DRL"));
    g.drawString(KAR_GEN ,120,87);
    g.drawString("SCHEDULE",12,107);
    g.drawString((String)dataFile.get("KAR_SHD"),120,107);
    g.drawString("DRAWL ",12,127);
    g.drawString((String)dataFile.get("KAR_DRL"),120,127);
    g.drawString("DEMAND ",12,147);
    g.drawString((String)dataFile.get("KAR_DMD"),120,147);
    g.drawLine(92,70,92,150);
    //"KAPS"
    g.setColor(Color.green);
    g.drawRect(12,5,85,30);
    g.fillRect(12,5,85,30);
    g.setColor(Color.black);
    g.drawString("KAPS",14,20);
    g.drawString("DEMAND:",14,35);
    g.drawString((String)dataFile.get("KAPS_DMD"),70,35);
    //"GOA"
    g.setColor(Color.magenta);
    g.drawRect(100,5,85,30);
    g.fillRect(100,5,85,30);
    g.setColor(Color.black);
    g.drawString("GOA",104,20);
    g.drawString("DEMAND:", 104,35);
    g.drawString((String)dataFile.get("GOA_DMD"),160,35);
    // "ANDHRA PRADESH"
    g.setColor(Color.orange);
    g.drawRect(250,50,150,100);
    g.fillRect(250,50,150,100);
    g.setColor(Color.black);
    g.drawLine(32,37,32,50);
    g.drawLine(110,35,110,50);
    g.drawString("ANDHRA PRADESH",268,65);
    g.drawString("GENERATION ",252,87);
    String AP_GEN = this.getGeneration((String)dataFile.get("AP_DMD"),
    (String)dataFile.get("AP_DRL"));
    g.drawString(AP_GEN,350,87);
    g.drawString("SCHEDULE",252,107);
    g.drawString((String)dataFile.get("AP_SHD"),350,107);
    g.drawString("DRAWL",252,127);
    g.drawString((String)dataFile.get("AP_DRL"),350,127);
    g.drawString("DEMAND",252,147);
    g.drawString((String)dataFile.get("AP_DMD"),350,147);
    g.drawLine(332,70,332,150);
    // "NTPC"
    g.setColor(Color.pink);
    g.drawRect(250,3,85,30);
    g.fillRect(250,3,85,30);
    g.setColor(Color.black);
    g.drawString("NTPC",252,14);
    g.drawString("DEMAND:",252,30);
    g.drawString((String)dataFile.get("NTPC_DMD"),305,30);
    //"HVDC"
    g.setColor(Color.green);
    g.drawRect(350,3,85,30);
    g.fillRect(350,3,85,30);
    g.setColor(Color.black);
    g.drawString("HVDC",352,14);
    g.drawString("DEMAND:",352,30);
    g.drawString((String)dataFile.get("HVDC_DMD"),405,30);
    //"GAUZACK"
    g.setColor(Color.magenta);
    g.drawRect(450,80,90,30);
    g.fillRect(450,80,90,30);
    g.setColor(Color.black);
    g.drawString("GAZ",452,90);
    g.drawString("DEMAND:",452,105);
    g.drawString((String)dataFile.get("GAZ_DMD"),510,105);
    g.drawLine(160,250,250,250);
    g.drawLine(85,150,85,200);
    g.drawLine(160,125,250,225);
    g.drawLine(270,300,270,330);
    g.drawLine(370,300,370,330);
    g.drawLine(400,230,450,230);
    g.drawLine(400,100,450,100);
    g.drawLine(270,33,270,50);
    g.drawLine(370,33,370,50);
    //"KERALA"
    g.setColor(Color.green);
    g.drawRect(10,200,150,100);
    g.fillRect(10,200,150,100);
    g.setColor(Color.black);
    g.drawString("KERALA",62,215);
    g.drawString("GENERATION ",12,237);
    String KER_GEN = this.getGeneration((String)dataFile.get("KER_DMD"),
    (String)dataFile.get("KER_DRL"));
    g.drawString((String)dataFile.get("KER_GEN"),120,237);
    g.drawString("SCHEDULE ",12,257);
    g.drawString((String)dataFile.get("KER_SHD"),120,257);
    g.drawString("DRAWL",12,277);
    g.drawString((String)dataFile.get("KER_DRL"),120,277);
    g.drawString("DEMAND",12,297);
    g.drawString((String)dataFile.get("KER_DMD"),120,297);
    //"TAMIL NADU"
    g.drawLine(92,220,92,300);
    g.drawLine(325,150,325,200);
    g.setColor(Color.yellow);
    g.drawRect(250,200,150,100);
    g.fillRect(250,200,150,100);
    g.setColor(Color.black);
    g.drawString("TAMIL NADU",272,215);
    g.drawString("GENERATION ",252,237);
    String TN_GEN = this.getGeneration((String)dataFile.get("TN_DMD"),
    (String)dataFile.get("TN_DRL"));
    g.drawString((String)dataFile.get("TN_GEN"),350,237);
    g.drawString("SCHEDULE ",252,257);
    g.drawString((String)dataFile.get("TN_SHD"),350,257);
    g.drawString("DRAWL ",252,277);
    g.drawString((String)dataFile.get("TN_DRL"),350,277);
    g.drawString("DEMAND:",252,297);
    g.drawString((String)dataFile.get("TN_DMD"),350,297);
    g.drawLine(332,220,332,300);
    // "PONDYCHERRY"
    g.setColor(Color.magenta);
    g.drawRect(450,220,90,30);
    g.fillRect(450,220,90,30);
    g.setColor(Color.black);
    g.drawString("PDY",452,230);
    g.drawString("DEMAND:",452,245);
    g.drawString((String)dataFile.get("PDY_DMD"),510,245);
    //"NLY"
    g.setColor(Color.green);
    g.drawRect(250,330,90,30);
    g.fillRect(250,330,90,30);
    g.setColor(Color.black);
    g.drawString("NLY",252,340);
    g.drawString("DEMAND:",252,355);
    g.drawString((String)dataFile.get("NLY_DMD"),310,355);
    //"MAPS"
    g.setColor(Color.pink);
    g.drawRect(350,330,90,30);
    g.fillRect(350,330,90,30);
    g.setColor(Color.black);
    g.drawString("MAPS",352,340);
    g.drawString("DEMAND:",352,355);
    g.drawString((String)dataFile.get("MAPS_DMD"),410,355);
    g.setColor(Color.black);
    //g.drawLine(440,306,620,306);
    //g.drawLine(440,332,620,332);
    //g.drawLine(440,358,620,358);
    //g.drawLine(530,280,530,388);
    for(int i=70;i<150;i=i+20) g.drawLine(10,i,160,i);
    for(int i=70;i<150;i=i+20) g.drawLine(250,i,400,i);
    for(int i=220;i<300;i=i+20) g.drawLine(10,i,160,i);
    for(int i=220;i<300;i=i+20) g.drawLine(250,i,400,i); }//close paint
    * stop
    public void stop() {
    myThread.destroy();
    * destroy
    public void destroy() {
    * getAppletInfo
    * @return java.lang.String
    public String getAppletInfo() {
    return "Applet Information";
    private String getGeneration(String DMD,String DRL){
    double _gen = 0;
    if ( ( DMD != null) && ( DRL != null)){
    Double DMDOB = new Double(DMD);
    Double DRLOB = new Double(DRL);
    gen = DMDOB.doubleValue() - _DRLOB.doubleValue();
    return new Double (_gen).toString();
    } //close class

    Change your directory to the directory above package1.
    Assuming that you've got d:/projects/src/package1/abc.java you'd want to be in d:/projects/src.
    Run javac referencing the abc class relatively:
    d:\projects\src> javac package1/abc.javaThis should get you abc.class in the package1 directory.
    Hope this helps.

  • How to compile jsp project on the plateform of Myeclipse and jboss

    hi
    I m new in jboss application server with myeclipse plateform.
    im unable to solve this error.which are occured doring the starting of server in my eclipse.
    the error is:-----
    13:12:41,484 INFO [Server] Starting JBoss (MX MicroKernel)...
    13:12:41,500 INFO [Server] Release ID: JBoss [Zion] 4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)
    13:12:41,515 INFO [Server] Home Dir: C:\Program Files\jboss-4.0.4.GA
    13:12:41,515 INFO [Server] Home URL: file:/C:/Program Files/jboss-4.0.4.GA/
    13:12:41,515 INFO [Server] Patch URL: null
    13:12:41,515 INFO [Server] Server Name: default
    13:12:41,515 INFO [Server] Server Home Dir: C:\Program Files\jboss-4.0.4.GA\server\default
    13:12:41,515 INFO [Server] Server Home URL: file:/C:/Program Files/jboss-4.0.4.GA/server/default/
    13:12:41,531 INFO [Server] Server Log Dir: C:\Program Files\jboss-4.0.4.GA\server\default\log
    13:12:41,531 INFO [Server] Server Temp Dir: C:\Program Files\jboss-4.0.4.GA\server\default\tmp
    13:12:41,531 INFO [Server] Root Deployment Filename: jboss-service.xml
    13:12:44,015 INFO [ServerInfo] Java version: 1.4.2_05,Sun Microsystems Inc.
    13:12:44,015 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.4.2_05-b04,Sun Microsystems Inc.
    13:12:44,015 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
    13:12:45,750 INFO [Server] Core system initialized
    13:12:55,515 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
    13:13:09,218 INFO [WebService] Using RMI server codebase: http://shabrez:8083/
    13:13:19,578 INFO [MailService] Mail Service bound to java:/Mail
    13:13:20,484 INFO [NamingService] JNDI bootstrap JNP=/0.0.0.0:1099, RMI=/0.0.0.0:1098, backlog=50, no client SocketFactory, Server SocketFactory=class org.jboss.net.sockets.DefaultSocketFactory
    13:13:20,718 INFO [SubscriptionManager] Bound event dispatcher to java:/EventDispatcher
    13:13:25,109 INFO [CorbaNamingService] Naming: [IOR:000000000000002B49444C3A6F6D672E6F72672F436F734E616D696E672F4E616D696E67436F6E746578744578743A312E3000000000000200000000000000D8000102000000000E3139322E3136382E302E313331000DC8000000114A426F73732F4E616D696E672F726F6F74000000000000050000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001000000210000005000000000000000010000000000000024000000200000007E00000000000000010000000E3139322E3136382E302E313331000DC9000000000000000000000000000000000000000000000000000000000000002000000004000000000000001F0000000400000003000000010000002000000000000000020000002000000004000000000000001F0000000400000003]
    13:13:25,812 INFO [CorbaTransactionService] TransactionFactory: [IOR:000000000000003049444C3A6F72672F6A626F73732F746D2F69696F702F5472616E73616374696F6E466163746F72794578743A312E30000000000200000000000000D8000102000000000E3139322E3136382E302E313331000DC8000000144A426F73732F5472616E73616374696F6E732F46000000050000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001000000210000005000000000000000010000000000000024000000200000007E00000000000000010000000E3139322E3136382E302E313331000DC9000000000000000000000000000000000000000000000000000000000000002000000004000000000000001F0000000400000003000000010000002000000000000000020000002000000004000000000000001F0000000400000003]
    13:13:27,875 INFO [Embedded] Catalina naming disabled
    13:13:28,140 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
    13:13:28,140 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
    13:13:29,390 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
    13:13:29,390 INFO [Catalina] Initialization processed in 1250 ms
    13:13:29,406 INFO [StandardService] Starting service jboss.web
    13:13:29,406 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.17
    13:13:29,562 INFO [StandardHost] XML validation disabled
    13:13:29,640 INFO [Catalina] Server startup in 250 ms
    13:13:30,671 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
    13:13:31,906 INFO [WebappLoader] Dual registration of jndi stream handler: factory already defined
    13:13:33,515 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/
    13:13:34,015 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp13610jbossws-exp.war/
    13:13:34,531 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
    13:13:35,359 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
    13:13:39,453 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
    13:13:39,593 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
    13:13:39,687 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
    13:13:39,781 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
    13:13:39,906 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
    13:13:40,031 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
    13:13:44,234 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:name=DefaultDS,service=DataSourceBinding' to JNDI name 'java:DefaultDS'
    13:13:45,640 INFO [A] Bound to JNDI name: queue/A
    13:13:45,656 INFO Bound to JNDI name: queue/B
    13:13:45,656 INFO [C] Bound to JNDI name: queue/C
    13:13:45,656 INFO [D] Bound to JNDI name: queue/D
    13:13:45,656 INFO [ex] Bound to JNDI name: queue/ex
    13:13:45,718 INFO [testTopic] Bound to JNDI name: topic/testTopic
    13:13:45,734 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
    13:13:45,734 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
    13:13:45,750 INFO [testQueue] Bound to JNDI name: queue/testQueue
    13:13:46,000 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093
    13:13:46,140 INFO [DLQ] Bound to JNDI name: queue/DLQ
    13:13:46,609 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:name=JmsXA,service=ConnectionFactoryBinding' to JNDI name 'java:JmsXA'
    13:13:46,750 ERROR [MainDeployer] Could not create deployment: file:/C:/Program Files/jboss-4.0.4.GA/server/default/deploy/helloword.war/
    java.lang.UnsupportedClassVersionError: com/jbosstest/testJboss (Unsupported major.minor version 49.0)
         at java.lang.ClassLoader.defineClass0(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at org.jboss.ws.server.WebServiceDeployerJSE.isWebserviceDeployment(WebServiceDeployerJSE.java:151)
         at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java:101)
         at org.jboss.ws.server.WebServiceDeployerJSE.create(WebServiceDeployerJSE.java:66)
         at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
         at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
         at $Proxy41.create(Unknown Source)
         at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
         at sun.reflect.GeneratedMethodAccessor7.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
         at $Proxy6.deploy(Unknown Source)
         at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
         at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
         at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
         at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
         at $Proxy0.start(Unknown Source)
         at org.jboss.system.ServiceController.start(ServiceController.java:417)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
         at $Proxy4.start(Unknown Source)
         at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
         at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
         at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
         at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
         at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
         at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
         at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
         at $Proxy5.deploy(Unknown Source)
         at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
         at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
         at org.jboss.Main.boot(Main.java:200)
         at org.jboss.Main$1.run(Main.java:464)
         at java.lang.Thread.run(Thread.java:534)
    13:13:47,000 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
    13:13:47,625 INFO [TomcatDeployer] deploy, ctxPath=/testproject, warUrl=.../deploy/testproject.war/
    13:13:48,578 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
    --- Incompletely deployed packages ---
    org.jboss.deployment.DeploymentInfo@abba8a12 { url=file:/C:/Program Files/jboss-4.0.4.GA/server/default/deploy/helloword.war/ }
    deployer: MBeanProxyExt[jboss.web:service=WebServer]
    status: Deployment FAILED reason: com/jbosstest/testJboss (Unsupported major.minor version 49.0)
    state: FAILED
    watch: file:/C:/Program Files/jboss-4.0.4.GA/server/default/deploy/helloword.war/WEB-INF/web.xml
    altDD: null
    lastDeployed: 1148111026703
    lastModified: 1147940958000
    mbeans:
    13:13:48,796 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
    13:13:49,125 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
    13:13:49,312 INFO [JkMain] Jk running ID=0 time=0/328 config=null
    13:13:49,328 INFO [Server] JBoss (MX MicroKernel) [4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)] Started in 1m:7s:797ms
    plz send me the solution of this error.
    Thanks.

    I m new in jboss application server with myeclipse plateform.
    im unable to solve this error.which are occured doring the starting of server in my eclipse.
    How to compile jsp project on the plateform of Myeclipse and jboss
    hi :-) this is not eclipse forum and not that sure about your problem but i'll try to answer :-)
    i'm not sure how you create your war but there something wrong with your web.xml. kindly check it :-)
    by d way, you can deploy your project in my-eclipse by
    - right click on the project then select my-eclipse > Add and Remove Project Deployment's
    - a new window will open and you can now configure how you deploy your project :-)
    other alternative edit your jboss-service.xml then put something like this
    <attribute name="URLs">deploy/, file:/D:/workspace/deploy</attribute>
    (note, change the path according to your needs)
    regards,

  • How to compile java to exe by JDeveloper?

    How to compile java to exe by JDeveloper?

    You used to be able to use exegen to generate stand alone executables for Windows, but this no longer works in later versions of Windows. It works for Windows 98 and NT. For example
    exegen/main:schedserv /out:sched.exe schedserv.class scheduler.class
    will generate the executable sched.exe from the two class files.
    Probably MicroSoft decided to make life a bit harder for Java users.

  • How i can open a new command prompt from one java from

    hi
    can any one help me that how i can open a command prompt by using the java program file .
    regards,
    ukbasak

    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Runtime.html#exec(java.lang.String)
    and several overloads.
    Also
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ProcessBuilder.html

  • How to run a java program in command prompt

    hi i want to run a java program from in command prompt from another directory
    i want to run a file named First in C:\Program Files\Java\jdk1.6.0_07\bin
    so when i give the command
    java "C:\Program Files\Java\jdk1.6.0_07\bin\First"
    it doesnt works it shows
    C:\>java "C:\Program Files\Java\jdk1.6.0_07\bin\First"
    Exception in thread "main" java.lang.NoClassDefFoundError: C:\Program Files\Java
    \jdk1/6/0_07\bin\First
    Caused by: java.lang.ClassNotFoundException: C:\Program Files\Java\jdk1.6.0_07\b
    in\First
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: C:\Program Files\Java\jdk1.6.0_07\bin\First. Pro
    gram will exit.

    but it prints
    C:\>java -cp "C:\Program Files\Java\jdk1.6.0_07\bin\" First
    Usage: java [-options] class [args...]
    (to execute a class)
    or java [-options] -jar jarfile [args...]
    (to execute a jar file)
    where options include:
    -client to select the "client" VM
    -server to select the "server" VM
    -hotspot is a synonym for the "client" VM [deprecated]
    The default VM is client.
    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
    A ; separated list of directories, JAR archives,
    and ZIP archives to search for class files.
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version and exit
    -version:<value>
    require the specified version to run
    -showversion print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
    include/exclude user private JREs in the version search
    -? -help print this help message
    -X print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
    enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
    disable assertions
    -esa | -enablesystemassertions
    enable system assertions
    -dsa | -disablesystemassertions
    disable system assertions
    -agentlib:<libname>[=<options>]
    load native agent library <libname>, e.g. -agentlib:hprof
    see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
    load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
    load Java programming language agent, see java.lang.instrument
    -splash:<imagepath>
    show splash screen with specified image
    C:\>

  • How to pass Key Event from command prompt to the java application

    If iam running a application that displays JFrame when i pressed CTR+C at the command prompt i.e console window please let me know how can it be passed to the JFrame ie application window

    I doubt that you can pass Ctrl+C to the application since the application is terminated by this key combination.
    You would try adding a WindowListener or may use a shutdown hook to capture the termination of the JVM.

  • Running a java application in command prompt

    hi, I'm new to this forum.
    I would like to know what exactly needs to be specified to run a java application in a normal DOS command prompt.
    I know it is something like:
    javaw -classpath .\class GUI.applicationGUI
    where applicationGUI is the main class, right? What else do I need to do, since I have some other non-GUI classes that I need, inside the class folder ?
    Thanks for your time.

    You need to import those classes. And you need to make packages.
    In classes 1, 2 and 3 put:
    package class;
    In class 4 put;
    package class.GUI;
    Then you need to make the connection:
    In classes 1,2 and 3 put:
    import class.GUI.*;
    In class 4 put:
    import class.*;
    Compile each directory separately while in the respective directory. javac *.java
    Then go back to the directory above the directory "class" and run
    java class/GUI/name_of_file_containing_main_method

  • How to compile Java files using Ant in Eclipse

    Hi All ,
    I would like to compile all Java files using Ant in Eclipse.Since am very new to Ant and Eclipse can someone help me to create a build.xml file and let me know how to compile all the java files.
    For ex , I have placed my java files inside the path C:\HEC\Terab.Initially the Terab folder holds 7 jar files which i had decompiled using JD compiler and placed the unzipped 7 folders (which contains the java files ).Now i have imported the HEC project into Eclipse using New ->Project ->Java Project.after importig it throwed me an error saying missing jar files.again i copied the jar files and placed inside Terab folder with other 7 folder.
    Now How i can compile the java files and convert in to class files.Then after compiling the files i will again need to jar all the 7 folder.
    Please tell me the steps i need to follow.How to write an build.xml file ? where i should keep it ? only one build.xml file is enough or should i write 7 build.xml file for each folder ? Please help me out...
    Thanks & Regards
    Kar1983

    put it another way, what I am trying to do is to compile David Brackeen's ch 18 code from his book. The java sourse files can be downloaded here:
    http://www.brackeen.com/javagamebook/
    my question is that how would I complie all of these file so that I can get the program in ch18src\src\com\brackeen\javagamebook\test\ to run?

  • Java6: How to compile java using JavaCompiler class

    Hi all,
    Using JavaCompiler, we can run the java program thru programmaticaly using run() method.
    Could anyone please tell me how to compile a java program using JavaCompailer class? Or calling run() itself will compile java file?
    Thanks
    Shagil

    import spoon.support.input.SpoonInputStream;
    import com.sun.tools.javac.code.Symbol.ClassSymbol;
    import com.sun.tools.javac.comp.Attr;
    import com.sun.tools.javac.comp.AttrContext;
    import com.sun.tools.javac.comp.Enter;
    import com.sun.tools.javac.comp.Env;
    import com.sun.tools.javac.comp.Todo;
    import com.sun.tools.javac.tree.Tree;
    import com.sun.tools.javac.tree.Tree.ClassDef;
    import com.sun.tools.javac.tree.Tree.TopLevel;
    import com.sun.tools.javac.util.Abort;
    import com.sun.tools.javac.util.Context;
    import com.sun.tools.javac.util.List;
    import com.sun.tools.javac.util.ListBuffer;
    import com.sun.tools.javac.util.Log;
    import com.sun.tools.javac.util.Name;
    * The Spoon compiler (uses javac).
    public class SpoonCompiler extends com.sun.tools.javac.main.JavaCompiler {
         Attr attr;
         Enter enter;
         boolean hasBeenUsed = false;
         Log log;
         Todo todo;
         public SpoonCompiler(Context arg0) {
              super(arg0);
              enter = Enter.instance(arg0);
              todo = Todo.instance(arg0);
              log = Log.instance(arg0);
              attr = Attr.instance(arg0);
              sourceOutput=true;
          * Main method: compile a list of files, return all compiled classes
          * @param filenames
          *            The names of all files to be compiled.
         @SuppressWarnings("unused")
         public List<Tree> parseAndAttribute(List<SpoonInputStream> filenames)
                   throws Throwable {
              // as a JavaCompiler can only be used once, throw an exception if
              // it has been used before.
              assert !hasBeenUsed : "attempt to reuse JavaCompiler";
              hasBeenUsed = true;
              long msec = System.currentTimeMillis();
              ListBuffer<ClassSymbol> classes = new ListBuffer<ClassSymbol>();
              try {
                   // parse all files
                   ListBuffer<Tree> trees = new ListBuffer<Tree>();
                   for (List<SpoonInputStream> l = filenames; l.nonEmpty(); l = l.tail) {
                        trees.append(parse(l.head.getFileName(),l.head.getStream()));
                   // enter symbols for all files
                   List<Tree> roots = trees.toList();
                   if (errorCount() == 0)
                        enter.main(roots);
                   // If generating source, remember the classes declared in
                   // the original compilation units listed on the command line.
                   List<ClassDef> rootClasses = null;
                   if (sourceOutput || stubOutput) {
                        ListBuffer<ClassDef> cdefs = new ListBuffer<ClassDef>();
                        for (List<Tree> l = roots; l.nonEmpty(); l = l.tail) {
                             for (List<Tree> defs = ((TopLevel) l.head).defs; defs
                                       .nonEmpty(); defs = defs.tail) {
                                  if (defs.head instanceof ClassDef)
                                       cdefs.append((ClassDef) defs.head);
                        rootClasses = cdefs.toList();
                   while (todo.nonEmpty()) {
                        Env<AttrContext> env = todo.next();
                        // save tree prior to rewriting
                        Tree untranslated = env.tree;
                        // attribution phase
                        if (verbose)
                             printVerbose("checking.attribution", env.enclClass.sym);
                        Name prev = log.useSource(env.enclClass.sym.sourcefile);
                        attr.attribClass(env.tree.pos, env.enclClass.sym);
                   return trees.toList();
              } catch (Abort ex) {
                   ex.printStackTrace();
              if (verbose)
                   printVerbose("total", Long.toString(System.currentTimeMillis()
                             - msec));
              int errCount = errorCount();
              if (errCount == 1)
                   printerCount("error", errCount);
              else
                   printerCount("error.plural", errCount);
              if (log.nwarnings == 1)
                   printerCount("warn", log.nwarnings);
              else
                   printerCount("warn.plural", log.nwarnings);
              return null;
         private void printerCount(String str, int val) {
              System.err.println(str + " - " + val);
         private void printVerbose(String arg0, Object obj) {
              System.out.println(arg0 + " - " + obj.toString());
    --- NEW FILE: CtBuilder.java ---
    package spoon.support.builder;
    import java.util.ArrayList;
    import java.util.Collection;
    import java.util.List;
    import java.util.Map;
    import java.util.Set;
    import java.util.Stack;
    import java.util.TreeSet;
    import spoon.query.Query;
    import spoon.query.TypeFilter;
    import spoon.reflect.CtFactory;
    import spoon.reflect.code.BinaryOperatorKind;
    import spoon.reflect.code.CtAbstractInvocation;
    import spoon.reflect.code.CtArrayAccess;
    import spoon.reflect.code.CtAssert;
    import spoon.reflect.code.CtAssignment;
    import spoon.reflect.code.CtBinaryOperator;
    [...1760 lines suppressed...]
                var.setSimpleName(tree.sym.name.toString());
                var.setModifiers(getModifiers(tree.mods.flags));
                enter(var, tree);
                scan(tree.init);
                exit(var, tree);
        @Override
        public void visitWhileLoop(WhileLoop tree) {
            CtWhile whileLoop = new CtWhileImpl();
            enter(whileLoop, tree);
            builderContext.loopParameter = 1;
            scan(tree.cond);
            builderContext.loopParameter = 0;
            scan(tree.body);
            exit(whileLoop, tree);
    }

  • How to use -open option at command prompt

    Can someone update me with how to use -open option while launching javaws from command prompt. Sun documnetation (http://java.sun.com/javase/6/docs/technotes/tools/share/javaws.html#runoptions) is not very clear.
    I am trying to do something like this
    javaws -open prop1 firstName prop2 lastName http://myapp.jnlp
    However the above does not work. It says incorrect argument firstName.
    Cheers
    Amit

    The syntax as present in JWS documentation
    javaws [run-options] <jnlp>
    [run-options] Command-line run-options. run-options may be in any order. For a discussion of the various run-options, see RUN-OPTIONS below.
    <jnlp> This can be either the path of, or the Uniform Resource Locater (URL) of the JNLP (Java Network Launching Protocol) file.

  • Using Java in windows command prompt

    Hi,
    I don't know if I have been searching correctly, but I haven't found a solution to my problem through common search engines.
    I'm programming in java using vim (accessed through windows command prompt), and I've created classes, everything compiles fine.
    However, I wanted to test my classes my creating instances of them (i.e. objects) through the same windows command line (command prompt). I know you can achieve this by using interaction panes through third party programs such as Dr.Java and eclipse, but I was wondering if this can be done using the command line.
    Thanks
    Jaime

    Thanks Paulcw for your quick reply! :D
    I'm guessing I didn't word my question properly.
    Neither of my classes have a main method in them, so when I am trying to create instances (objects) of them, I would like to as if my command line was the main.
    For example:
    Class1 c = new Class1(parameters);
    c.moveRight();
    etc.
    I'd like to be able to use my classes methods from the command line, I think what I'm looking for is a batch, but I'm not sure.
    Thanks again,
    Jaime

  • How to call the javascript through Command prompt?

    I need to call the .js file through command prompt. And also through programming language like c++, java. Could you please advice me with samples.This is for "illustrator cs".

    You can also look into use of COM scripting interface to the Adobe programs. Unfortunately, this means you have to do some programming/scripting to create a (command line) script that you can execute like
    cscript C:\somePath\myScriptLauncher.vbs  C:\somePath\anAdobeScript.jsx
    or
    cscript C:\somePath\myScriptLauncher.js  C:\somePath\anAdobeScript.jsx
    the scripts can be written in VBScript (*.vbs) or Microsoft JScript (*.js) which can access COM objects thus the Adobe program's COM APIs.
    Nothing purely simple as a command line option in this solution. But it does offer customization as an advantage.
    This might be a slightly useful reference.
    http://stackoverflow.com/questions/3846626/is-it-possible-to-execute-jsx-scripts-from-outs ide-extendscript
    there's one post mentioning COM in there.
    And of course, you can also use COM through C++, Java, C#, Visual Basic, etc. as well, not restricted to VBScript and JScript, though I've found it's easier to use the latter two for COM.

Maybe you are looking for

  • /var/db/BootCaches.playlist 2:no such file or directory appeared after Mavericks update

    Hi all, I have tried to upgrade my iMac 2009 running 10.6.8, 3.06GHZ, 4GB ram machine and hit upon a grey load up screen and nothing more after the update. I have worked back through everything I could find in these forums as the bellow: 1. Completed

  • IWork documents will not open in Preview or display with Quicklook

    I have recently upgraded to OSX Mavericks and updated to the latest version of iWork (including the fresh installation of Numbers and Pages). However new iWork documents are not are not displaying in Finder with a preview thumbnail, or opening with e

  • How can i buy an unlock iphone 5? Please help

    How I can buy an unlock iphone 5 in US?. I heard that Apple let people pre-ordered unlock iphone 5. But after 1 hour, they took it down. So what I see right now is only pre-order for the phone with contract

  • My macbook Pro doesn't see my bluetooth headphones

    Hi, I got a new macbook pro and I am using Sony DR-BT21G headphones, these are bluetooth indeed. The problem is that my macbook does not see my headphones when I am trying to set it on my Mac. The headphone does not work more if I enter the IP of my

  • Problem in using modify statement inside a Perform

    Hi Experts, loop at t_data into wa_data. IF wa_data1-zbukrs IS INITIAL.         wa_data1-zstat = 'E'.         w_messg =  'Company code is blank in upload data'.         CONCATENATE wa_data1-zbukrs w_messg INTO w_msg           SEPARATED BY space.