How to run Java application involving DOM3 in a command shell?

Dear all,
I am currently in a testing phase on my Java implementation (in JBuilder 2005) utilizing DOM3(built 2 .jar files from Ant via CVS thanks to dmbdmb). It seems working properly. To experiment its capability of handling big size files, it is essential to do a bit testing by running the application in a command shell (got 'OutOfMemoryError: Java heap size' when run it in JBuilder), something like:
Java -Xmx256m MainHowever it gives out another error of
java.lang.NoSuchMethodError: org.w3c.dom.Node.setUserData(Ljava/lang/String;
Ljava/lang/Object;Lorg/w3c/dom/UserDataHandler;)Ljava/lang/Object;All fine in JBuilder because I configured its 'required libraries' and added up the 2 DOM3 .jar files. Now how should I do to make them working in a command line? I already added the paths of these 2 .jar files to CLASSPATH and also tried to put a copy of them under the same directory as 'Main'. Unfortunately the 'NoSuchMethodError' is not going away...
Thanks to any help

I managed to include these 2 DOM3 jar files into a jar file, xml.jar, together with all other class files. (I put a copy of these 2 DOM3 .jar files and the JDBC connector file, mysql-connector-java-2.0.14-bin.jar into the same folder as with other class files, then run something in the command line like:
D:\>jar cmf manifest.mf xml.jar xmltree/*   //xmltree is the folder/also the package nameThe resulting xml.jar can use the included 2 DOM3 jar files, however another JDBC error occurs when attempting getting a connection to MySQL( details also on http://forum.java.sun.com/thread.jspa?threadID=642812 ). Why do these jar files behave differently, as 2 DOM3 files do well in the xml.jar, whilst the JDBC connector jar does not like it?
Another anomaly is that, though they work well by double clicking xml.jar, the 2 DOM3 jar files still do nothing if executing the jar from a command line as follows:
D:\>java -jar xml.jar      //it still throws out NoSuchMethodError
Why the DOM3 jar files also behave differently depending on how the xml.jar is invoked??
Really cannot work it out & thus need your kind help!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • How to run java application without having java environment in  a machine

    can i run java application without having java environment(JVM) in a machine.I mean i dont have installed j2se or jdk in my machine.And i have an j2ee application running on another host which is built in swings.I want to access that application in my machine
    can any one help regarding my problem

    If you only need to access the program from one machine and you are running a Unix-like operating system (e.g., Linux, Solaris), you can use the remote display capabilities of X11. In this case you have to choose the host where the app will be displayed when you start it:
    $ DISPLAY=<hostname>:0.0
    $ export DISPLAY
    $ java ...
    If you want to be able to display it on both machines at the same time, or if you are using windows, then try something like VNC (http;//www.realvnc.com). Or if you are running windows and your version supports it, you can use windows remote desktop.

  • How to run Java Application in Weblogic 8.1

    Hi,
    I'm new to Weblogic 8.1. I just deployed a EJB with WebLogic 8.1 Server and I
    don't know how to run my Java Application against the EJB I deployed earlier.
    I tried to run "java Client_1" in a console window. It gives me the following
    message:
    C:\temp\WebLogic\new>java Client_1
    javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.
    WLInitialContextFactory. Root exception is java.lang.ClassNotFoundException:
    we
    blogic.jndi.WLInitialContextFactory
    at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:217)
    at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.jav
    a:42)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    49)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    at Client_1.getInitialContext(Client_1.java:55)
    at Client_1.main(Client_1.java:14)
    C:\temp\WebLogic\new>

    hi,
    i solve this one after check bea documnetaion.
    with regards
    jp

  • How to run java application in Unix Box

    Hi,
    Would anybody show me how to run my server application in unix box?
    Thank you very much.
    Hung

    Your application should have a main class. Suppose it's called MyMain.class. I'll assume it's in the anonymous package. So you cd to the directory containing the class, and type java MyMainIf it's not in the default package, or is a jar file, say so.

  • How do i run java application on IIS

    Hi,
    Can I run java application on IIS(Internet information Server)?
    If yes, How do i do that?
    My java application contains JSP,Servlets and EJB.
    To run java application on IIS which plug in should i use.
    Can anybody help me This is urgent...........
    Thanx

    You can try using Macromedia JRUN version 4. Any of the version will have an ISAPI filter which you can add to the IIS site of your JSP/Servlet.
    The JRUN ISAPI filter will establish connection to the JRUN proxy listener on a port. This port is called proxy listener port. Basically once you install the ISAPI, it will have config file called jrun.ini
    Check for the ProxyPort entry in jrun.ini (or something like this - sorry, I can't remember the exact entry). It should match to the proxy listener port where of the server where your JSP/Servlet is intalled.
    Good luck !

  • How do I run java application on IIS server

    Hi,
    Can I run java application on IIS(Internet information Server)?
    If yes, How do i do that?
    My java application contains JSP,Servlets and EJB.
    To run java application on IIS which plug in should i use.
    Can anybody help me This is urgent...........
    Thanx

    Hi
    Check this article on JGuru. It explains how to use Tomcat together with IIS.
    http://www.jguru.com/faq/view.jsp?EID=776546
    If you also need to use EJB's you probably also want to have a JBoss installed - check www.jboss.org
    /Peter

  • How do i run java application in IIS

    Hi,
    Can I run java application on IIS(Internet information Server)?
    If yes, How do i do that?
    My java application contains JSP,Servlets and EJB.
    To run java application on IIS which plug in should i use.
    Can anybody help me This is urgent...........
    Thanx

    Can i use EJB components in it?Yes, you can use EJB components. IIS uses Tomcat as a plugin and Tomcats feeds IIS with HTML code. Tomcat performes all the JAVA work including EJB. This links shows you how to install it:
    http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-iis-howto.html
    Shoud be the same for version 4.1

  • How to download Personal Java and how to run the application

    Hi,
    From java.sun.com, which file has to be downloaded for develpoing the application in personal java.
    How to run an application in peraonal java?
    If you give me the steps it will be more helpful to me.
    I couldn't find the samples for personal java anywhere?
    If you give me links for basic samples with source code such as hello world and small games, it will be more helpful to me.
    All of my doubts are very basic one.
    Please help me.
    Thanks in advance.
    Regards,
    Nagaraj.

    Sun has a beta implementation available for download (http://developer.java.sun.com/developer/earlyAccess/personaljava/) which will allow you to run Personal Java on a MIPS/SH3/StrongARM or XScale device running WindowsCE 2.0 or greater. You can also download the Personal Java Emulation environment (http://java.sun.com/products/personaljava/pj-emulation.html) which will allow you to develop and run personal java applications in a Windows or Solaris environment.
    Most JDK1.1.8 compliant applications will run on Personal Java, so a Hello World program would look like the regular.
    public static void main(String[] args) {
    System.out.println("Hello World");
    System.exit(0);
    You can also purchase a full blown commercial implementation of Personal Java for PocketPC at handango.com. Do a search on Insignia Jeode for Dell. You can use this on any PocketPC/XScale pda.
    To run a Personal Java program on Pocket PC. Deploy your jar to the Device and create a shortcut similar to this:
    50#"\program files\Java\bin\pjava.exe" -setcwd "\program files\Java\pjtest" -classpath "\program files\Java\pjtest\pjtest.jar" -file "pjtest.testmain.class"
    The number is arbitrary, but the paths need to point to the directory where you installed Personal java and your jar/application respectively.

  • How can i run java application at system startup just liks as services

    How we can run java application at the time of system
    starts up just like as services.

    Hi,
    At first you have to create an exe of the class file.
    for that go to the site www.duckware.com/java2exe.html
    Click on the j2exe23c.exe(75k) download it and install in ur system. convert the class file to windows exe.
    The put the exe in the startup folder in windows.
    If ur not able to find that folder search for it and put that exe in that folder.

  • How to run Java Card 2.2.1 demo application?

    Hi Friends..
    i want to know how to run Java Card 2.2.1 demo application in Windows environment..
    Sorry, perhaps this question looks like a little bit stupid.. :(
    In Windows, I've set the environment variables for :
    JAVA_HOME : C:\Program Files\Java\jdk1.6.0_03
    JC_HOME : C:\java_card_kit-2_2_1
    and then how to run demo1.scr, etc?.
    Please help me regarding this,
    Thanks in advance..

    Is there any suggestion for my question?.. :(
    Thanks in advance..

  • How connect an HTML page to a running Java Application?

    Hi,
    Exists a way to connect an HTML page to a running Java Application?
    the idea is, If we use SWT, the Browser widget have an instance of IE/Firefox attached to it, and we load local HTML pages inside, then i wish to have a way to bridge Java Application from HTML page. Then with that we can do follow JScript:
    var javaApp = document.getJavaApplication(); //here is the trick
    //below is like we do today with applets
    var person = container.create("myapp.Person");
    person.setName("Test");
    container.save(person);its great if we can Have an attribute for object tag or anything to conect HTML page to Java Application.

    I think that the better idea is to create a new mime type for that, maybe "application/x-java-connect-to-local-jvm", and use embed tag, to connect via plugin to a running JavaApp
    example:
    <embed type="application/x-java-connect-to-local-jvm" width="20" height="20" mainClass="mypackage.AppName"><br>
    <script>
    var javaApp = document.embeds[0];
    function createPerson()
      var person = javaApp.getNew("mypackage.Person");
      person.setName("test");
      javaApp.save(person);
    }The width and height, isnt necessary, but the view can be used to show red if connection failed and green for sucessfull connections, or maybe embed tag can have src to images for sucessfull and unsucessfull states.
    That's the idea, there is a way to extend Java Plugin to achieve that?
    any tip or idea or to achieve that, are welcome.
    Thanks

  • How to invoke java application from ABAP

    How to invoke java application from ABAP  ? Suppose I needto execute a EJB wihic is running on my SAP J2EE Enigne from an ABAP Program .
    Thanks,
    Manish

    Hi Manish,
    did you get some further documents concerning "abap program calls ejb"?
    If yes, could you please send me some informations.
    Thank you for your help.
    Kind regards, Patrick.

  • Run java application on mainframes

    i have a financial application which needs to run java application on mainframes. Any ideas how i may do it. where do i get the jvm for the various OS. !

    Thank you all for the reply. I have noted regarding jvm for OS390. Trouble is we have > 30 banks where this application has to be installed and run and these are very old systems like nsk and ve. so this would mean we need to have the jvm for all the different OS running. i would collect more info on the various OS before deciding if it can be done in java.

  • How to run java program created in Sun Java Studio

    Hi All,
    sorry for easy question. I'm new in java.
    I have created Swing/AWT application with Sun Java Studio. I can run it using Sun Java Studio and it works properly. How to run this application in DOS-promt using "java ....."? I think, I shall define all classpathes but I dont know exactly.
    Enviroment:
    WinXP
    Sun Java Studio (C:\Sun\studio5u1_se)
    SDK (C:\Sun\j2sdk1.4.2_04)
    Application files (C:\Sun\My)
    Thanks.

    change this to yours
    set path=c:\j2sdk1.4.1_01\bin;c:\j2sdk1.4.1_01\jre\bin;%path%
    set classpath=c:\j2sdk1.4.1_01\lib;c:\jdk1.4.1_01\jre\lib;%classpath%
    go to directory where code is
    javac CLASSNAME.java
    then to run it
    java CLASSNAME
    note also look at executable jar files

  • Compiling java code from a running java application

    How does compiling of java code from a running java application work?
    I found a class: com.sun.tools.apt.main.JavaCompiler
    but cannot find any documentation of how this class works.

    How does compiling of java code from a running java
    application work?Probably most reliably using Runtime.exec().
    I found a class:
    com.sun.tools.apt.main.JavaCompiler
    but cannot find any documentation of how this class
    works.For a purpose. You are not supposed to use this class. With the next JRE release or implementation, it might not exist anymore - it's not part of the standard API.

Maybe you are looking for