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

Similar Messages

  • Running Jar Files created in Sun Java Studio

    Hi everyone,
    I am still trying to explore the functionalities (especially as regards deployment issues) of this robust IDE. However I do have a problem. I have developed a very basic program that connects to a database (MSSQL) using Java Studio 8. However after building the jar file, if I try to execute the jar file it gives me this message
    java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver.....
    But all goes well within the IDE and it runs well if I use my notepad or vi editor,compile it from the command line and execute the generated class file. The classpath have been set for all the necessary jdbc jar files.
    Any Help Will Be Appreciated

    1. Sun Java Studio Enterprise 8 is based on NetBeans 4.1 which does not provide direct support for packing an application. One alternative you may want to consider is to use NetBeans 5.0 (http://www.netbeans.info/downloads/download.php?type=5.0) or JSE 8.1 which is based on NB5.0 and which is now in beta (http://developers.sun.com/prodtech/javatools/jsenterprise/downloads/index.jsp).
    You may want to refer to http://www.netbeans.org/kb/articles/javase-deploy.html for packing and deploying a standalone application is NB5.0 or JSE8.1.
    2. Using JSE8, you may want to try copying all the library jars (including database drivers) used by your application to your projects dist directory manually and then package them all into one jar.
    3. You should not have to know the exact location of the jdbc jar on the client machine. How are you instantiating the driver in your code? Are you using 'Class.forName()'? If so, java should be able to pick up the driver from the classpath. (Pl. ref to http://forum.sun.com/jive/thread.jspa?forumID=122&threadID=62696, which may be of help).

  • How to run a openssl command from a java program

    Hi All
    Please suggest on how to run a openssl command from a java program.
    I am using this
    Runtime runtime = Runtime.getRuntime();
    runtime.exec("openssl pkcs8 -inform der -nocrypt test.der result.pem");
    This is suppose to take test.der as input and create result.pem.
    There are no errors but the file result.pem isnt created.
    Thanks in Advance

    First off is that openssl command correct? Should it be this instead:
    openssl pkcs8 -inform der -nocrypt -in test.der -out result.pem
    Try out your openssl command within a command prompt so that you know that it works ok. I think the command line you specified waits on stdin (well it does for me).
    After that.....
    runtime.exec creates a Process object. If you do this:
    Process openssl = runtime.exec("....")
    then you can examine the return code from openssl to see the exit code - for instance if the input file does not exist then exit = 1. You can test for this with Java
    Alternatively you could get the stderr from the process and look inside it - if it is 0 length then all is good, if it has some text in there then it has likely failed. You could then throw an exception and include the stderr output in the exception messgae. You may need to experiment with this, runnig it first when openssl is happy then running it again when openssl is upset.
    M

  • How to run an exe file in a java program

    Hi,
    Can somebody tell me how to run an exe file in a java program.
    Thank you!

    Yes, java.lang.Runtime.exec().
    Read this carefully before you do:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    Don't write a line of code before you're reviewed and understood the article completely. - MOD

  • How to run java programs from a master java program?

    Hello,
    I have several java programs which run from the command prompt. I am seeking help with code for starting java programs from within a java program. For example, a program called master.java works something like this:
    import java.*;
    create connection pool
    create variables and result sets
    start/run slave1.java (var1, var2);
    start/run slave2.java (var3, var4, var5);
    start/run slave3.java (var1, var4);
    end of program master.java
    Each of the slave.java programs will run for up to an hour. I do not want the master.java program to pause for each slave program to stop. Instead, the master program will keep running and multiple slave programs will be running simultaneously with the master program. When a slave program starts, it is on its own. Also, if possible, I would like to have each of these slave.java programs open in a new separate command window, so I can observe each slave program running in separate windows.
    Any suggestions for code or helpful documentation are greatly appreciated.
    Thank you,
    Logan

    Thank you all.
    At the bottom of master.java I have successfully started a batch file with these lines:
    String jcmd = "cmd.exe /c start c:/data/simulations/MsgViewCount2.bat";
    Process proc = Runtime.getRuntime().exec(jcmd);
    But I still cannot get a java program to start. Here is one variation I have tried:
    String [] cmdArray = new String[2];
    cmdArray[0] = "java";
    cmdArray[1] = "slave1";
    Runtime runtime = Runtime.getRuntime();
    Process process = runtime.exec(cmdArray);
    This compiles, and no errors occur, but nothing happens.
    Regarding this comment:
    Why Runtime.exec? Either make the slaves Runnable or
    just call their main() methods.
    Oh, I see. Sepearate output. :PNone of the slave.java programs have any output.
    Thanks again.

  • How to run native program with Java program?

    Hello
    I've got following problem. I'd like to write file browser which would work for Linux and
    Windows. Most of this program would be independent of the system but running programs not. How to run Linux program from Java program (or applet) and how to do it in Windows?.
    Cheers

    Try this:
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec("ls -l");
    InputStream stream = proc.getInputStream();
    InputStreamReader isr = new InputStreamReader(stream);
    BufferedReader br = new BufferedReader(isr);
    String line = null;
    while ( (line = br.readLine()) != null) .....
    "if the program you launch produces output or expects input, ensure that you process the input and output streams" (http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html)

  • How to access JDBC Resource registered in Sun Java System App Server ?

    I want to create a stand-alone JDBC application with Java SE using Swing technologies and JNDI technology. The purpose of using JNDI technology is to avoid change of Java Source Code every time I move the database to different location. This Java application will be used in a standalone PC installed with Windows XP Professional with no LAN / WAN connection. Of course, Internet connection is available with the PC.
    I use JavaDB to store the data tables and the location of the database is D:\E-DRIVE\SAPDEV. Tomorrow, if I move this database to C:\SAPDEV or any network drive, I do not want to change the Java Source code. I want to use JNDI which, if I am not wrong, helps developers to avoid manual change of Java source code whenever the database location is changed. Changes have to be made only in the JNDI Name which contains all relevant information about the database in order to get connection no matter where the database SAPDEV is stored; it can be placed under D:\E-DRIVE directory or C:\ directory of the hard disk. To implement my intention, I started developing Java application as per the steps mentioned below:
    Step 1:
    To proceed, first, I sought the help of Sun Java System Application Server Admin Console. I created JNDI object for Connection Pool using the menu path Common Tasks->Resources->JDBC->Connection Pools.
    JNDI Name : ABAPRPY
    Resource Type : javax.sql.DataSource
    Datasource class : org.apache.derby.jdbc.ClientDataSource
    Description : ABAP Program Repository
    The Connection Pool creation has options for General, Advanced and Additional Settings tabs and I made all the settings relevant to the database I created in D:\E-DRIVE\SAPDEV.
    To confirm whether the above settings are correct, I pressed the Ping push button which is available in the General tab of the connection pool creation screen. The system responded with the message Ping Succeeded.
    Step 2:
    I created a JDBC Resource using the menu path Common Tasks->Resources->JDBC->JDBC Resources.
    JNDI Name : jdbc/SAPDEV
    Pool Name : ABAPRPY
    Description : Database Connection for SAPDEV database
    Status : Enabled
    I can see all the above settings recorded in the domain.xml which is placed in the folder
    C:\Sun\AppServer\domains\domain1\config
    Step 3:
    I have made sure that Sun Java System Application Server is up and running in the background with JavaDB server. I created a Java Program making sure the following JAR files are included in the classpath:
    appserv-admin.jar
    appserv-ee.jar
    appserv-rt.jar
    javaee.jar
    fscontext.jar
    Plus, the lib directory of JDK 1.6 & C:\Sun\AppServer\domains\domain1\config
    Source code of the program is as follows: I used NetBeans IDE to create my project file.
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import javax.naming.*;
    import javax.activation.DataSource;
    public class JNDILookup {
    public static void main(String[] args) {
    try {
    InitialContext initCtx = new InitialContext();
    DataSource ds = (DataSource) initCtx.lookup("java:comp/env/jdbc/sapdev>");
    } catch (NamingException ex) {
    Logger.getLogger(JNDILookup.class.getName()).log(Level.SEVERE, null, ex);
    When I attempted to compile the above program in NetBeans IDE ,no compilation error reported. But while executing the program, I got the following run-time error message:
    SEVERE: null
    javax.naming.NameNotFoundException: No object bound for java:comp/env/jdbc/sapdev> [Root exception is java.lang.NullPointerException]
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:224)
    at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:396)
    at javax.naming.InitialContext.lookup(InitialContext.java:392)
    at SAPConnect.JNDILookup.main(JNDILookup.java:21)
    Caused by: java.lang.NullPointerException
    at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:173)
    ... 3 more
    Now, I want to come out of this situation; at the same time, I want to preserve the settings I have made in the Sun Java System Application Server Admin Console. That is, I want to programmatically access the data source using Connection Pool created in Sun Java System Application Server Admin Console.
    I request dear forum members to provide me an appropriate solution.
    Thanks and regards,
    K. Rangarajan.

    jay44 wrote:
    Bare in mind I am attempting the context.lookup() from inside the container (my code is in a session bean). I have accessed the server and have my bean "say hello" first to verify the bean works OK, then I call a method with this rather standard code:
    String jndiDataSourceName ="Second_EJB_Module_DataBase";
    Logger.getLogger(DynamicPU.class.getName()).log(Level.INFO,"Programatically acquiring JNDI DataDource: "+ jndiDataSourceName);
    InitialContext ctx;
    try {
    ctx = new InitialContext();
    ds =(DataSource)ctx.lookup("java:comp/env/jdbc/"+jndiDataSourceName);
    } catch (NamingException ex) {
    Logger.getLogger(DynamicPU.class.getName()).log(Level.SEVERE, null, ex);
    return "Exception generated trying to preform JDBC DataSource lookup. \n"+ex.toString();
    But when I run the code the server log shows the initial context is created Ok, but an exception is thrown becasue the resource name is not found:
    (and i have tried vriations of ctx.lookup("jdbc/"+jndiDataSourceName) etc etc
    You are fine here. It works in container because the InitialContext properties have been supplied already. That was the link I forwarded earlier. The InitialContext you create locally needs to locate the container JNDI. That is what the properties specify.
    Where I am confused is where you indicate the stack below is from the server log. So, you initiate a standalone (java main method) application, create an InitialContext, and you see the results in your app server log?
    LDR5010: All ejb(s) of [EJB_Module_1] loaded successfully!
    Programatically acquiring JNDI DataDource: Second_EJB_Module_DataBase
    The log message is null.
    javax.naming.NameNotFoundException: Second_EJB_Module_DataBase not found
    at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:216)
    at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:188)
    at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:192)...
    at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
    This is strange since I can see this resource (a JDBC connection named Second_EJB_Module_DataBase) is configured on the server from the server's admin console.
    That is why you can obtain a lookup from within the container (app server).
    For this lookup to work it may be that one must map the name inside an ejb-jar.xml deployed with the application, but I have also read some resources like jdbc connection should have a default name. Does anyone know if my lookup() should work without using an ejb-jar.xml mfile to explcitly map the reource for my application?
    Both EBJ's and data sources can be referenced via JNDI. It's a remote lookup (that is normally optimized if it is running in the same JVM). You should not have any dependencies on a JDBC data source being set-up on ejb-jar.xml. That file can of course impact your EJB's. However, data sources are normally set-up on a container-specific basis (e.g., you probably did it through a console, but there is a spec somewhere about how to set up a data source via a resource the app server looks for; it varies from app server to app server). However, once you have that container-specific data source set-up, JNDI operates vendor-neutral. You should be able to take the code above and move it to JBoss or Weblogic or Tomcat or whatever (this is an ideal, in practice, the vendors sometimes put a data source in a name you would not expect, but again, you can use their JMX console to see what the JNDI name is).
    (As I stated above if I have to use a deployment discriptor to get at this JNDI datasource, then solution is not "programmatic" as newly configured datasources could not be accessed without redeploying the entire application).
    As JSchell alluded to, you will always have at least something vendor-specific. JNDI itself (the code you wrote) is totally portable. However, you have to set the various JNDI environment properties to a given vendor's spec. Ideally, you should not need a vendor's actual InitialContext application, but it's a possibility. Once you can safely cast to Context, you should be vendor-neutral (if not, demand your money back).
    So that is exactly where I am stuck, trying to get the lookup to work and wondering if it should work without and xml file mapping the resource for my app.
    What we ended up doing for standalone was to provide our own JNDI. If you look at the open source project JOTM, there are examples on how to use that with XBean (if integrating with Spring, as we did), you can easily set up a data source that runs standalone exactly as you get in the container. Another benefit is you get full JTA/JTS support and the ability to run XA transactions. (This might all be alphabet soup, but the app server gives it to you, and this is the way we ended up doing the same: JNDI + JTA + JTS + XA). It ends up the same application code uses a "vanilla" InitialContext and all we have to do is write one or two xml files (one for our app server, a couple for JOTM), and our actual code works the same.
    I still think you have a shot at getting to the container's JNDI, just not using their full-blown app server JAR.
    I think there must be a simple way to do this with an ejb-jar.xml, I am no expert in JNDI, I could be missing something simple, I will keep at it and post an answer here if I come up with it.
    Thanks, jayIt is simple to code. Getting it to integrate with your app server, yes, that can be challenging. But it has nothing to do with EJB's. Write a simple test. Using nothing but DataSource and InitialContext. Let us know where you get stuck.
    - Saish

  • How to run Struts program with the help of tomcat

    Hello Everybody
    This is Adesh.I am a newcomer of java and facing a problem with struts, so if any one know how to set the path of struts and how to run struts program, so plz inform me.
    THX in Advance.............................................

    struts-config.xml
    <struts-config>
    <action-mappings>
         <action path  = "/welcome"
                    type  = "Welcome"
                    scope="session">
                <forward name="success" path=".welcome"/>
                <forward name="failure" path=".base.error"/>
         </action>
    </action-mappings>
        <plug-in className="org.apache.struts.tiles.TilesPlugin">
            <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml"/>
            <set-property property="definitions-debug" value="1"/>
            <set-property property="definitions-parser-details" value="0"/>
            <set-property property="definitions-parser-validate" value="true"/>
        </plug-in>
    </struts-config>tiles-defs.xml
    <tiles-definitions>
         <definition name = ".base" path = "/include/template.jsp">
              <put name = "title" value = "${title}"/>
              <put name = "header" value = "/include/top.jsp"/>
              <put name = "body" value = "${body}"/>
              <put name = "footer" value = "/include/footer.jsp"/>
         </definition>
    </tiles-definitions>web.xml
    <servlet>
            <servlet-name>action</servlet-name>
            <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
            <init-param>
                <param-name>config</param-name>
                <param-value>/WEB-INF/struts-config.xml</param-value>
            </init-param>
    <init-param>
                <param-name>definitions-config</param-name>
                <param-value>/WEB-INF/tiles-defs.xml</param-value>
            </init-param>
            <load-on-startup>1</load-on-startup>
        </servlet>
    <servlet>
            <servlet-name>init</servlet-name>
            <servlet-class>Init</servlet-class>
            <load-on-startup>2</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>action</servlet-name>
            <url-pattern>*.do</url-pattern>
        </servlet-mapping>
      <jsp-config>
        <taglib>
            <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
            <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
            <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
            <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/wall.tld</taglib-uri>
            <taglib-location>/WEB-INF/wall.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/c.tld</taglib-uri>
            <taglib-location>/WEB-INF/c.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/fn.tld</taglib-uri>
            <taglib-location>/WEB-INF/fn.tld</taglib-location>
        </taglib>
        <taglib>
            <taglib-uri>/WEB-INF/fmt.tld</taglib-uri>
            <taglib-location>/WEB-INF/fmt.tld</taglib-location>
        </taglib>
    </jsp-config>
        <resource-ref>
            <description>DB Connection</description>
            <res-ref-name>jdbc/SQLServerDB</res-ref-name>
            <res-type>javax.sql.DataSource</res-type>
            <res-auth>Container</res-auth>
        </resource-ref>
    </web-app>This should help....

  • How can I deploy JBI Application in Sun Java System Application Server 9?

    I developed a demo "Loan Processing Composite Application " in Netbeans.org(http://www.netbeans.org/kb/55/loanprocessing.html).
    The guide only show the deployment using Netbeans6.Now I want to deploy it directly using Server9 , how can I do?
    How to deploy a soa application in Sun Java System Application Server 9? Is there any doc?
    Please~~I'm puzzled.

    To deploy a JBI application to Sun's App Server, you will need a JBI compliant ESB installed. OpenESB would be my first choice here. Then as far as installing your components without Netbeans, there are two choices. 1) Copy your SA's to the JBI/ESB autodeploy directory and you binding components and service engines to the JBI/ESB autoinstall directory. 2) Use the ant tasks that the JBI specification (http://jcp.org/en/jsr/detail?id=208) requires for all JBI implementations. OpenESB's JBI tasks are detailed here: http://wiki.open-esb.java.net/Wiki.jsp?page=JBIAntTaskReference. These ant tasks can be wrapped with maven goals if needed.
    Jeff

  • How to run labview program in debugging mode in windows 95 version

    Respected all,
    I am facing probelm while running probe.vi.
    I received this command "connection to acquisition board was not found" when i run labview program.
    I  am using labview 5.1, fieldpoint FP 1000, NI-DAQ 6.5, Field point explorer version 1.6, Measurement and Automation Explorer 1.0.1.
    I would kindly request you please help me how to run my program probe.vi in debugging mode in windows 95 version, so that i can locate where error occurs.
    Thanking You
    Yours faithfully
    M.Vijay

    Respected Norbert,
    Thank you very much to for your help.
    Norbert : Possible reasons are e.g. wrong IDs for measurement devices. If the error is connect to the FieldPoint, it is possible that it isn't configured correctly.
     I am using Field point explorer 1.6, The Field point instrument FP 1000 and RS-232 port is using. It is confirmed that the field point instrument is working properly by LED light indication test.
    Norbert: It sound like you are using DAQ devices (like PCI MIO 6952E) in the application. Are you sure that you select the correct device ID for this?
    I am asking you to know, If i using Labview and  Fieldpoint instrument FP 1000 to monitor my parameter interms of All, Channel 0, Channel 1, Channel 2, Channel 3, Channel 4, Channel 5, Channel 6, Channel 7 for my measurement.
    But now i need to solve the command connection to acquisition board was not found, The expert say this command is due to there was no AT-AO-10 Analog Output board was present in CPU.
    I do not find AT-AO-10 Analog Output board in my CPU, Previously the instrument was worked perfectly by other person who assembled everthing to measure temperature.
    The only aswer know send by previous person is if my task does not imply the use of a DAQ you probably have to locate where the DAQ driver is called and exclude it from the program. try to run the program in debugging mode so that you can locate where the error occurs.
    I do not know how to proceed his instruction. So i would kindly request you to please help me to solve my probelm.
    I also removed AT-AO-10 software from device manager >> Data Acquisition system >>  AT-AO-10 just now.
    I also find GPIB version 1.30, when i remove in add or remove program, it say that Error removing the GPIB.
    I am eagerly waiting for your help.
    Thanking You
    Yours faithfully
    M.vijay

  • How to run the program in back ground with out selection screen ?

    Hi,
    I want to run the program in back ground but don't have selection screen. How to run this program in back ground
    as program has no selection screen.
    Waiting for quick response.
    Best Regards,
    Padhy
    Moderator message: basic, please search for available information/documentation.
    Edited by: Thomas Zloch on Feb 21, 2011 12:43 PM

    Hi,
    Go to transaction SE38 --> Execute --> Background.
    If your program contains selection screen, you have to pass your input values as variants.

  • Executing a Java Program from within a Java Program

    I need to execute the following Java Program from withing another Java Program. The office toolbar command line is
    D:\WINDOWS\system32\java.exe -cp E:\Development\Eclipse\UpdateServer\Classes -server -showversion UpdateServer
    I can find no combination of ProcessBuilder commands, including those that include "Cmd.exe /c" that will make this program run from within another Java Program. All the examples I can find only show how to run Windows *.exe programs. I keep getting error 123 from ProcessBuilder.start(), but I can find no documentation for error 123.

    Assuming your code didn't get mangled by the forum
    (it's missing one "), it may be that your "-cp
    E:\\Develop.." argument is getting quoted as it has a
    space in it; try passing "-cp" and "E:\\Develop..."
    as two arguments.That worked; specifically the following tested OK:
    ProcessBuilder pb = new ProcessBuilder("D:\\WINDOWS\\System32\\Java.exe", "-cp", "E:\\Development\\Eclipse\\UpdateServer\\Classes\\", "-server", "-showversion", "UpdateServer" );
    pb.directory(new File("E:\\Development\\Eclipse\\UpdateServer\\Classes\\"));
    try{
         Process p = pb.start();
         InputStream is = p.getErrorStream();
         InputStreamReader isr = new InputStreamReader(is);
         BufferedReader br = new BufferedReader(isr);
         String line;
         while ((line = br.readLine()) != null)
              System.out.println(line);
         p.waitFor();
    }catch(IOException ioe){
    I was sure I tried that exact same code before, and it did not work, but now it does, at least at the top level (when it is in main of a test program). I will have to wait to try it until later when it is buried deep in a subroutine.

  • Integrating Sun Java Directory Server with Sun Java Application Server 7

    Hi,
    My basic goal is to implement Single Sign On within the network i,e if the user is inside the company's network and tries to access any application, then he should not be required for Username/password again becuase he is in the network.
    My question is Is this possible with Sun Java System DIrectory server. If yes how can we integrate Directory Server with Sun Java System Application Server 7 2004Q2.
    Please help.
    Thanks

    Directory Server in itself doesn't provide any kind of SSO functions. Basically it is a high performing data repository accessible via LDAP and DSML. It is, however, a key component used by SSO applications like Access Manager. If your applications are web applications then take a look at Access Manager for your SSO needs.
    Regards,
    Scott

  • Fail to run my first Servlet with Sun ONE Studio 4 Update 1 (+ bi Tomcat)

    Hello !
    I failed to run my first Servlet with Sun ONE Studio 4 update 1 ( with built in Tomcat)
    I think that I followed most of the online instructions,
    so I successfully run a JSP file,
    but I failed with my first servlet:
    The error message is:
    "Standard Wrapper[:MyServlet]: Marking servlet MyServlet as unavailable
    javax.servlet.ServletException: Wrapper cannot find servlet class com.hemmerling.myservlet.MyServlet
    or a class it depends on
    So please don�t ask me for the code of the servlett ( simply taken from a book),
    but tell me why the one-and-only servlett was not found. what might I have done wrong, if I did everything I did to run the JSP file, too ?
    Of couse I copied the file into the "Classes" directory of the Webmodule ( WEB-INF ) and "processed" it, so that I was able to execute it.
    Any suggestions ?
    Tia
    Sincerely
    Rolf

    Tough to say, but try:
    1. Put the servlet in a package. If you're using the default package (class file in WEB-INF/classes directory, then Tomcat may not find it.
    2. Check out web.xml to ensure the <servlet> and <servlet-mapping> entries are correct.
    3. Make the servlet as simple as possible so you're sure that it is the servlet itself that cannot be found and not some other class that it uses.
    Good Luck

  • How to run a program in java by double clicking on it?

    hi,
    simple question for you all:
    normally when i do java programs i am used to compiling it and running it via JBuilder.
    However, i saw a java program that had been installed on a desktop and the user double clicked it and it came straight up.
    how can this be done?

    You can create executable jar files that can start up an application when double clicked. If you want more specifics, search the forums for "executable jar" and I'm sure you'll get more than enough info.

Maybe you are looking for

  • Items in the iTunes library can't copy to the iPhone because they could not be found.

    Everytime I try to sync my iPhone4 to my PC, a notification pops up saying that some of the items (ringtones) cannot be copied because they could not be found. I tried syncing it about 5 times and the same thing happened.

  • Transporting object from development to production server

    Hi Everyone, Could you plz tell me how can i transport a object from development server to production serevr if that object is local in production server. And also could u tell me if the transfer structure is replaced if the names are different in bo

  • Sql report

    Hi All, iam generating a pipe delimited t report with sql*plue excutales. when i sumbmit the concurrent program from application i getting a message as Input truncated to 114 charecter in my output file i want to avoid this meesage in my output file

  • Dynamic web content base on 9i/10g database

    dear all, i need to find sample of build dynamic web content base on 9i/10g database. i remember otn have a sample for dynamic web content. but not found in sample code at otn now. who can tell me where can find it ? best regards boris

  • Where can I download Business Objects Analysis for Office Edition?

    Hello I was told by our SAP Rep that the software is available for us to download. I did not bother asking him for a link and now I am lost. I see BO software (server and client). I don't think Analysis for Office would be bundled in the Client tools