Problem compiling Java on XP

i'm new to java, just went through the tutorial just now..
tried compilling my program the first time on XP, but the system doesn't recognise the command JAVAC,
i've installed the java compiler (j2re-1_4_1_01-windows-i586.exe)
but it still isn't working.. any help?
thanks!

then again.. i'm still having problems compiling..
i managed to install the right sdk, but.. i have to run the command javac from the bin directory.. else the command prompt won't recognise it..
anyway to get around this?
also.. because of this.. i can't compile my program.. :(

Similar Messages

  • Having problems compiling *.java with import javax.servlet.jsp......

    I've been trying to do the tutorials in a book titled Apache Jakarta-Tomcat as part of my introduction to JSP. I'm new to Java but do know the basics. I have on my machine Java 1.3, Java 1.4, Java FrameWorks 2.1 and Jython 2.1 on Win2000 Pro. So enough about my configuration. I have never worked with packages also.
    I downloaded the files from the books site due to the fact I make a lot of typos when hand coding Java (I've become a pretty good debugger of my own code). But everytime I go to compile the *.java I get error messages. So below you will find HelloTag.java and beneath that the error messages that are thrown when I try and compile it. I tested other bits of *.java and have had no problem compiling them. Is there a JSP module I'm missing?
    Am I doing something wrong or am I missing something from my configuration.
    Marijan Madunic
    package chapter2;
    import javax.servlet.jsp.JspException;
    import javax.servlet.jsp.JspTagException;
    import javax.servlet.jsp.tagext.TagSupport;
    public class HelloTag extends TagSupport
    public void HelloTag() {
    // Method called when the closing hello tag is encountered
    public int doEndTag() throws JspException {
    try {
    // We use the pageContext to get a Writer
    // We then print the text string Hello
    pageContext.getOut().print("Hello");
    catch (Exception e) {
    throw new JspTagException(e.getMessage());
    // We want to return SKIP_BODY because this Tag does not support
    // a Tag Body
    return SKIP_BODY;
    public void release() {
    // Call the parent's release to release any resources
    // used by the parent tag.
    // This is just good practice for when you start creating
    // hierarchies of tags.
    super.release();
    D:\Java\JDK 1.3\bin>javac HelloTag.java
    HelloTag.java:3: cannot resolve symbol
    symbol : class JspException
    location: package jsp
    import javax.servlet.jsp.JspException;
    ^
    HelloTag.java:4: cannot resolve symbol
    symbol : class JspTagException
    location: package jsp
    import javax.servlet.jsp.JspTagException;
    ^
    HelloTag.java:5: cannot resolve symbol
    symbol : class TagSupport
    location: package tagext
    import javax.servlet.jsp.tagext.TagSupport;
    ^
    HelloTag.java:7: cannot resolve symbol
    symbol : class TagSupport
    location: class chapter2.HelloTag
    public class HelloTag extends TagSupport
    ^
    HelloTag.java:14: cannot resolve symbol
    symbol : class JspException
    location: class chapter2.HelloTag
    public int doEndTag() throws JspException {
    ^
    HelloTag.java:20: cannot resolve symbol
    symbol : variable pageContext
    location: class chapter2.HelloTag
    pageContext.getOut().print("Hello");
    ^
    HelloTag.java:24: cannot resolve symbol
    symbol : class JspTagException
    location: class chapter2.HelloTag
    throw new JspTagException(e.getMessage());
    ^
    HelloTag.java:28: cannot resolve symbol
    symbol : variable SKIP_BODY
    location: class chapter2.HelloTag
    return SKIP_BODY;
    ^
    HelloTag.java:37: cannot resolve symbol
    symbol : variable super
    location: class chapter2.HelloTag
    super.release();
    ^
    9 errors

    Well, it looks like you've not got the servlet development kit JAR on your classpath. I think it'll probably be called servlet.jar on your system. Add that to the classpath if it's not already there.
    Incidentally, you've bumped into one of the areas Java's slightly lenient - declaring a method that looks like a constructor:
    public HelloTag() { }
    public void HelloTag() { }The first is a constructor, the second is a normal method. I'm assuming you intended to have the former instead of the latter.
    Anyway, hope this helps.

  • Problem compiling java file to access web service! newbie troubles !

    I am new to web services and this is my first program...
    I am compiling java file which has import statement like:
    import org.apache.soap.util.xml.*;
    import org.apache.soap.*;
    import org.apache.soap.rpc.*;
    It says ----- package org.apache.soap.util.xml does not exist as one of errors..
    I have a folder that I named soap myself and I have activation.jar,serces.jar,mail.jar,soap.jar in it.
    I added c:\soap in my classpath and this was supposed to be the quickstart way to try an example out...
    but it gives me compilation errors... what should I do ?

    You'll need to specify each jar file in the classpath. c:\soap\xerces.jar;c:\soap\sax.jar;....

  • Problem compiling Java Adventure

    Hi,
    I just installed Java adventure. It runs correctly, I can do a setup and deploy the application.
    But when it cames to build it, i got the follwing errors, does someone have an idea where this problem come from ???
    Thnaks
    ================================================
    banner:
         [echo] +---------------------------------------+
         [echo] +    Building Service Locator Component
         [echo] +---------------------------------------+
    compile:
    clientjar:
        [mkdir] Created dir: E:\Dev\Tools\j2eesdk1.4b2\samples\blueprints\adventure1.0ea3.1\src\components\servicelocator\build\jar
         [copy] Copying 3 files to E:\Dev\Tools\j2eesdk1.4b2\samples\blueprints\adventure1.0ea3.1\src\components\servicelocator\build\jar
          [jar] Building jar: E:\Dev\Tools\j2eesdk1.4b2\samples\blueprints\adventure1.0ea3.1\src\components\servicelocator\build\servicelocator.jar
       [delete] Deleting directory E:\Dev\Tools\j2eesdk1.4b2\samples\blueprints\adventure1.0ea3.1\src\components\servicelocator\build\jar
    core:
    tools:
    compile-core:
         [echo] Running wscompile for the OPC PURCHASE ORDER endpoint:
         [echo] e:\DevToolsj2eesdk1.4b2/share/bin/wscompile.bat
    BUILD FAILED
    file:E:/Dev/Tools/j2eesdk1.4b2/samples/blueprints/adventure1.0ea3.1/src/apps/opc/src/build.xml:128: Execute failed: java.io.IOException: CreateProcess: e:\DevToolsj2eesdk1.4b2\share\bin\wscompile.bat
    -classpath ../build/classes -gen:server -keep -mapping ../build/OpcPurchaseOrderServiceMap.xml -d ../build/classes po-jaxrpc-config.xml error=3
    Total time: 14 seconds
    E:\Dev\Tools\j2eesdk1.4b2\samples\blueprints\adventure1.0ea3.1\src>
    [\code]
    ===========================================                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    From your error, it looks like you have not escaped the backslash in the path to J2EE 1.4 beta.
    Note: On Windows, while writing the paths in the build.properties files, you need to escape the "\" properly by using "\\" instead. For example, to set j2ee.home to c:\j2sdkee1.4, the entry in the properties file is j2ee.home=c:\\j2sdkee1.4.

  • Still having problems compiling java code

    I still dont know what is wrong, it works just fine in JCreator but, when I try to use the command prompt it still gives me the same error message. Also I have made sure that the code is in the same directory with the command.

    Thanks for the advice Kitty, that was the command I
    was using javac <FileName.java>. I did, however,
    update my classpath and the path variables like you
    mentioned, but I am still recieving the same error
    message. I just cannot figure out where the error in
    the code is. =(Okay... apparently you need a little help...
    So to help you clarify thing a bit...
    Let's start here...
    This error below...
    C:\myfolder\test>javac VariableDemo.java
    'javac' is not recognized as an internal or external command,
    operable program or batch file.... is what you get if the OS does not know the path to javac.exe...
    if you type path at the command prompt you will see what your "System" path is, which would include an entry that would point to you sdk, something like "C:\YourJavaSDKFolder\bin";C:\someotherprogramfolder;
    This path has nothing to do with the classpath. Your system uses this path to find executables to run you programs ( although many are locations are actually in your registry an therefore no path entry is needed... i.e. MS Word )...
    This error...
    C:\myfolder\test>javac VariableDemo.java
    error: cannot read: VariableDemo.java
    1 errormeans that your compiler was not able to locate your *.java file. I was able to replicate because VariableDemo.java does not exist on my machine, so javac.exe naturally could not find the *.java file...
    javac.exe does not check the "System" path to find class files, so even though you saved you file in your "bin" folder of the SDK, javac would not know it there...
    the way that javac.exe is able to find you class files is either by the default "." as stated before which is your current working directory
    ( noted by your command prompt ... C:\myfolder\test> )
    or if you had specified your classpath either as an argument...
    C:\>javac -classpath c:\myfolder\test VariableDemo.javaor by setting the "classpath" environment variable either temporarily in you command prompt by typing
    set classpath=c:\myfolder\testor setting as you "System" environment variable by ( assuming Win XP though it similar for NT and 2000 ) via System Properties|Advance Tab|Environment Variable... Read your OS documentation for details involving setting your Environment Variable...
    as for why JCreator or what ever IDE you are using is able to do it, is because, part of what it does is temporarily pass the classpath information to the compiler automatically... so that you won't need to do it... and which is why IDE are generally not recommended to beginners to learn Java... It does to much stuff you... hence you classpath issue...
    anyway, check out the links provided for you for further and more detail information on setting the "classpath" on other Java basic...
    - MaxxDmg...
    - ' He who never sleeps... '

  • Problem compiling java programs

    when i run javc in command prompt it runs fine but when i try to compile any program through command prompt it gives following error:
    javac: file not found
    usage: java <options> <source file>
    use -help for list of attributes
    what shouls i do plz help

    yogiis wrote:
    when i run javc in command prompt it runs fine but when i try to compile any program through command prompt it gives following error:
    javac: file not found
    usage: java <options> <source file>
    use -help for list of attributes
    what shouls i do plz helpuse set path="path of java/jdk/bin folder with double quotes" then press enter
    otherwise if you are ussing windows system goto to my computer properties and use advanced tab then use environment variables, there use user/system variables and check is there any exisiting path named variable is there or not if there click on edit and use ; and paste the complete path there. press ok, apply. Then use the command.

  • Problems with Java, (i.e, compiling, etc) & Terminal Window

    I am having a problem compiling my program in the Terminal Window. I am working on Java for my ICS class and the first project compiled and ran fine through Terminal Window, but when the next assignment came, it throws this error:
    class file has wrong version 50.0, should be 49.0
    Here's the screen image:
    http://tinypic.com/view.php?pic=6ywfbx3&s=1
    I'm not sure what the problem is, is there an expert out there? Also, I think there is something wrong with my Terminal Window as I cannot change directories, run/compile program "in" the shell, for example, when I want to compile a program, I have to press "COMMANDSHIFTN" so I can run it from here(it's the "New Command" window:
    http://tinypic.com/view.php?pic=879bqrd&s=1
    Whereas I have seen every other Mac user in my class compile their program easily by pressing Enter "in" the shell, just like command prompt.
    If I am not making myself clear please let me know, I'm trying to explain as specifically as I can.
    One more note:
    When I type in the shell and press Enter, it just goes down a line like a Word document.
    Here is an example, it follows in order:
    1) http://tinypic.com/view.php?pic=6z955oh&s=1
    2) http://tinypic.com/view.php?pic=8aw1dox&s=1
    3) http://tinypic.com/view.php?pic=7xln5fp&s=1
    4) http://tinypic.com/view.php?pic=873mr5w&s=1

    For your issues with Terminal:
    Discussions > Mac OS X Technologies > Unix
    For your Java problems:
    Discussions > Developer Forums
    You're more likely to find answers to your questions there…

  • Problem in JAVA PL/SQL Block

    Hi all,
    I am facing a peculiar problem. I have one JAVA PL/SQL code, which runs a shell script, which indeed fire a zipping command remotely. Here I am providing you the code. Actually it zip some files at application server running from Database Server.
    create or replace procedure RC(p_cmd in varchar2)
    as
    x number;
    begin
    x := run_cmd(p_cmd);
    EXCEPTION
    when others then
    dbms_output.put_line('WHEN OTHERS '||sqlcode||sqlerrm);
    end;
    <====This RC is called from a before insert trigger. And value of p_cmd is $ORACLE_BASE/report_compress.sh $REPORT_DIR/<report_file>.
    create or replace
    function RUN_CMD(p_cmd in varchar2) return number
    as
    language java
    name 'Util.RunThis(java.lang.String) return integer';
    create or replace and compile
    java source named "Util"
    as
    import java.io.*;
    import java.lang.*;
    public class Util extends Object
    public static int RunThis(String args)
    Runtime rt = Runtime.getRuntime();
    int rc = -1;
    try
    Process p = rt.exec(args);
    int bufSize = 4096;
    BufferedInputStream bis =
    new BufferedInputStream(p.getInputStream(), bufSize);
    int len;
    byte buffer[] = new byte[bufSize];
    // Echo back what the program spit out
    while ((len = bis.read(buffer, 0, bufSize)) != -1)
    System.out.write(buffer, 0, len);
    rc = p.waitFor();
    catch (Exception e)
    e.printStackTrace();
    rc = -1;
    finally
    return rc;
    And also I have executed:
    BEGIN
    dbms_java.grant_permission('<DB_USER>','java.io.FilePermission','$ORACLE_BASE','write');
    dbms_java.grant_permission('<DB_USER>','java.io.FilePermission','$ORACLE_BASE/report_compress.sh','execute');
    dbms_java.grant_permission('<DB_USER>','java.lang.RuntimePermission','*', 'writeFileDescriptor' );
    END;
    REPORT_COMPRESS.SH
    #!/bin/sh
    remsh <APPLICATION SERVER IP> -l <APPLICATION_SERVER_OS_USER> -n "gzip -f $1"
    Now problem is while execute RC, it gives no error but the remote file does not get zipped. When I run report_compress.sh from command promt, it works fine.
    Earlier we used HP-UX as our DB server and Application Server. And RC worked fine there. Recently we have moved to AIX(for both DB and AS), and now we are facing this problem.
    Please guide me to resolve this problem.
    Note: .rhosts entry is fine in both the servers(as per me) as report_compress.sh is working fine.

    Make sure that the .profile does not read something from tty - it should not, but it sounds like the .profile is expecting tty input.
    Alternatively, simply copy and paste the environment settings from .profile to your compress script. The only read important setting is PATH as your script simply does a remote shell. Thus LD_LIBRARY_PATH/SHLIB_PATH and other settings are not needed.
    You can also add debugging to your shell script - useful when executing it in the background.
    Something as follows:
    # create debug file name
    DEBUGFILE=/tmp/~$$.debug-out # e.g. /tmp/~1234.debug-out where 1234 is the PID
    echo "`date` Starting [$0] with parameters [$*]" >> $DEBUGFILE
    # sourcing environment
    echo "Loading default profile..." >>$DEBUGFILE
    . /home/oracle/.profile 1>>$DEBUGFILE 2>>$DEBUGFILE
    # running remote shell
    echo "Running remote shell..." >>$DEBUGFILE
    remsh ... 1>>$DEBUGFILE 2>>$DEBUGFILE
    .. etc.
    When this is working, you can remove the debug file from the shell script, or simply delete it when the script is successful.

  • Error while running compiled java code

    Hi
    I have an evaluation license of the JDeveloper2.0 installed on my WindowsNT 4.0 workstation.
    I seem to have a problem running my compiled jave code. After compiling the source code(.java file) when I try to run the same I get a message saying
    "<FileName> not found in outpath classpath or sourcepath ".
    What does this mean and how can I rectify it?
    Regards
    Sree
    null

    Your classpath tells Java run time where to look for the class files it needs. In JDeveloper the class path is set in your project properties. Select Project->Properties and check that the source and output paths correspond to your myprojects and myclasses directories.

  • Error while compiling java class (ora-29535 source requires recompilation)

    Hello. I`m new with oracle and i`m having a problem with java classes. Few days ago i loaded java classes (loadjava) from jar file(biojava3-structure-3.0.2.jar) and compiled ( everything compiled with status valid). Now i`m writing my own class and i can`t import classes from biojava3. I`m getting error:
    Projekt:7: cannot access org.biojava.bio.structure.Atom
    bad class file: null
    class file has wrong version 50.0, should be 49.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    import org.biojava.bio.structure.Atom;
    I have tryed to change jdk version in netbeans from 1.7 to 1.6. I created java class in sql plus That still not resolved my problem.
    Please help me.

    consider posting in Java forum instead of Database forum
    https://forums.oracle.com/forums/category.jspa?categoryID=285

  • Error while compiling java file

    Hi, im newby in java,
    i was trying to compile java files, and after that i will use it in JSP as javabean.
    I have 2 files already, the first file is a connection code, and its compiled successfully, it looks like this
    i named this as ConnectionBean.java
    package my_package;
    import java.sql.*;
    public class ConnectionBean {
         private Connection con;
         private static final String driver = "org.postgresql.Driver";
         private static final String url = "jdbc:postgresql://localhost:5432/PSQLDS";
         private static final String username = "postgres";
         private static final String password = "mypassword";
         public ConnectionBean() {
         public Connection logOn() {
              try {
                   Class.forName(driver); con = DriverManager.getConnection(url, username, password); }
              catch(ClassNotFoundException e) {
                   System.err.println("ConnectionBean: driver unavailable..."); con = null; }
              catch (SQLException e) {
                   System.err.println("ConnectionBean: driver not loaded..."); con = null; }
              return con;
         public void logOff() {
              try {
                   con.close(); }
              catch (Exception e) {
                   e.printStackTrace(); }
    as you can see above im using "package", and yes i have manage to put all my java files within the correct path (ROOT\WEB-INF\classes\my_package)
    And also, i have test this class as javabean on JSP file and it works.
    There for i continue to create the second java file, as a purpose to create a back engine for JSP. I use the same package as ConnectionBean.java, it looks like this
    i named this as ListPageEngine.java
    package my_package;
    import java.beans.*;
    import java.sql.*;
    public class ListPageEngine {
         public static void main(String[] args) {
              ConnectionBean conBean = new ConnectionBean();}
    on compiling process using command "javac ListPageEngine.java", i get this error message
    ListPageEngine.java:11: cannot find symbol
    symbol : class ConnectionBean
    location: class my_package.ListPageEngine
    ConnectionBean conBean = new ConnectionBean();}
    ^
    ListPageEngine.java:11: cannot find symbol
    symbol : class ConnectionBean
    location: class my_package.ListPageEngine
    ConnectionBean conBean = new ConnectionBean();}
    ^
    2 errors
    I think, i am pretty much sure that all my configuration (wheater its Apache TomCat, Environment Variable or PostgreSQL server) was good, as a prove, i was able to use ConnectionBean.class in my JSP file.
    I susspect the problem is related with "package", seems i cannot use ConnectionBean class within ListPageEngine class when i use package.
    For another information, i didn't install such thing as J2EE, i only install JDK 1.5, i also guess this might be the cause.
    Right now im all stuck, i try to find thread which might be related with my problem but i failed to find it, most of them get the same answer by UncleSAM which are
    Try the following forum (about JSP technology)
    http://forum.java.sun.com/forum.jspa?forumID=45
    JavaBeans spec contains nothing about JSP, but JSP spec describes using of beans.
    i hope my question is clear so anyone who might have experience or clue with this problem might be able to help me.
    Thanks before

    finally folks, i found answer to my own problem hehehehe..
    the problem is on the compiling command (javac ... my_file.java), i found that i need to add some parameter on the command to make it works.
    This problem solved.

  • Problems compiling

    Hi all,
    I'm new with JSP, actually I don't know wether it's a TOMCAT ESPECIFIC issue or if your can help me here. I get the following error while executing a simple script (gateway.jgp) on the browser:
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP:
    Stacktrace:
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
    I have a simple JSP script:
    gateway.jsp
    <%
    String commando = request.getParameter("comando");
    if (commando.equals("lista")) {
    %>
         <%@ include file="servicosXML/consulta.jsp" %>
    <%
    }else{
    %>
         <%@ page contentType="text/xml;charset=ISO-8859-1" %>
         <resultado>
         commando desconhecido
         </resultado>
    <%
    %>
    servicosXML/consulta.jsp
    <%@ page language="java" import="servicos.BoletaDAO,java.util.*,"%>
    <%
    String subcomando = request.getParameter("subcomando");
    String buffer = new String();
    HashMap map = new HashMap();
    if (subcomando.equals("carteira")) {
         buffer = BoletaDAO.listaCarteira();
    } else if(subcomando.equals("classe")){
         buffer = BoletaDAO.listaClasse();
    } else if(subcomando.equals("grupo")){
         buffer = BoletaDAO.listaGrupo();     
    } else if(subcomando.equals("operacao")){
         map.put("Operador",request.getParameter("Operador"));
         map.put("Dt",request.getParameter("Dt"));
         buffer = BoletaDAO.listaOperacao(map);     
    } else if(subcomando.equals("produto")){
         map.put("CLSId",request.getParameter("CLSId"));
         map.put("Sinal",request.getParameter("Sinal"));
         buffer = BoletaDAO.listaProduto(map);     
    out.print(buffer);
    %>WHATS THE PROBLEM???
    THANKS IN ADVANCE

    Need a bit more on the error message/stack trace.
    Specifically the bit that tells you the root cause of the issue.
    Its good that you tried to keep the stack trace short, unfortunately the bit you removed is the bit that contains the actual error message of interest ;-)

  • Problem compiling Abstract class

    Hi
    I have writting an abstract class Sort.java and another class BubbleSort.java. I am having problems compiling BubbleSort.java class.
    The following is the error message
    BubbleSort.java:8: missing method body, or declare abstract
         public int doSorting(int[] array);
    ^
    BubbleSort.java:11: return outside method
              return num;
    ^
    The following is the code
    public abstract class Sort
    public abstract int doSorting(int[] array);
    }// End of class
    public class BubbleSort extends Sort
    private int num = 2;
    public int doSorting(int[] array);
    num = num + 2;
    return num;
    } // end of class

    Remove the semi-colon.
    public int doSorting(int[] array); // <------- there

  • Problem with java source procedure

    Hello everyone, I've set up a simple example that is supposed to create an fdf file on the server. I tested my program and it works fine.
    Now I'm trying to do the same thing except that I would like to have my java code in the database. Here's what I've done:
    # on database in opus schema
    create or replace and compile java source named testpdf as
    import java.io.*;
    import com.adobe.fdf.*;
    import com.adobe.fdf.exceptions.*;
    public class TestPDF
         public static void Test()
    try
         FDFDoc outputFDF = new FDFDoc();
         outputFDF.SetValue("status", "En traitement!");
         outputFDF.SetValue("Date", "01-01-2006");
         outputFDF.SetValue("Name", "Alexandre Folgueras");
         outputFDF.SetValue("Address", "12 Saratoga Ave");
         outputFDF.SetValue("City", "Saratoga");
         outputFDF.SetValue("State", "CA");
    outputFDF.SetFile("/tmp/java_pdf/GenerateFDF.pdf");
    outputFDF.Save("/tmp/java_pdf/alex.fdf");
    catch (Exception e)
    e.printStackTrace();
    create or replace procedure pdf_doc
    AS LANGUAGE JAVA
    NAME 'TestPDF.Test()';
    commit;
    Everything seems to be OK by when I run it, my file does not get created even though I don't get any errors.
    Anybody knows why?
    Thanks in advance!

    Hello,
    I'm also creating a class with static functions and putting it as a Java source in Oracle but I have problems with imports. In my case, I use MQSeries JAR files and when I put my code in Oracle, I have warnings "Java created with compilation errors". It's just about the lines where I create/use MQSeries objects, because when I comment them, I have no more errors.
    I see you also use specific imports with PDF, so I would like to know where you put the JAR files so that the Java source can be compiled correctly.
    Thanks in advance,

  • Compiling java files in DOS window

    Hi,
    I have been writin a small Client Server Application. I am attempting to use java packages in order to put certain class files into particular directories, and then import the packages when needed.
    So far, i have started my 1st attempt at a very small application just to send / receive messages. My problem is however, that i can compile all the java files into specific directories & packages no problem, but when i try to compile the java files which make use of these classes, i keep getting the same error.
    OK, i will try to simplify,
    My Server program (called MyServer.java) uses 2 classes (called ProcessTransaction, and NumberValidator), I have compiled the generated class files from ProcessTransaction.java and NumberValidator.java files into a DIR called C:\JavaForm\serverstuff. i.e. my server program imports the package "serverstuff,*;" The problem is that when i try to compile my server program i get the error message:
    "cannot access ProcessTransaction
    bad class file: c:\JavaForm\ProcessTransaction.java
    file does not contain class ProcessTransaction
    Please remove or make sure it appears in the correct subdirectory of classpath"
    I am using the command:
    javac -classpath c:\JavaForm c:\JavaForm\MyServer.java to compile the server file
    All the java and class files are stored in the C:\JavaForm folder
    I dont understand why the ProcessTransaction call cannot be accessed because it is most definitely in the compiled java file!!!
    Any help would be much appreciated!!!
    Cheers
    Iain

    it's OK, i figured out that to compile the Server program successfully, you have to remove all the other java files from the DIR which the Server.java files exists, or else there is a conflict!!!! I dont know why, but that's what you have to do!!!!

Maybe you are looking for

  • Error (150:30) for Acrobat Pro 9.3 and PS 3 & 4 CS

    I just had a very nice call with a support person at the 800 number, but I thought that I would still post my problem in the hopes that it might still help move towards a solution. I lost use of Acrobat Pro 9.5.1 back in early June when I updated my

  • WIP - Job Order Pending for Completion Transaction Reprt

    How can we get report - job order pending for completion transaction from WIP module? Please give us solution. Thanks & Regards, PressureJet Systems Pvt. Ltd. Edited by: PressureJet Systems Pvt. Ltd. on Apr 7, 2013 9:57 PM

  • IDOC- XI- DB2 Error

    I am working on IDOC-XI-DB2 scenario and when I am executing the same, i am getting folllowing error. Can anyone please help in resolving the same. Error while sending message: com.sap.aii.af.ra.ms.api.ConfigException: ConfigException in XI protocol

  • Problem in pi7.0 Adapter monitoring

    hello all, i am working on file to jms scenario. File adapter is picked the file. but jms adapter is not received. in adapter monitoring no messages are displayed. Messages are storing into smq2.queues are registered.  in sxmb_moni Q.Status showing s

  • MenuTreeListLayoutController Layout Controller

    Hello, i'm using the MenuTreeListLayoutController Layout-Controller. Is it possible to show only files in the list area and hide the folders there. Best regards, TomSd