Cannot compile java file after ..

i installed java sdk 1.4
uninstalled java 1.2 & java 1.3.1
--after that i was not able to compile or run java file
reinstalled java 1.3.1 and 1.2
--now able to run previously compiled java file
--cannot compile a new java file
any help

It would be helpful if you would exactly tell us what error message you get instead of just saying "I can't compile or run anything anymore".
Things to think of: Did you add the bin directory of the JDK to your path? Is the classpath set correctly?
Installation notes
http://java.sun.com/j2se/1.4/install-windows.html
Setting the class path
http://java.sun.com/j2se/1.4/docs/tooldocs/win32/classpath.html
Java 2 SDK Readme
http://java.sun.com/j2se/1.4/README.html
Jesper

Similar Messages

  • Cannot compile Java files or create Java Project

    Hi,
    I cannot compile java files and also didn't see any option
    for creating java project using flex 2 builder.
    Actually am trying to create a FDS project with an option to
    compile on the server. I am using Weblogic 8.1 SP5 as my server.
    thank you
    sun

    hi
    this is may jvm.config file. Can anyone tell me if it is
    right because all the fields are blank.
    # VM configuration
    # Where to find JVM, if {java.home}/jre exists then that JVM
    is used
    # if not then it must be the path to the JRE itself
    # If no java.home is specified a VM is located by looking in
    these places in this
    # order:
    # 1) JAVA_HOME environment variables (same rules as java.home
    above)
    # 2) bin directory for java.dll (windows) or
    lib/<ARCH>/libjava.so (unix)
    # 3) ../jre
    # 4) registry (windows only)
    java.home=C:\Adobe\Flex Builder 2.0 Beta 3\Flex SDK 2.0\jre
    # Arguments to VM
    java.args=-ea -Xmx384m
    # Environment variables we care about, whitespace-separated
    env=
    # java.class.path - use this for adding individual jars or
    # directories. When directories are included they will be
    searched
    # for jars and zips and they will be added to the classpath
    (in
    # addition to the directory itself), the jar to be used in
    launching
    # will be appended to this classpath
    java.class.path=C:\Adobe\Flex Builder 2.0 Beta 3\Flex SDK
    2.0\jre
    # where to find shared libraries, again use commas to
    separate entries
    java.library.path=
    thanks
    sun

  • Cannot compile Java file

    I'm creating java file using package.javax.* but when i compile they say javax not found. I already try using jdk1.2.2 and jdk1.3.1. so any idea?

    There isn't any javax package. There are a lot of packages like javax.swing, javax.crypto, javax.naming.ldap, and so on. If you want to import a package you have to provide it's full name.

  • 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.

  • Java Mapping - Not able to compile .Java file

    Hi Experts,
    I am working with a sample scenario which involves Java Mapping. For this I created MappingClass.java file, After compiling the .Java file .Jar file would be used for Java Mapping by using Imported Archives.
    After compiling the MappingClass.java file, I am getting the errors as below.
    --> Java errors after compilation
    C:\j2sdk1.4.2_13\bin>javac MappingClass.java
    MappingClass.java:4: package com.sap.aii.mapping.api does not exist
    import com.sap.aii.mapping.api.AbstractTrace;
                                   ^
    MappingClass.java:5: package com.sap.aii.mapping.api does not exist
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    --> End of java errors
    In the MappingClass.java file, I had given followed imports.
    import java.util.*;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    Could some one please guide me to resolve this issue.
    Thanks in advance.
    ..Sree

    Hi
    I had copied " aii_map_api.jar " file in my Java Class path folder.. i.e " C:\j2sdk1.4.2_08\bin "     AND    " C:\j2sdk1.4.2_08\lib " folders too.. and even in C:\ i.e Root Drive also.
    After trying to Compile my java file (ex : MappingClass.java), still I am getting the errors.
    Errors shown as below.
    --> Errors
    C:\mytest>javac MappingClass.java
    MappingClass.java:2: package com.sap.aii.mapping.api does not exist
    import com.sap.aii.mapping.api.AbstractTrace;
                                   ^
    MappingClass.java:3: package com.sap.aii.mapping.api does not exist
    import com.sap.aii.mapping.api.StreamTransformationConstants;
                                   ^
    MappingClass.java:6: cannot resolve symbol
    symbol  : class AbstractTrace
    location: class MappingClass
        private static AbstractTrace trace = null;
                       ^
    MappingClass.java:12: cannot resolve symbol
    symbol  : class AbstractTrace
    location: class MappingClass
            trace = (AbstractTrace)inputparam.get(
                     ^
    MappingClass.java:13: cannot resolve symbol
    symbol  : variable StreamTransformationConstants
    location: class MappingClass
                       StreamTransformationConstants.MAPPING_TRACE );
                       ^
    5 errors
    --> End of Errors
    Could some one please guide me to resolve this issue.
    Thanks in advance.
    ..Sree

  • 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!!!!

  • Location of compiled java files

    Where are the compiled java files for jsps? Sometimes I get jsp errors in the log
    files like:
    D:\jsrv\my\WEB-INF\_tmp_war_myserver_myserver_my\jsp_servlet\_mypage\_cancelmembership.java:105:
    ')' expected
    However, the _cancelmembership.java file does not exist at that location. Only
    the _cancelmembership.class file exists at that location.

    You do NOT want to change the bundled CSS files. Create your own CSS and include it in the template after the built-in CSS include. Any classes you create in your own file of the same name and specificity as the built-in classes will override those classes. For example:<style type="text/css">
    td.myclass{color:red}
    td.myclass{color:blue}
    </style>The color of the text in a table cell with the class "myclass" will be blue, not red, since the same class was defined twice, it will use the one that came last on the page.
    If you change the classes in the built-in template CSS files, you'll change them for everyone using your APEX instance, which is not a particularly good thing to do.
    Tyler

  • Running a compiled java file

    Question: if a pc doesn't have the jre, how can it launch a compiled java file? For example, i create a program that calculates the expenses of a factory, i create the gui and i compile the file. Then i distribute my program. If a factory doesn't have jre, i suppose it can't launch the program...how can i do? can i create an exe file from java one?

    If the machine has a browser, it probably has a jre, but that is beside the point. No it cannot run without a jre. If there is not one, it must be installed.

  • 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;....

  • How to check the JDK version of a compiled java file

    can anybody tell me how to check the JDK version of a compiled java file ?
    Edited by: gbhatia8 on Sep 9, 2010 7:04 AM

    The major/minor version of the class file is the way to go.
    Also, it's not necessary to write a separate program to get to those. javap prints them out when being passed the -v flag.
    Note, however that "JDK version" is not a correct term, as I can create 1.4-compatible class files with a Java 6 JDK (by passing the -target flag to javac). Those won't look any different than .class files written with a 1.4 JDK.

  • Sccm 2012 r2 error setup cannot compile mof file tasksequenceprovider.mof

    Am getting this error during SCCM 2012 R2 installation on the same server which has SQL 2012 with SP1. "setup cannot compile mof file tasksequenceprovider.mof". Any help?

    Hi,
    The following blog introduced a tool scans winodws module which may help find out the missing file.
    http://blogs.technet.com/b/configurationmgr/archive/2010/01/05/the-configuration-manager-service-pack-install-guide.aspx

  • Cannot compile servlet file

    I cannot compile Servlet files on my WinXP environment.
    my servlet.jar file is located at
    c:\tomcat\jakarta-tomcat-3.3.1\common\lib\servlet.jar
    what shall I do?
    The error messages are only for servlet portion of code?

    In XP you can set the path by rightclicking on my computer - then go to environment vairables and edit the path but I cannot see any for classpath???
    What is the easist way yo use the class path?

  • Compiling java file in 11i

    I need to compile java file in CRM 11i .

    1003984 wrote:
    I need to compile java file in CRM 11i .Please see (HOW TO COMPILE JAVA FILES IN CRM APPLICATIONS [ID 468434.1]).
    Thanks,
    Hussein

  • Creating a .bat file to compile .java files

    Hi,
    I am trying to create a .bat file to compile java files. I have created the .bat in the same folder as teh .java file I am trying to compile. I know the path is set to the proper folder to find the compiler, but I keep getting an error saying the system can not find the specified file, or can not read fileName.java. Everything is spelled correctly, and I know it works because it will compile from the command prompt. Any suggestions?

    rather than including a sourcepath, just specify the full location. Using your example, this would read like
    javac "C:\Documents and Settings\Kevin\Desktop\School Stuff\AP Comp Sci\PowerPoints\Chapter 02\Executables\Section 2.2\Facts.java"Note that everything is inside the inverted commas " "
    I tried this on a hello world Java program inside a brief case and it works fine.
    The class file is created inside the briefcase.
    If you want to create a bat file to do this from anywhere, modify your batch file to look like this:
    c:\
    cd "C:\Documents and Settings\Kevin\Desktop\School Stuff\AP Comp Sci\PowerPoints\Chapter 02\Executables\Section 2.2"
    javac %1.java
    java %1Again, you would use this as follows
    mybat FactsDon't forget to leave out the .java extension.
    This will compile the java file and attempt to run it for you.
    If you don't want it to run, leave out the java%1
    If you create other java files in this same briefcase folder you can use mybat to compile them too.
    For example
    mybat Facts2

  • Cannot open powerpoint file after renaming it.

    Cannot open powerpoint file after I renamed it. I keep getting error messages -35 and -108. It says I have unknown access to the file now. What can I do?

    As a cross-reference:
    Eric Root
    Re: Hi! I have a problem with finder 
    01.03.2014 12:14 (in response to Fexei)
    Go to Finder and select your user/home folder. With that Finder window as the front window, either select Finder/View/Show View options or go command - J.  When the View options opens, check ’Show Library Folder’. That should make your user library folder visible in your user/home folder.  Select Preferences/com.apple.finder.plist. Move the .plist to your desktop.
    Re-launch Finder by logging out/in and test. If it works okay, delete the plist from the desktop.
    If the same, return the .plist to where you got it  from, overwriting the newer ones.
    Thanks to leonie for some information contained in this.
    You might need to redo the View settings after an update.
    Resolved the Problem! Thanks to Eric and Leonie
    Felix

Maybe you are looking for