Problem compiling a  file which utilises a class I've created

I am experimenting with creating my own classes. I've created my own class and I'm able to compile it. When I try to compile my test file to test the class I get a "cannot resolve symbol" error referring to where my class name is in the test file. The thing is, I've emailed the files to a friend and he is able to compile both files and subsequently run the test file. Has anyone got any ideas as to why my friend can compile the test file but I cannot?

My XP machine is at home, so I cannot verify that. But for W2K, you can right-click on the My Computer icon, select Property. Then select Advanced tab. In the middle is Environment Variables. Click on the button to open up the User Variables and System variables. CLASSPATH is in the System Variables pane.
XP should be similar to W2K. Give it a try.
Hope this helps.

Similar Messages

  • 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 source file in package

    Hi, I have 5 source files which I have just packaged together and put in the same sub-directory, the problem is that when I try to compile the file with the main method I get the error message:"cannot read" then the name of the source file. I am compiling from the command line and setting the classpath as I compile with the statement:
    c:\j2sdk1.4.1\bin>javac -classpath c:\directory\package directory source file.java
    I'm not sure what I am doing wrong and the source files all compiled fine before I added the package statement to the files. Please any help would really be appreciated.

    It sounds like the java file your are trying to compile is not in the directory you are compiling from.
    Is this basically what you are doing?:
    Say the package name is mypackage.
    Assume we are O.K. with keeping source and class files together.
    Create a directory named 'mypackage' somewhere...C:\mypackage\.
    Put all the .java files in it (these .java files indicate that they are a member of the 'mypackage' package).
    At a command prompt, cd to the directory containing the 'mypackage' directory...'cd C:\'
    Compile the source files: C:\j2sdk1.4.1\bin\javac mypackage\*.java
    run the main class: C:\j2sdk1.4.1\bin\java mypackage.TheMainClass
    Basically, this says keep the files where you want them and point to javac, instead of moving everything under java/bin. btw it will save a lot of typing if you add java/bin to your PATH.
    Hope this helps.

  • Unable to compile .c file which includes jni.h

    I have implemented the native method in c program and saved it as JNIDemo.c.The problem is that when I compile the c file I get lots of error regarding jni.h file which I have placed inside the include dir of torbo c.Please tell me- is there any specific path setting of jni.h header file?? How to create the dll file of the JNIDemo.c?

    Suggestions:
    1) post the error messages
    2) post the file (if small enough)
    3) consider asking this in the JNI forum where you have a better chance of bumping into a JNI expert. If you do this, please have each thread refer to the other so as not to get flamed for cross-posting.

  • Problem compiling idl files

    I compiled several rmi-iiop examples from Weblogic 6.0 distribution (smaples\examples\rmi_iiop\ejb). Then I ran idlj on generated idl files and then javac to compile java files (both idlj and javac are part of Weblogic 6.0 distribution).In all cases compiler complained about generated javax.ejb.CreateEx, javax.ejb.RemoveEx and javax.io.IOEx that they didn't have all methods implemented (like toString(), message(), localizedMessage() and so on).Could anybody tell me if he or she managed to create working CORBA client using JDK 1.3 ORB and _EJB server object__?Thank you,Yuri

    Hello Eduardo,
    Thank you very much for your reply! This is a very good suggestion and I
    will try to use it!
    However, I would like to mention that it is possible to start with simple
    RMI model (using only primitive java types) and run weblogic.rmic on RMI
    class to generate IDL files. I tested RMI-IIOP examples that come with WLS
    5.1 and WLS 6.0 using Java 1.3 ORB and they worked in both cases.
    Thank once again for suggestion!
    Yuri
    "Eduardo Ceballos" <[email protected]> wrote in message
    news:[email protected]..
    A Java (JDK 1.3 ORB) client is not possible because the Java to IDLmapping creates conflicts with existing classes, in this case
    java.lang.Throwable. The problem is that you can not start with an RMI
    interface (the EJB in this case) and there after use the CORBA programming
    model. If you want to use the CORBA programming model, you must derive your
    java classes from the IDL to Java mapping.
    >
    Yuri Rychikhin wrote:
    I compiled several rmi-iiop examples from Weblogic 6.0 distribution
    (smaples\examples\rmi_iiop\ejb). Then I ran idlj on generated idl files and
    then javac to compile java files (both idlj and javac are part of Weblogic
    6.0 distribution).In all cases compiler complained about generated
    javax.ejb.CreateEx, javax.ejb.RemoveEx and javax.io.IOEx that they didn't
    have all methods implemented (like _toString(), message(),
    localizedMessage() and so on).Could anybody tell me if he or she managed to
    create working CORBA client using JDK 1.3 ORB and __EJB server
    object__?Thank you,Yuri
    >

  • Problem compiling jsp file

    I am using ant to precompile my jsp files which contains struts taglibs but it is giving an error
    [jasperc] error:org.apache.jasper.JasperException: Error compiling \attendance\AllPendingAuthentication.jsp
    [jasperc] at org.apache.jasper.JspC.processFile(JspC.java:543)
    [jasperc] at org.apache.jasper.JspC.execute(JspC.java:748)
    [jasperc] at org.apache.jasper.JspC.main(JspC.java:770)
    what i need to do to come out of this??

    You can load the JSP in the browser and add a jsp_precompile parameter, something like:
    http://yourwebsite.com/yourwebpage.jsp?jsp_precompile
    Any mistakes will end up being displayed in the browser, but the JSP will never get executed should it contain no programming mistakes.

  • Find jar file which contains wanted class

    I have too many jar and zip files under my classpath. How could I know which jar or zip file contains the class file I wanted?
    Thanks.

    Maybe this tool will be of interest to you:
    Java Tip 105: Mastering the classpath with JWhich - Identify which class will be loaded in your classpath
    http://www.javaworld.com/javaworld/javatips/jw-javatip105.html?
    Jesper

  • Problem Compiling JSP files

    I am unable to compile my jsp file whan they are kept in public_html?I have javac in d:\jdk1.2\bin.I installed my weblogic in d:\weblogic.Any help in this regard is very highly apriciated.I really need it very badly.
              

    add C:\Tomcat\webapps\examples\WEB-INF\classes to your classpath.
    You can do this through the control panel or by:
    set CLASSPATH=%CLASSPATH%;C:\Tomcat\webapps\examples\WEB-INF\classes

  • Problem executing .bat file from within Java class

    I'm stumped: I have no problem executing a .bat file that sets classpaths and executes a Java jar, but when I try to execute other executables first and then the .jar, my application hangs and since the DOS box doesn't come up over my GUI, I can't see what's going on.
    This works:
    public void execute() throws Exception {
    String s = "c:\\cs47auxs\\omnijar\\omni.bat";
    Process p = Runtime.getRuntime().exec("\"" + s + "\"");
    p.waitFor();
    JOptionPane.showMessageDialog(frame,
    "The Database Has Been Successfully Reloaded.",
    "Information Message",
    JOptionPane.INFORMATION_MESSAGE);
    Here's the .bat 'omni.bat'
    set JAVA_HOME=c:\j2sdk1.4.2_04\bin
    %JAVA_HOME%\java -jar C:\CS47AUXS\OMNILOADJAR\OmniLoad.jar
    This doesn't work:
    public void execute() throws Exception {
    String s = "c:\\cs47auxs\\omnijar\\jobomni.bat";
    Process p = Runtime.getRuntime().exec("\"" + s + "\"");
    p.waitFor();
    JOptionPane.showMessageDialog(frame,
    "The Database Has Been Successfully Reloaded.",
    "Information Message",
    JOptionPane.INFORMATION_MESSAGE);
    Here's the .bat file 'jobomni.bat'
    SET NETX_HOME=C:\CS47AUXS
    SET COBOL_HOME=C:\CS47AUXS\OFFLINE
    CD %NETX_HOME%
    CALL SET-NETX.CMD
    CD %COBOL_HOME%
    SSBPPC10 JOBOMNI X
    SET JH=C:\J2SDK1.4.2_04\BIN
    SET OMNI_HOME=C:\CS47AUXS\OMNILOADJAR
    CD %OMNI_HOME%
    %JH%\java -jar omniload.jar
    Can anyone shed some light here? Even when I execute the application from the command line the new DOS box doesn't become visible nor can I see any errors. If I could just get that visibility, I could probably figure out what is going wrong.

    Same problem with me as well.... Badly looking for a solution...
    I predict the following:
    - If your batch file has pretty less number of dos/shell commands then it gets executed fine with exec() and proc.waitFor();
    - If you increase the number of dos/shell commands in the bat file then try executing it then it definately hangs at proc.waitFor();
    Even "cmd.exe /C C:\\test.bat" hangs... if the commands are more...
    Is this some sort of bug? or am i doing anything wrong? I tried searching for solution on the net and search forums... but couldnt find a solution for the same.. not sure where i missed, what i missed...
    Incase some one finds a solution.. do post it here...
    Message was edited by:
    amadas

  • Error in running jsp file which contains inner class,help !

    Environment ias sp4 for windows2000
    Error:
    try to access class jsp.APPS.bsteelWZ.order.OrderMgmtMain$1$sOrderHelper
    from class jsp.APPS.bsteelWZ.order.OrderMgmtMain
    OrderMgmt.jsp contains a class named sOrderHelper.
    It's all ok on ias sp2 for solaris.
    Thank you!

    405 errors in the HTTP cycle
    Any client goes through the following cycle:
    * Obtain an IP address from the IP name of your site (your site URL without the leading 'http://'). This lookup (conversion of IP name to IP address) is provided by domain name servers (DNSs).
    * Open an IP socket connection to that IP address.
    * Write an HTTP data stream through that socket.
    * Receive an HTTP data stream back from your Web server in response. This data stream contains status codes whose values are determined by the HTTP protocol. Parse this data stream for status codes and other useful information.
    This error occurs in the final step above when the client receives an HTTP status code that it recognises as '405'.
    Resolving 405 errors - general
    405 errors often arise with the POST method. You may be trying to introduce some kind of input form on your Web site, but not all ISPs allow the POST method necessary to process the form.
    All 405 errors can be traced to configuration of the Web server and security governing access to the content of the Web site.

  • Problem while compiling 'dll' files in Form Server..Urgent

    Hi!
    I'm trying to compile the library(dll) in form server and getting a message that "can not open that file".At the same time able to compile 'fmb' files which is in the same directory.
    Could you please help me?
    Thank you,
    Denish

    I am also working on Forte. Forte has an inbuilt Tomcat. You dont need to copy any files to any where in the file mount system. You need to specify the External / Internal Browser settings, So that when you try to execute it, the .jsp file can be displayed in the browser. I havent faced any problem as you said.
    Uma
    http://www.javagalaxy.com

  • Corrupted jpeg files (which other apps read fine)

    Hi, I'm running Lightroom on OS X. I imported several years of photos into it, and almost all were added to the Library just fine, but for two images (both JPEG files), Lightroom told me it can't read them because they're corrupt.
    The thing is, these same images are viewable just fine in:
    - Photoshop CS
    - OS X Finder
    - OS X Preview
    - Picasa
    - Windows Explorer
    - anything else I've tried
    Anyway I can find out why Lightroom thinks they're corrupt, and fix them so Lightroom can manage them?

    Betty: I've retried at least 5 times, no luck. (I've seen a similar intermittent problem importing JPEG files which were not corrupt, directly from a flash card reader, and Lightroom only got about 60% of the files; I tried again and it got the rest. This problem is different though -- the files are already on my local hard drive, and no amount of retrying seems to help.)
    John: Can you recommend any such tools? I'm willing to use whichever OS; I have Linux and Windows around as well. I tried a couple, but didn't turn up anything. I'm a fan of DataRescue (as a software developre, their IDA tool is really good) so I tried PhotoRescue, but it seems targetted specifically at recovering data from a corrupted flash card, and doesn't work on individual files at all.

  • Reports Builder 6i Crashes while compiling .rdf file

    Hi,
    Reports Builder 6i Crashes while compiling .rdf file which has output format as pdf. Does anyone knows how to fix this.
    Thanks,
    HC.

    Hi, you may look at your report builder version because a lot of them are bugged out and do need to be upgraded to a higher level...I saw a lots of crashing when opening reports and also compiling reports that ended being an old report builder version full of bugs.

  • How to Compile Jsp File in Class File , Protect my JSP from outworld

    Hello Friends
    My name is chandra prakash, I'm new for u. I've develop a web based software completely in JSP, some files are also written in Java Script. This software have aprox. 40 files --> 30 in JSP + 2 in Java Script + 8 image files .
    Each JSP calls another. and run this on 58 clints machine simultaneusly. we used Oracle 9iAS as back end and Oracle9iAS web Server . Where we found less clients like 20-30 we use Tomcat 5.0 web server .Sir problem is this we don't wan't to leave our jsp source code on server.
    Is any method or third party tool by which we can convert our JSP source file in CLASS file as like real class files provide by javac.
    For this perpose we make a folder and put all files in it. Create a context on Tomcat for this folder.Create a data source for this in tomcat. Bcase this program uses Data source and connect many times to database & fetches many type of data from database. We use servlet files of tomcat for this context in WORK folder of Tomcat. and after that rename our Source file Folder. and again run our program through batch file i'm strange program runs 2-3 steps, after few times it start producing errors.
    Sir do u hava work on this field can u help me to protect this JSP source code.
    I've Use Jikes.com compiler but not get any succes, It may be i'm not using correctly .
    Pls sir give me any suggesition.
    Chandra prakash

    1. Highlight your web project or the individual file
    2. Right click
    3. Select Rebuild to build all jsp files or Make to rebuilt only changed files

  • Which file does possess the class Swing??

    When I try to compile a program a mistake it is generated in the line:
    import javax.swing. *;
    I possess jdk1.4. Which the file that possesses the class swing to add in the classpath??

    I guess, that is not the problem.
    Is there a space between javax.swing. and the * ? - there must be none
    greetings Marsian

Maybe you are looking for

  • I need to ADD and COMBINE parts of a Font or Shape the easy way...

    I need to delete points, or parts of a font, or add to them in a really quick way, I have done it by hand, but it takes too long, plus, I have a lot of these to do. It's actually deleting some of the font, then adding to it. I have a LONG description

  • Select query problem in JDBC sender adapter

    Hello Experts, We have a problem with PI sender adapter that PI has started to miss records in database some database records are missing and we are using the below selet query : SELECT * FROM [database name].[dbo].[Material_Movement] WHERE [Process_

  • Oracle 11g R2 Database Client for Mac OS X?

    Is there an Oracle 11g R2 client for Mac OS X? If so, where is it?

  • How to upgrade iPad2 to iOS5 without deleting my photos & apps etc

    I have an iPad 2 and it's been a long time since I did a sync and i don't have the computer any more. I want to upgrade to iOS5, I downloaded iTunes onto a PC and plugged in the ipad but it said it was going to erase everything. I don't care about mu

  • Online account setup - number not recognized

    Hello, Please can someone help me, I've already tried google anf other search engines to see if there is a solution to my problem, but I've had no luck so far. I am trying to set up an online account to manage my bills/usage etceach time I try to reg