Create a MS-DOS java environment

thought i would post this for the benefit of others. its a dos batch file that creates a java environment in a new dos window (so u don't have to keep typing out file/tool paths all the time):
@echo off
rem ******* run Doskey --
rem ******* NOTE, NT/2000 already has this, so delete the next line
rem ******* if you find the 'bad command or filename' irritating
doskey
rem ******* setup Java environment
set JAVA_HOME=g:\j2sdk1.4.1_02
set PATH=.;%JAVA_HOME%\bin;%PATH%
rem used by Java2 to add jar files
set CLASSPATH=.;
rem ******* sanity check
%JAVA_HOME%\bin\java -version
set this up as a batch file, and create a shortcut to the command prompt on ur desktop. open the shortcut's properties dialog and tell it to 'open in' the directory that u keep your source java work; and after the 'target' entry (the path to the command prompt program) add the switch '/k' and the full path to the batch file u created from the above!

Why not just added them to your environmental variables through the control panel?

Similar Messages

  • How to run DOS command in Java environment?

    Can i run DOS command in Java environment?
    I did like this:
    Runtime r = Runtime.getRuntime();
    r.exec("cmd.exe");
    r.exec("set classpath=%CLASSPATH%;.\\tmp")
    but failed.
    However if I run the java command, it runs successfully.
    r.exec("javac Test.java");
    r.exec("java Test");
    how should I do so that i can run the DOS commands metioned above in Java Environment?
    thanks a lot.

    Have a look at http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    This may help. I wonder if this is ok ?
    Runtime r= Runtime.getRuntime();
    r.exec("cmd.exe /C set classpath=%CLASSPATH%;.\\tmp\"");

  • How to create a TOOLBOX using Java  - a real CHALLENGE for U

    Hello,
    I want to create a Toolbox using Java which will contain different components of my interest.I should be able to select one component and paste it in a frame also be able set the property of individual component after placing in the frame,just like VB toolbox.
    Can anybody suggest with code samples??
    Regards,
    Suraj.

    You are essentially asking how to write an IDE (Integrated Development Environment). This is a big question. You might start by looking at existing IDE's (JBuilder, Forte...) and see how they do it. If you want source, there is probably an open source IDE you can lift most of your code from.

  • Creating a IDE(Integrated Development Environment)

    What I want its a way to create a IDE(Integrated Development Environment). I type a word (example:typed private from JAVA code) and this word became a color word.
    What is the best way to do this?
    PS:sorry for my spell, I�m from Brazil.

    Abadacus,
    See www.jext.org--it has a free java IDE, with source code, much of it from JEdit, another free java editor.
    --A                                                                                                                                                                                                                                                       

  • Creating XML file from Java Bean

    Hi
    Are there any standard methods in Java 1.5 to create XML file from java bean,
    i can use JAXB or castor to do so,
    But i would like to know if there is any thing in java core classes,
    I have seen XMLEncoder, but this is not what i want.
    Any ideas
    Ashish

    Marshall JavaBean to an XML document with JAXB or XMLBeans.

  • How do I create a Principal in Java

    How can I create a Principal in Java that can later be added to Websphere's Trust Map via a JAAS authentication module?
    Below code is not working as it throws the following exception:
    "Caused by: com.ibm.websphere.security.auth.WSLoginFailedException: javax.naming.AuthenticationException: [LDAP: error code 49 - 80090308: LdapErr: DSID-0C090334, comment: AcceptSecurityContext error...."
    class PrincipalExt implements Principal, java.io.Serializable {
        private String userName;
        public PrincipalExt()
        public PrincipalExt(String userName) {
            setName(userName);
        public void setName(String name)
            this.userName = name;
        public String getName()
            return userName;
    Then, once I have an instance
        public void login() throws LoginException {
            PrincipalExt aPrincipal = new PrincipalExt();
            aPrincipal.setName("someUserID");
            trustMap.put("com.ibm.wsspi.security.common.auth.module.IdentityAssertionLoginModule.trusted", true);
            trustMap.put("com.ibm.wsspi.security.common.auth.module.IdentityAssertionLoginModule.principal", aPrincipal);

    Download JFreeChart and give it a try:
    http://www.object-refinery.com/jfreechart/index.html
    JFreeChart is distributed for free, including the complete source code (subject to the GNU LGPL).
    Regards,
    Dave Gilbert
    JFreeChart Project Leader

  • Can i connect to lotus domino database in my java environment

    Hi javaites,
    I want to know if i can connect to domino database from my java environment. i need to pick e-mail address of staffs from lotus notes database. if possible how can i go about it.
    thanks

    Yes, you can connect to a database on a Lotus Domino server. The classpath must include Notes.jar (local) or NCSO.jar (remote) - and the DIIOP (Domino IIOP) task on the Domino server must be running.
    The following article might help you:
    http://www-128.ibm.com/developerworks/lotus/library/ls-Java_access_pt1/index.html

  • How to create web services in java?

    Hi,
    I am a newbie to java webservices. Can anybody tell me how to create web services in java?
    Any tutorial link or step by step doc would be useful.
    Appreciate your help in this regard.
    Thanks in advance.
    naymo01.

    Creating web services in Java appears to depend highly upon the server you intend to use.
    Here's a tutorial: http://java.sun.com/webservices/docs/1.6/tutorial/doc/index.html

  • Created in Web dynpro Java or Web dynpro ABAP

    hi all,
    I have a web application running. Its UI  is created either in web dynpro java or web dynpro ABAP. Is there any way by which we can find out that in which form of UI technology is it created; in web dynrpo java or web dynpro ABAP ?

    Hi,
    I am really not sure if this is recommended..
    Try some negative testing on the application. If the application crashes, the trace of the error occured will tell you what kind of development has been adopted for the Web Dynpro application.
    Another hint can be the port number in the Application URL. If it is not 50xxx, and is somewht like 8xxx, it is surely Web Dynpro for ABAP.
    Regards,
    Alka.

  • HT5192 When trying to sign in to App store i get the message this is not a test user account and asking me to create an account in sandbox environment

    When trying to sign in to App store i get the message this is not a test user account and asking me to create an account in sandbox environment
    I amnot able to sign in or update applications

    I am a regular user of an Ipad anddid today the software update and since then i am receiving this message

  • How to create and instance of Java Object from an XML Document.

    Hi,
    How can we use a XML Document to create an instance of Java Object and do vice versa ie from the Java Object creating the XML Document.
    XML Document is available in the form of a String Object.
    Are there helper class available to achieve this.
    I need to do this in a Servlet.
    Regards
    Pramod.

    JAXB is part of JavaSE while Xmlbeans claims full schema support and full infoset fidelity.
    If the standard APIs do all that you need well then use them.

  • What are the steps to create a webservice from java

    i followed the doc. of weblogic 10.3 but something is missing..i am using ubuntu
    1)
    i created a webservice ping.java which placed in myproject/HelloWorld directory
    package HelloWorld;
    import javax.jws.WebMethod;
    import javax.jws.WebService;
    import javax.jws.soap.SOAPBinding;
    import javax.xml.ws.BindingType;
    @WebService(name="SimplePortType", serviceName="SimpleService",
    targetNamespace="http://example.org")
    @SOAPBinding
    @BindingType
    public class ping {
    @WebMethod
    public String main(String p){
    System.out.println("sayHello:" + p);
    return "Here is the message: '" + p + "'";
    2) and created a build.xml and placed it in myproject folder
    <project default="all">
    <target name="all"
    depends="clean,build-service,deploy" />
    <target name="clean">
    <delete dir="output" />
    </target>
    <path id="*my.path*">
         <pathelement path="/home/suresh/bea/jdk160_05/lib/tools.jar"/>
    <pathelement path="/home/suresh/bea/wlserver_10.3/server/lib/weblogic.jar"/>
    </path>
    <taskdef name="jwsc"
    classname="weblogic.wsee.tools.anttasks.JwscTask" classpath="/home/suresh/bea/wlserver_10.3/server/lib/weblogic.jar" />
    <target name="build-service">
    <jwsc srcdir="HelloWorld" destdir="output/helloWorldEar">
    <jws file="ping.java" type="JAXWS"/>
    </jwsc>
    </target>
    <taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy" classpath="/home/suresh/bea/wlserver_10.3/server/lib/weblogic.jar"/>
    <target name="deploy">
    <wldeploy action="deploy"
    name="myproject"
    source="output/helloworldEar" user="weblogic"
    password="weblogic"
    adminurl="t3://${wls.hostname}:${wls.port}"
    targets="${wls.server.name}"/>
    </target>
    </project>
    3) after that how to start weblogic and how to set any needed env or domain properties.How to publish it to server?
    4) how to configure security
    can i use netbeans to do all the above things?
    Thanks
    Suresh

    what my.path indicates in the above wsdl?
    or which path i have to give there?

  • How to create a Folder using java.

    Hi All,
    I have a doubt. I want to create a folder using java.
    Inputs are the destination where the folder should be created and the name of the folder. Plz help me in this regard.
    thanks and regards,
    Vincent .R.

    check out javadoc for java.io
    File reldir=new File("NewDir");//relatively where your program runs
    reldir.mkdir();
    File absdir=new File("C:/NewDir");//absolute path
    reldir.mkdir();
    File newdir=new File(absdir,"SubDir");//defines another dir under absdir
    newdir.mkdir();
    Gil

  • Exception in creating message-driven ejb : [java.lang.NullPointerException]

    [#|2008-09-17T07:32:06.973-0500|SEVERE|sun-appserver-ee8.2|javax.enterprise.system.container.ejb.mdb|_ThreadID=58;|MDB00050: Message-driven bean [OAHMSTcpIpServer1:eaTCPIP_cmTcpIpServer_Service1]: Exception in creating message-driven ejb : [java.lang.NullPointerException]|#]
    [#|2008-09-17T07:32:06.974-0500|SEVERE|sun-appserver-ee8.2|javax.enterprise.system.container.ejb.mdb|_ThreadID=58;|java.lang.NullPointerException
    java.lang.NullPointerException
         at com.sun.enterprise.util.InvocationManagerImpl.preInvoke(InvocationManagerImpl.java:117)
         at com.sun.ejb.containers.MessageBeanContainer.createMessageDrivenEJB(MessageBeanContainer.java:670)
         at com.sun.ejb.containers.MessageBeanContainer.access$100(MessageBeanContainer.java:71)
         at com.sun.ejb.containers.MessageBeanContainer$MessageBeanContextFactory.create(MessageBeanContainer.java:467)
         at com.sun.ejb.containers.util.pool.NonBlockingPool.preload(NonBlockingPool.java:249)
         at com.sun.ejb.containers.util.pool.NonBlockingPool.doResize(NonBlockingPool.java:473)
         at com.sun.ejb.containers.util.pool.NonBlockingPool$IdleBeanWork.run(NonBlockingPool.java:568)
         at com.sun.ejb.containers.util.pool.NonBlockingPool$IdleBeanWork.service(NonBlockingPool.java:560)
         at com.sun.ejb.containers.util.WorkAdapter.doWork(WorkAdapter.java:44)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:409)
    |#]

    Hello,
    If I make use of the @EJB annotation again a NullPointerException is risen
    package videoclub;
    import java.awt.Component;
    import java.awt.Container;
    import java.awt.FocusTraversalPolicy;
    import java.util.Vector;
    import javax.annotation.Resource;
    import javax.ejb.EJB;
    import javax.swing.JOptionPane;
    import vc.bl.ClerkSessionRemote;
    import vc.domain.Customer;
    * @author IOANNIS_PAPAIOANNOU
    @EJB(name="ejb/ClerkSessionBean", beanInterface=ClerkSessionRemote.class, beanName="ClerkSessionBean")
    public class Clerk extends javax.swing.JFrame
        @Resource
        javax.ejb.SessionContext sessionContext;
        ClerkSessionRemote clerkSessionBean = (ClerkSessionRemote) sessionContext.lookup("ejb/ClerkSessionBean");
    }  The line:
    ClerkSessionRemote clerkSessionBean = (ClerkSessionRemote) sessionContext.lookup("ejb/ClerkSessionBean");rises the exception
    the output of the client:
    init:
    init:
    deps-jar:
    compile:
    library-inclusion-in-archive:
    Building jar: C:\Documents and Settings\IOANNIS_PAPAIOANNOU\My Documents\NetBeansProjects\VideoClub\VideoClub-ejb\dist\VideoClub-ejb.jar
    dist:
    deps-jar:
    compile-single:
    run-single:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at videoclub.Clerk.<init>(Clerk.java:33)
    at videoclub.Clerk$2.run(Clerk.java:232)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    BUILD SUCCESSFUL (total time: 2 seconds)
    Yiannis P.

  • Creating aVirtual directory Using java

    Hai ,
    I am Using windows XP Operating system, I know how to create a directory using java,
    can you please suggest me a procedure to create a virtual(web share ) directory using java.
    waiting for your reply
    Thanks & Regards,
    Naga Raju

    Virtual Programmer is in the to share the directory
    over the Internet.No, that's a file/web server. :) I see, it's a Microsoft term.

Maybe you are looking for

  • Boolean mapping from Forte to C

    I need to map some boolean data types from Tool to C++. Has anyone ever done this before. If so, how did you establish a one to one correspondence bewtween the boolean types in Forte and the boolean types in C++. I am using Microsoft visual C++. Acco

  • "PageOk" error when preview in Dreamweaver.  Suggestion?

    Everytime I try to preview my site in DW (Firefox), I am getting a PageOk error.  I called my web hosting, GoDaddy, and the rep told me that it was nothing that they could do on their end because my site is displaying ok.  At my wit's end about what

  • Preventing duplicate reviewers in a Review Activity

    Hello, I've been asked to populate the Reviewers of a Change Request's Review Activites based on the Business Service Owners and Users.  I have a runbook to gather the Business Owner, another to get the Business Users, and a runbook to add the user a

  • Printing in Mountain Lion

    Printer says software installed incorrectly and needs to have permissions fixed each and every time I print something.

  • We are having bleed through on our images

    This is a big head ache.  The problem is generally intermittent. Some users go days and weeks and do not have a problem. Others with the same problem reboot at the end of their *****, go home then come back the next day and do not have problems till