Can't create a .class file

Hello
I am glade to know this forum, I bet it is muche better than my instructor, any how ..
I am trying to do my first java program, the progam is working properly on netbeans 4.1 with jdk1.5.0, but when I go to the command prompt on windows XP it dose not work,
other programs work in the command prompt but mine dose not
what is good is that I know the problem, it is that I don't have the .class file I have the .java, and as I read it was supposed to be created automatically on neatbeans but unfortunatly it is not. can I creat it somehow ??!!
any sugestions ??

I did a google search and found this thread.
Just to keep information at finger tips etc.
I installed the recent JDK from JavaSun place for Windows (XP).
I could not compile a class file from a java file in Netbeans.
To compile a class file from a java file I needed to use javac.
Using cmd prompt (Command prompt) I could not use Javac (I forgot about PATH vars).
Right click my computer, properties in menu, advanced tab, Environment variables, Edit the path variable, add the directory c:\proram files\java\jdk????\bin\ (??? being the version of your jdk), then run cmd then javac works! (remembering of course to have ; seperator!)
ADDTIONAL INFO:
Should I set the PATH variable?
Set the PATH variable if you want to be able to conveniently run the JDK executables (javac.exe, java.exe, javadoc.exe, etc.) from any directory without having to type the full path of the command. If you don't set the PATH variable, you need to specify the full path to the executable every time you run it, such as:
C:> "\Program Files\Java\jdk1.6.0_<version>\bin\javac" MyClass.java
It's useful to set the PATH permanently so it will persist after rebooting.
How do I set the PATH permanently?
To set the PATH permanently, add the full path of the jdk1.6.0_<version>\bin directory to the PATH variable. Typically this full path looks something like C:\Program Files\Java\jdk1.6.0_<version>\bin. Set the PATH as follows, according to whether you are on Microsoft Windows NT or 98/2000/ME.
Message was edited by:
g000we

Similar Messages

  • Tomcat can't locate my class files

    Tomcat can't locat my class file for my javabeans in a jsp page.
    (Tomcat 4.1.24/windows XP)
    I have created inside of webapps a directory thesis and also the WEB-INF\classes and WEB-INF\lib. I don't know what should I put in web.xml so it is basically almost empty.
    this is the error I get where Searcher is my javabean:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: -1 in the jsp file: null
    Generated servlet error:
    [javac] Since fork is true, ignoring compiler setting.
    [javac] Compiling 1 source file
    [javac] Since fork is true, ignoring compiler setting.
    [javac] C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\thesis\search_jsp.java:89: cannot resolve symbol
    [javac] symbol : class Searcher
    [javac] location: class org.apache.jsp.search_jsp
    [javac] Searcher seek = null;
    [javac] ^
    [javac] C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\thesis\search_jsp.java:91: cannot resolve symbol
    [javac] symbol : class Searcher
    [javac] location: class org.apache.jsp.search_jsp
    [javac] seek = (Searcher) pageContext.getAttribute("seek", PageContext.PAGE_SCOPE);
    [javac] ^
    [javac] C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\thesis\search_jsp.java:94: cannot resolve symbol
    [javac] symbol : class Searcher
    [javac] location: class org.apache.jsp.search_jsp
    [javac] seek = (Searcher) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "Searcher");
    [javac] ^
    [javac] C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\thesis\search_jsp.java:111: cannot resolve symbol
    [javac] symbol : class Searcher
    [javac] location: class org.apache.jsp.search_jsp
    [javac] out.print(JspRuntimeLibrary.toString((((Searcher)pageContext.findAttribute("seek")).getAnalyze())));
    [javac] ^
    [javac] 4 errors
         at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
         at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:536)

    did you create the Searcher class? if so stick it in a package and put it under your web-inf directory. then use an <%@ page import="" %> statement to import the code.
    if you didn't create the class is it in some jar library you downloaded? if so stick the jar file in your web-inf/lib folder.
    -S-

  • How can I create a jar file

    Hello!
    How can a create a jar file?
    I want to run an application just clicking in a icon.
    How can I do this?
    Thanks a lot.
    K�tia.

    Get to the command prompt
    change directories to the directory where the main class resides.
    Open your text editor and type the following in it:
    Manifest-Version: 1.0
    Main-Class: NameOfMainClass //Just name without ".class"!!!
    Created-By: Your Name Here
    Save this file as whatever you want to name it with ".mf" as the extension.
    Then go back into the command prompt and type the following:
    jar cfm "NameOfJarFile".jar "NameOfManifestFile".mf *.class
    (without the quote marks of course)
    Hit "Enter"
    This will jar it up and make it executable.
    If you have any images associated with the program you can add them in the same way as above. Just add *.gif or *.jpg after the *.class portion.
    Good luck!
    LEEMAX I. T.

  • How can I hide the class file ??

    Hi !
    I has a question, when i write a program of Java, then use the command "javac" to compiler to class file for other people using, but the class file can be disassembled and convert to source code. How can I hide the class file and let people can not disassemble, or can not see the source code. Thinks

    See these....
    http://www.saffeine.com/
    http://www.jarsafe.com/
    I recently read this. This will help you.
    http://developer.java.sun.com/developer/qow/archive/160/index.jsp
    Enojy....
    Rajesh

  • How can I convert a class file to Exe file

    hai
    How can I convert a class file to Exe file

    Please search the forums before asking questions - this has been answered hundreds (really!) of times.

  • How can I create an Excel file?

    Hi,
    How can I create an Excel file using Forms 6i.
    What I'm doing is to create a file using TEXT_IO package an name it .XLS. If a read it double-clicking over the file, it opens Ok but If I open directly from Excel it opens the Convert dialog.
    I need to create an excel file as it was made from within Excel.
    Thank in advance,
    Benjamin

    When you are talking about subfiles, are you talking like Package contents of an application?
    Terminal application in Applications -> Utilities can give a command line grasp of all your files using the du command.
    Type
    man du
    when entering the terminal, followed by the enter key.
    Note, by default the terminal opens at the Home folder.   To navigate outside the Home folder enter "/Volumes/name of mounted drive/folder/subfolder" as your path.  If there are spaces in the name, putting quotes around the whole path can help.    If you end your du command with a > name.txt a text file with the name name.txt will be plugged into your Home directory.  That you can open with Excel and parse by /es thus giving you everything in Excel.

  • How can I Create a exe file were a tab control on it work`s

    I have a VI with many controls and indicators,these are spread on a tab control.This tab control works with out any problems but if i create a exe file then the tab control is fixed. How can I create a exe file so that the tab control on it work´s ?"
    Attachments:
    project7.1.jpg ‏129 KB

    Make the tab control a control and not an indicator. If you want to write
    to it you need to create a local variable.
    "Carlos-R." wrote in message
    news:[email protected]..
    I have a VI with many controls and indicators,these are spread on a
    tab control.This tab control works with out any problems but if i
    create a exe file then the tab control is fixed. How can I create a
    exe file so that the tab control on it work´s ?"

  • How can I create a exe file with a tab control on it that work´s ?

    I have a VI with many controls and indicators,these are spread on a tab control.This tab control works with out any problems but if i create a exe file then the tab control is fixed. How can I create a exe file so that the tab control on it work´s ?

    I have made a new Posting with the same question but this time I added a screenshot of the VI.
    Attachments:
    project7.1.jpg ‏129 KB

  • Can't create a .war file....

    Hi,
    I feel a little stupid but I can't create a .war file.
    I'm under the folder tuto which contains WEB-INF and index.html
    and I write this instruction on the command line:
    C:\tomcat\tuto>jar -cvfM ../tuto.war
    Unfortunately, it's not accepted.
    Can you help me please?
    Thanks in advance,
    Steevy.

    Hi,
    Thanks for your response.
    In fact, it doesn't change anything to remplace ../tuto.war by ..\tuto.war.
    I suppose the root cause isn't at this level because when I write just the following
    C:\tomcat\webapps\tuto>jar -cvf tuto.war
    I obtain exactly the same message:
    Usage: jar {ctxu}[vfm0M] [jar-file] [manifest-file] [-C
    Options:
    -c create new archive
    -t list table of contents for archive
    -x extract named (or all) files from archive
    -u update existing archive
    -v generate verbose output on standard output
    Best,
    Steevy.

  • Can I create private class in ABAP?

    Hi all,
    Can I create private class in ABAP? Please reply me its interview question.
    Thanks ,
    Vishal
    Moderator message : Interview type questions not allowed, read Forum Rules Of Engagement before posting.  Thread locked.
    Edited by: Vinod Kumar on Jan 16, 2012 12:20 PM

    Vishal , please read the rules of this forum.

  • How can we create the DBC file?

    Hi all,
    I am attempting to run the test_fwktutorial.jsp within the toolbox.jws/Tutorial.jpr project in Jdeveloper . We have to provide the Oracle application DB connection in the project properties ( we have to provide this as a DBC file) . How can we create the dbc file from the Database connection ? i tried to export the DB connection in Jdev , but it is getting exported to xml file rather than dbc file . Please help to fix this.

    Yes, you can do that.
    Put both the DBC files under dbc_files\secure folder.
    You can change the dbc files from project settings and point to the desired file.
    I am not sure, but maybe you need to stop JDevloper and start again for the new DBC file to take effect.

  • Can you create a .ics file from entries in a PDF?

    Hi,
    I'm wondering if anyone can help me: Can you create a .ics file from entries in PDF?
    Example:
    I'm wanting people to be able to choose a number of dates for some events within a PDF, then click a button that will then create a (or number of) .ics files so they can add those dates to the calendar of their choice. Is this possible?
    Thanks

    Using the solution supplied by Leonia, and cited by Keith, you can do the same thing (flopping the Curve profiles) in LightRoom. So, it makes sense. Though I didn't know know it worked for Color Negatives.
    A friend of mine with a Nikon Coolscan is going to scan nearly 150 B&W rolls of 35mm negatives for me, and I want to import them all into Aperture, naming and keywording as I go. The objective is, of course, to have the convenience of a diigtal library. But also to have some made into large prints for framing.

  • How can we call a class file of one package for class file of another

    How can we call a class file of one package from class file of another package and both packages exist in a same folder

    How can we call a class file of one package from
    class file of another package and both packages exist
    in a same folder
    Luckily they don't so it's really not a problem after all.

  • I created a class file , if i execute this class file it has to be always o

    i created a class file , if i execute this class file it has to be always on top if i open any other programms or applications then also this class file application has to show me on the screen top , i meas ti has to show me first and behind all applications which i opend other applications
    How to do this please help me
    bhaskar

    It sounds like you might be able to write a .bat script to run the application, create a desktop icon for that and set its properties so it runs in the background.

  • How can i create my own file from the Adobe Export PDF to Word ?

    How can I create my own file from the file of the Adobe Export PDF to Wodrd?

    If there is handwritten content in your PDF then ExportPDF can't convert that to word.
    ~Deepak

Maybe you are looking for