Javac

I would like to be able to compile java programs on my laptop, but I can't get it to work. I have Windows XP running on an HP Pavilion laptop.
So far I've uninstalled everything related to Java and reinstalled it so that I have the Java SE Development Kit 6 and the Java SE Runtime Environment 6 fresh on my computer. The "java" command works from the command line, but "javac" is unrecognized. Is there something else that I need to download and install in order to be able to compile from the command line?

This sounds like exactly the same problem as a couple of posts down - link nicked from there.
http://java.sun.com/docs/books/tutorial/getStarted/problems/index.html

Similar Messages

  • Javac(1.4.2) gives error in import statement

    Hi All,
    I am facing a surprising problem. I have 2 java class files. I write the import statement for second one in the first one. There is no package & these are in the same directory. I have compiled the second one. But when I try to compile the First one. Javac throws error at import statement like below :
    D:\Clubs\oct\6>javac -d . ManojTest.java
    ManojTest.java:1: '.' expected
    import SessionBean;
    ^
    1 error
    My Java Files are as below :
    import SessionBean;
    public class ManojTest
         public static void main(String args[])
    //ManojTest.java
    public class SessionBean
         public static void main(String args[])
    //SessionBean.java
    I have compiled SessionBean.java successfully but when I try to compile ManojTest.java I get error mentioned above.
    However this probelm comes when I use j2se 1.4.2.. but works in j2se 1.3.1..
    Another way could be I use package structure.
    But I can't do any of these, as I have to port my big project to j2se1.4.2.. from j2se1.3.1.. (Live project is running on Tomcat).
    Problems is similar in Unix & Windows both.
    Is this javac compiler issue or there is some setting which I can make.
    I have already included . (dot) in PATH & CLASSPATH environment varibales.
    Please help me out if there is any way around this, as i am stuck up in between
    thank you
    Manoj :confused:

    Use a package and then add that package in your classpathOr don't use a package, leave the file in the default (noname) package, and don't use the import statement. Java will find it in the default package without the import.
    Explicit import statements from the default package are no longer allowed

  • JDev 10.1.3 and JDK1.2.2 use javac problem

    I have an old application that I need to compile in 1.2.2, and have tried the "use javac" checkbox on the project properties compile page. The compiler seems to run, but there is an intential error in the code. I put it there, because the class file didn't seem to get generated. I tried this on command line, and apparently '-source' is an invalid option in 1.2.2.
    E:\jdk1.2.2\bin\javac.exe -J-mx512m -verbose -source 1.2 -target 1.2 -encoding Cp1252 -g -classpath E:\jdk1.2.2\jre\lib\rt.jar;E:\jdk1.2.2\jre\lib\i18n.jar;E:\jdk1.2.2\jre\classes;E:\app\codebase;E:\oracle\jdev1013\j2ee\home\lib\ojsp.jar;E:\oracle\jdev1013\j2ee\home\jsp\lib\taglib\ojsputil.jar;E:\oracle\jdev1013\j2ee\home\oc4j.jar;E:\oracle\jdev1013\j2ee\home\lib\oc4j-internal.jar;E:\oracle\jdev1013\j2ee\home\lib\servlet.jar;E:\oracle\jdev1013\jdev\lib\ojc.jar -sourcepath E:\app\src -d E:\PTC\Windchill\codebase @C:\DOCUME~1\gteft\LOCALS~1\Temp\javac30279.tmp
    [1:53:55 PM] Successful compilation: 0 errors, 0 warnings.
    Has anyone else run into this?
    Any help or thoughts on how to adjust this behavior for 1.2.2's javac would be appreciated.

    Thank you for responding. I am aware of (and frustrated by) issues and limitations due to this application's dependancies on an aging platform, and would upgrade if it were my choice. The dependancy is in the vendor's API, and not in code that I can change.
    As the invalid option was not captured as a message or counted as an error, I thought that perhaps this could be a potential issue for using javac with any version.
    I was hoping to see if there were additional settings controlling the command line options that I couldn't find.
    Thanks,
    Greg

  • Com.sun.tools.javac.Main: method compile errors

    I had a working web project the other day, and something happened that caused every page to start throwing this error:
    # javax.servlet.ServletException: com.sun.tools.javac.Main: method compile([Ljava/lang/String;Ljava/io/PrintWriter;)I not found
    # at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:779)
    # at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    # at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    # at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    # at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    # at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    # at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    # at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    # at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    # at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:978)
    # at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
    # at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
    # at com.mayco.mvc.MVCServlet.processRequest(MVCServlet.java:426)
    # at com.mayco.ldap.MayServlet.service(MayServlet.java:415)
    # at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    # at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    # at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    # at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    # at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    # at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    # at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    # at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76)
    # at com.mayco.cy.filter.AuthenticateFilter.doFilter(AuthenticateFilter.java:167)
    # at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132)
    # at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71)
    # at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
    # at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
    # at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
    # at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
    # at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
    # at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    # at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
    # at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    # at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    # at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
    # at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
    # at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
    I tried setting up a clean environment (server, EAR, web project), but haven't been able to re-solve the problem I had with the original project yet.  If I could get a starting point to look for how to solve this type of error it would be greatly appreciated!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I checked my JDK compliance (1.4) and the installed JREs (Standard VM; WebSphere v5.1 EE JRE; C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51_stub\java\jre)
    I did notice that it was using the JRE System LIbrary [WebSphere v5.1 JRE] and I changed it to the WebSphere v5.1 EE JRE like I think it should have been...
    and the web server startup begins with:
    *** Starting the server ***
    ************ Start Display Current Environment ************
    WebSphere Platform 5.1 [BASE 5.1.0.3 cf30412.02] [JDK 1.4.1 b0344.02] running with process name localhost\localhost\server1 and process id 2692
    Host Operating System is Windows XP, version 5.1
    Java version = J2RE 1.4.1 IBM Windows 32 build cn1411-20031011 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM
    was.install.root = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51
    user.install.root = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51
    Java Home = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51\java\jre
    ws.ext.dirs = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/java/lib;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/classes;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/classes;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib/ext;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/web/help;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime;C:/Program Files/IBM/SQLLIB/java/db2java.zip;C:/Program Files/IBM/WebSphere Studio/Application Developer/v5.1.2/wstools/eclipse/plugins/com.ibm.etools.webservice_5.1.2/runtime/worf.jar
    Classpath = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/properties;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/properties;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib/bootstrap.jar;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib/j2ee.jar;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib/lmproxy.jar;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/lib/urlprotocols.jar;C:\WebSphere\properties;C:\spi4j2.5.4_J2ee1.4\clientLib\XEES.jar;C:\spi4j2.5.4_J2ee1.4\clientLib\bcprov-jdk14-139.jar;C:\spi4j2.5.4_J2ee1.4\clientLib\config.jar;C:\spi4j2.5.4_J2ee1.4\clientLib\spi4jStub_2.5.4.jar;C:\spi4j2.5.4_J2ee1.4\clientLib\XEES100J.jar;C:\spi4j2.5.4_J2ee1.4\clientLib\XEES110J.jar;C:\spi4j2.5.4_J2ee1.4\clientLib\XEES120J.jar;C:\spi4j2.5.4_J2ee1.4\clientLib\XEES200J.jar;C:\spi4j2.5.4_J2ee1.4\clientLib\XTCP211.jar;C:\spi4j2.5.4_J2ee1.4\Demo\log4j-1.2.8.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\spi4jCore_2.5.4.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\axis-1.1.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\xmlParserAPIs-2_2_1.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\jaxrpc.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\wsdl4j.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\fsgWsif1.1.jar;C:\spi4j2.5.4_J2ee1.4\Demo\commons-logging.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\tools.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\commons-pool-1.2.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\saaj.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\commons-beanutils-core.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\commons-collections-3.1.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\commons-discovery.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\commons-lang-2.1.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\connector.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\FEDRWSCHECKSTATUSAxisInfo.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\fscontext.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\IFSClassLoader1.2.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\j2ee1.4.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\jca.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\jta.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\mail.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\providerutil.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\qname.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\soaprmi-1_1.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\xalan.jar;C:\spi4j2.5.4_J2ee1.4\coreLib\xercesImpl-2_2_1.jar;C:/Program Files/IBM/WebSphere Studio/Application Developer/v5.1.2/wstools/eclipse/plugins/com.ibm.etools.websphere.tools.common_5.1.1.1/runtime/wteServers.jar;C:/Program Files/IBM/WebSphere Studio/Application Developer/v5.1.2/wstools/eclipse/plugins/com.ibm.etools.websphere.tools.common_5.1.1.1/runtime/wasToolsCommon.jar
    Java Library path = C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/bin;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/java/bin;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\runtimes\base_v51/java/jre/bin;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\eclipse\jre\bin;.;C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1.2\eclipse\jre\bin;C:\oracle\product\10.2.0\client_2\bin;C:\oracle\product\10.2.0\client_1\bin;Y:\oracle\ora92\BIN;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\PROGRA~1\CA\SHARED~1\SCANEN~1;C:\PROGRA~1\CA\ETRUST~1;C:\PROGRA~1\IBM\SQLLIB\BIN;C:\PROGRA~1\IBM\SQLLIB\FUNCTION;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\Rational\common;C:\Program Files\Rational\ClearCase\bin;C:\Program Files\IBM\SDP70\jdk\bin
    ************* End Display Current Environment *************

  • I'm new to Java and can't get javac command working

    Ok first of all hello ( i'm new to the forum ), second i'm reading a book about Java and im trying to compile a sample code from the book, but javac command gained life and it's against me. So the book i'm reading is Sams Teach Yourself Java in 21 Days (YAY), and the code i want to compile is an application that works with another bit of code that mimics what a robot could do inside a volcano. So the Volcano program code is the following ( i'll post the robot code at the end of the post):
    1: class VolcanoApp {
    2: public static void main(String[] arguments) {
    3: VolcanoRobot dante = new VolcanoRobot();
    4: dante.status = ?exploring?;
    5: dante.speed = 2;
    6: dante.temperature = 510;
    7:
    8: dante.showAttributes();
    9: System.out.println(?Increasing speed to 3.?);
    10: dante.speed = 3;
    11: dante.showAttributes();
    12: System.out.println(?Changing temperature to 670.?);
    13: dante.temperature = 670;
    14: dante.showAttributes();
    15: System.out.println(?Checking the temperature.?);
    16: dante.checkTemperature();
    17: dante.showAttributes();
    18: }
    19: }
    Ignore the numbers they are used for explaining stuff in the book, and i din't copy the indentation.
    So what i do is that i creat a file with notepad ( no fancy stuff only plain old notepad ) and i copy this code, remove the numbers and make the indents.
    After that i save as .txt file with the apropriate name ( i know it's case sensitive ). After that i open command prompt and write:
    javac VolcanoApp.java
    And it tells me that "javac is not recognized as an internal or external command operable program or batch file".
    I managed to solve that by going to the control panel and by adding to the system variables for my user in the path variable this :
    ;C:\JAVAJDK\bin
    ( C:\JAVAJDK is where JDK is installed)
    And then i modified the system variables like this:
    In the CLASSPATH i entered this .;%JAVA_HOME%\lib\tools.jar
    In JAVA_HOME i entered this C:\JAVAJDK
    Setting the variables like this made the javac error go away but now when i write in command line
    javac VolcanoApp.java
    It gives me this error
    javac: file not found : VolcanoApp.java
    Usage: javac options source files
    use -help for a list of possible options
    And then i read that i can drop my java file directly in the javac file. So i did.
    When i drop my VolcanoApp.java in the javac file it open a command line window and writes a bunch of stuff in like a milisecond and shuts down. And no file is created.
    I wanted to know what was writen in that window so i did it again and took a print screen and pasted it on paint ( it writed so much text that i only got a little bit but enough to see what hapend)
    I read it and in the print screen it said it had 15 errors ( so far ) and then it point the errors with little arrows and there were characters that weren't present in the original code.
    What hapend the compiler added wierd letters?
    SO, my real question is, how the heck do i get javac working and compiling stuff properly?
    Plz help i'm getting mad at this! ; (
    And the code for the "robot":
    1: class VolcanoRobot {
    2: String status;
    3: int speed;
    4: float temperature;
    5:
    6: void checkTemperature() {
    7: if (temperature > 660) {
    8: status = ?returning home?;
    9: speed = 5;
    10: }
    11: }
    12:
    13: void showAttributes() {
    14: System.out.println(?Status: ? + status);
    15: System.out.println(?Speed: ? + speed);
    16: System.out.println(?Temperature: ? + temperature);
    17: }
    18: }
    Again no indents and ignore the numbers. In the book it only said to compile the VolcanoApp.java , and not the VolcanoRobot.java
    Edit:
    I'm using Windows Vista Home Premium 32 bit.
    Edited by: BBlop on Dec 13, 2009 11:29 AM

    guess what it says java file. So yes i'm sure. Sarcasm. Not the best way to encourage a total stranger to help you. Then there's
    Sorry if i wasn't more clear but was that response needed?No it wasn't needed, but I'm not the one asking for help so I have the luxury of not worrying too much about it. It's extremely frustrating trying to drag relevant information out of someone, and makes one less inclined to bother.
    Anyways, there's still nothing in this thread that actually explicitly says "there is a file called VolcanoApp.java in the directory where I'm running javac from" and I really can't be bothered banging my head against the wall any longer. You've made a silly mistake, or a false assumption. We all do it from time to time. My advice is, take a break, go for a walk and re-visit this in a while. You'll probably spot the mistake right away.

  • I cann't execute javac with parameters. please help !!

    Hi All!!
    I can't understand how to execute application or bat file (javac.exe for example) WITH parameters correctly.
    I can execute javac.exe or bat file - WITHOUT parameters :
    Process p = Runtime.getRuntime().exec(WIN_PATH + " " + WIN_FLAG + " " + "javac.exe");
    But I can't execute correctly the command like:
    "javac.exe -classpath C:\Alex; Test.java"
    I tried to use exec(str,env[]) and exec(cmd[]) methods, but there were different errors as a result :(((
    How can I execute the command "javac.exe -classpath C:\Alex; Test.java" ? Is it possible?
    Please help me by a good idea.
    Thank you.

    right you are! That's why we use "\\" instead "\" :)
    If i try to execute this command -
    cmd=WIN_PATH + " " + WIN_FLAG + " " + "c:/j2sdk1.4.0/deleteMe/javac.exe -classpath C:/WORK/jboss-3.0.3/client/jboss-j2ee.jar;S:/Alexander/jars/sys.jar;S:/Alexander/jars/ejb_conf_dev.jar;S:/Alexander/jars/; C:/j2sdk1.4.0/deleteMe/aaBean.java";
    my OS Windows 2000 returns na error - "Error opening icon..."
    What's wrong?
    Thank you...

  • Path not working in win xp pro, can call java but not javac !

    Hello,
    I just upgraded to win xp and set up the J2SDK. I have set the path variable in the environment settings.
    when I tried to test this by typing java from my documents directory it works all right but not the javac command, to which it gives the error
    "'javac' is not recognized as an internal or external command,
    operable program or batch file."
    when I type path then I get the following result -
    PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\FSC\PCOBOL32;C:\Program Files\FSC\PCOBOL32;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;c:\borland\bcc55\bin; c:\jdk1.4.0_01\bin;C:\FSC\PCOBOL32;C:\PROGRAM\PCOBOL32 , so my path settings are correct.
    Why is this happening? Thanks for any help.
    - rdg
    P.S. I also am also unable to invoke the c++ compiler from my documents, so I think this may be a problem with my path, but then how am i able to call the java.exe ?

    -----BEGIN PGP SIGNED MESSAGE-----
    In win xp you must type the name of the directory as Dos-8 format,
    for example, if you want to use c:\J2sdk1.4.0_01 you must write in
    the path c:\j2sdk1~1.0_0
    -----BEGIN PGP SIGNATURE-----
    Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
    iQEVAwUBPWL6quIx3Zm+mBoJAQFhVwf/dM2pfQYN5Wp5AnmD+HV1Nx+5MSm1zmUs
    b3UPC8xJt0JhJItyims6YLEJKAv+Mrm0sk3fVyfg1o4Tcpw0bzG/RsVdsTsrmlDu
    vUlqWrxgTRH85IAjro83lGNuLUo6PKs10hVj4h4tqL8BkLE4pCkZfLT2tpG7VLt0
    YylUFx6DZQzF1HVK9+6MqYOvBEjxLhkNRHThNysUJj6SBkNHKDbDgnOcUQf+8PpZ
    RxItuKGUys6FdLSvrxonbj2qbHJ34Ewb/a8DL1MXcCOtP2QGIta4ozq/3SVPDAK4
    BD/NG97FsuYbL/l18Je4EzXRWqtG9IlIY8WBhbdx8X3B3fpuq8gICw==
    =UJDG
    -----END PGP SIGNATURE-----

  • How to make netbeans compile files as javac cmd??

    hi all...
    I have a problem running my java code from netbeans, I use netbeans 6.7 with jdk 1.6.0_16 on windows XP
    when i compile the java file in netbeans and then run it, i get an exception but if i compile the same java file using the javac from cmd then run it, everything is perfect without any error.... so i think the problem is from the compiler in my netbeans,
    I want to make the netbeans compiles the java files exactely as javac CMD, and produce the same .class files... how can i do this?
    thank you...

    You should post the error message. Maybe someone can then give you some guidance.

  • Using Runtime exec() to open and close process like java or javac

    Hi, I m a student who is learning IT and is wondering if
    Runtime exec() can run and stop commands like java and javac?
    Can someone post the code to do so here?Thank you

    Well, Here is my complete code:
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    class StreamGobbler extends Thread
    InputStream is;
    String type;
    StreamGobbler(InputStream is, String type)
    this.is = is;
    this.type = type;
    public void run()
    try
    InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line=null;
    while ( (line = br.readLine()) != null)
    System.out.println(type + ">" + line);
    } catch (IOException ioe)
    ioe.printStackTrace();
    class Program implements Runnable
         Process proc;
    String args[];
         String[] cmd = new String[4];
         boolean isGone=false;
         public Program(String args[])
              this.args=args;
         public void run()
              if (isGone==true)
                   try
                        Runtime.getRuntime().exec(cmd).destroy();
                   catch(IOException e)
                        System.out.println("Error: "+e.toString());
                   System.out.println("User abort");
         public void start(String args[])
              if (args.length < 1)
    System.out.println("USAGE: java GoodWindowsExec <cmd>");
    System.exit(1);
    try
    String osName = System.getProperty("os.name" );
    if( osName.equals( "Windows NT" ) )
    cmd[0] = "cmd.exe" ;
    cmd[1] = "/C" ;
    cmd[3] = args[0];
    else if( osName.equals( "Windows 95" ) ||osName.equals( "Windows 98" ))
    cmd[0] = "command.com" ;
    cmd[1] = "/C" ;
    cmd[2] = args[0];
                        cmd[3]=args[1];
    Runtime rt = Runtime.getRuntime();
    // System.out.println("Execing " + cmd[0] + " " + cmd[1]
    // + " " + cmd[2]+" "+args[1]);                                    
    proc = rt.exec(cmd);
    // any error message?
    StreamGobbler errorGobbler = new
    StreamGobbler(proc.getErrorStream(), "ERROR");
    // any output?
    StreamGobbler outputGobbler = new
    StreamGobbler(proc.getInputStream(), "OUTPUT");
    // kick them off
    errorGobbler.start();
    outputGobbler.start();
    // any error???
    // int exitVal = proc.waitFor();
    //System.out.println("ExitValue: " + exitVal);
    } catch (Throwable t)
    t.printStackTrace();
         public void destroy()
              isGone=true;
    class test1 implements ActionListener
         String s[]={"c:\\jdk1.3\\bin\\java.exe","ContactProcessor1"};
         GUI g=new GUI();
              Program p=new Program(s);
         public test1()
              //didnt work
              g.getStart().addActionListener(this);
              g.getStop().addActionListener(this);
              g.show();
         public void actionPerformed(ActionEvent e)
              if (e.getSource()==g.getStart())
                   p.start(s);
                   p.run();
              if (e.getSource()==g.getStop())
                   p.destroy();
                   p.run();
         public static void main(String args[])
              test1 t = new test1();
    class GUI extends JFrame
         JButton start;
         JButton stop;
         public GUI()
              super();
              getContentPane().setLayout(new FlowLayout());
              start=new JButton("start");
              stop=new JButton("stop");
              getContentPane().add(start);
              getContentPane().add(stop);
              setSize(100,100);
         public JButton getStart()
              return start;
         public JButton getStop()
              return stop;
    }

  • How can you detect (from a script file) that javac found problems?

    The subject line says it all, but the background is:
    I have a script file (.bat, since am stuck on windoze for the moment) which is doing some compilation using javac.
    I would like to skip all subsequent activities in the script file after the call to javac if any file failed to compile.
    So, what can I use as a signal from javac that it found a problem?
    I initially tried detecting an exit code from javac that was non zero, but javac does not seem to emit such an exit coe when it objects to a file (it still returns with 0 as an exit code).
    The only remaining strategy that I can think of is to pipe javac's output to a file, and if there is any content in it then assume that it indicates an error and use that as a signal.
    This is suboptimal because it will give false signals for mere warnings, so if anyone has a better suggestion, please post

    You are right: it appears that javac does exit with an exit code of 1 if an error is detected in one of the files being compiled, at least on the windows jdk.
    To prove this, create an arbitrary java source file called HelloWorld.java, and create a msdos .bat file in the same directory that looks like
    @echo on
    javac  -Xlint:deprecation  HelloWorld.java
    :handleError
    @if not errorlevel 1 goto finalActions
    @echo ERROR DETECTED: compile.bat will TERMINATE PREMATURELY
    :finalActions
    @echo compile.bat now terminatedBy playing around with what you put in the source file (totally clean code, stuff that should compile but issue a warning, and garbage that should not compile) as well as with the exit code value detected by the .bat file, for instance trying
    @if not errorlevel 2 goto finalActions(see http://www.robvanderwoude.com/errorlevel.html if you need some documentation on error codes in dos bat files), I have determined the following as javac's behavior on windows:
    If code is pristine, exit code = 0.
    If code causes javac to emit a warning but is compilable, exit code = 0.
    If code cannot be compiled, exit code = 1.

  • How can i run javac command in a Servlet?

    I wanna use javac command in a Servlet ,
    but it can not load the tomcat's lib.
    What can i do?

    Try out. But Iam not sure.
    Runtime.getRuntime("Cmd.Exe"). This wiil open the dos prompt.
    Create ouput stream and write in to it.Try to execute key.
    To invoke the enter key , use ascii value of the enter key

  • Need help: Unable to handle kernel paging request at virtual address; javac

    Hi
    we're working with apache tomcat under linux mandrake 10. (x86)
    when our webapp get recompiled the server stop responding
    (web server, telnet, etc... are down, but the server is pingable)
    after a hard reboot , we get this message in var/log/messages :
    Unable to handle kernel paging request at virtual address 02000064
    kernel: printing eip:
    kernel: c018e379
    kernel: *pde = 00000000
    kernel: Oops: 0000 [#1]
    kernel: CPU: 1
    kernel: EIP: 0060:[proc_pid_stat+137/928] Not tainted VLI
    kernel: EIP: 0060:[<c018e379>] Not tainted VLI
    kernel: EFLAGS: 00010286
    kernel: EIP is at proc_pid_stat+0x89/0x3a0
    kernel: eax: 00000000 ebx: 02000000 ecx: d85ac000 edx: 92960700
    kernel: esi: d11ea6f0 edi: ded440a0 ebp: cf0ddf44 esp: cf0ddee4
    kernel: ds: 007b es: 007b ss: 0068
    kernel: Process javac (pid: 2415, threadinfo=cf0dc000 task=d11ea6f0)
    kernel: Stack: c0143d5a c1259e78 00000000 c1259e78 c0343980 0000015b 00000000 cf0ddf40
    attached ther is kernel messages, pci , dmesg.
    Thanks
    Massimo TRENTO
    Apache Tomcat/4.1.30
    j2sdk1.4.2_01
    kernel 2.6.3-7mdksmp #1 SMP
    --- DMESG ---
    00100000 - 000000001f6f0000 (usable)
    BIOS-e820: 000000001f6f0000 - 000000001f6fb000 (ACPI data)
    BIOS-e820: 000000001f6fb000 - 000000001f700000 (ACPI NVS)
    BIOS-e820: 000000001f700000 - 000000001f780000 (usable)
    BIOS-e820: 000000001f780000 - 0000000020000000 (reserved)
    BIOS-e820: 00000000fec00000 - 00000000fed00400 (reserved)
    BIOS-e820: 00000000fee00000 - 00000000fef00000 (reserved)
    BIOS-e820: 00000000ffb80000 - 00000000ffc00000 (reserved)
    BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved)
    503MB LOWMEM available.
    found SMP MP-table at 000f7920
    hm, page 000f7000 reserved twice.
    hm, page 000f8000 reserved twice.
    hm, page 0009f000 reserved twice.
    hm, page 000a0000 reserved twice.
    On node 0 totalpages: 128896
    DMA zone: 4096 pages, LIFO batch:1
    Normal zone: 124800 pages, LIFO batch:16
    HighMem zone: 0 pages, LIFO batch:1
    DMI present.
    ACPI: RSDP (v000 PTLTD ) @ 0x000f7980
    ACPI: RSDT (v001 PTLTD RSDT 0x00050000 LTP 0x00000000) @ 0x1f6f74ed
    ACPI: FADT (v001 FSC D156x 0x00050000 0x000f4240) @ 0x1f6f751d
    ACPI: MADT (v001 FSC      APIC 0x00050000 CSF 0x00000000) @ 0x1f6faf76
    ACPI: BOOT (v001 PTLTD $SBFTBL$ 0x00050000 LTP 0x00000001) @ 0x1f6fafd8
    ACPI: DSDT (v001 FSC D156x 0x00050000 MSFT 0x0100000e) @ 0x00000000
    ACPI: PM-Timer IO Port: 0xf008
    ACPI: Local APIC address 0xfee00000
    ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
    Processor #0 15:2 APIC version 20
    ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
    Processor #1 15:2 APIC version 20
    ACPI: LAPIC_NMI (acpi_id[0xff] high edge lint[0x1])
    Using ACPI for processor (LAPIC) configuration information
    Intel MultiProcessor Specification v1.1
    Virtual Wire compatibility mode.
    OEM ID: Product ID: APIC at: 0xFEE00000
    I/O APIC #2 Version 32 at 0xFEC00000.
    Enabling APIC mode: Flat. Using 1 I/O APICs
    Processors: 2
    Built 1 zonelists
    Kernel command line: auto BOOT_IMAGE=linux-nonfb ro root=301 noapic devfs=mount acpi=ht resume=/dev/hda5
    Initializing CPU#0
    PID hash table entries: 2048 (order 11: 16384 bytes)
    Detected 2793.223 MHz processor.
    Using pmtmr for high-res timesource
    Console: colour VGA+ 80x25
    Memory: 504916k/515584k available (1920k kernel code, 9820k reserved, 892k data, 288k init, 0k highmem)
    Checking if this processor honours the WP bit even in supervisor mode... Ok.
    Calibrating delay loop... 5537.79 BogoMIPS
    Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
    Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
    checking if image is initramfs...it isn't (no cpio magic); looks like an initrd
    Freeing initrd memory: 225k freed
    CPU: After generic identify, caps: bfebfbff 00000000 00000000 00000000
    CPU: After vendor identify, caps: bfebfbff 00000000 00000000 00000000
    CPU: Trace cache: 12K uops, L1 D cache: 8K
    CPU: L2 cache: 512K
    CPU: Physical Processor ID: 0
    CPU: After all inits, caps: bfebfbff 00000000 00000000 00000080
    Intel machine check architecture supported.
    Intel machine check reporting enabled on CPU#0.
    CPU#0: Intel P4/Xeon Extended MCE MSRs (12) available
    CPU#0: Thermal monitoring enabled
    Enabling fast FPU save and restore... done.
    Enabling unmasked SIMD FPU exception support... done.
    Checking 'hlt' instruction... OK.
    POSIX conformance testing by UNIFIX
    CPU0: Intel(R) Pentium(R) 4 CPU 2.80GHz stepping 09
    per-CPU timeslice cutoff: 1462.56 usecs.
    task migration cache decay timeout: 2 msecs.
    enabled ExtINT on CPU#0
    ESR value before enabling vector: 00000000
    ESR value after enabling vector: 00000000
    Booting processor 1/1 eip 3000
    Initializing CPU#1
    masked ExtINT on CPU#1
    ESR value before enabling vector: 00000000
    ESR value after enabling vector: 00000000
    Calibrating delay loop... 5570.56 BogoMIPS
    CPU: After generic identify, caps: bfebfbff 00000000 00000000 00000000
    CPU: After vendor identify, caps: bfebfbff 00000000 00000000 00000000
    CPU: Trace cache: 12K uops, L1 D cache: 8K
    CPU: L2 cache: 512K
    CPU: Physical Processor ID: 0
    CPU: After all inits, caps: bfebfbff 00000000 00000000 00000080
    Intel machine check architecture supported.
    Intel machine check reporting enabled on CPU#1.
    CPU#1: Intel P4/Xeon Extended MCE MSRs (12) available
    CPU#1: Thermal monitoring enabled
    CPU1: Intel(R) Pentium(R) 4 CPU 2.80GHz stepping 09
    Total of 2 processors activated (11108.35 BogoMIPS).
    cpu_sibling_map[0] = 1
    cpu_sibling_map[1] = 0
    Using local APIC timer interrupts.
    calibrating APIC timer ...
    ..... CPU clock speed is 2792.0645 MHz.
    ..... host bus clock speed is 199.0474 MHz.
    checking TSC synchronization across 2 CPUs: passed.
    Starting migration thread for cpu 0
    Starting migration thread for cpu 1
    Brought up 1 CPUs
    NET: Registered protocol family 16
    EISA bus registered
    PCI: PCI BIOS revision 2.10 entry at 0xfd8cb, last bus=3
    PCI: Using configuration type 1
    mtrr: v2.0 (20020519)
    ACPI: Subsystem revision 20040211
    ACPI: Interpreter disabled.
    Linux Plug and Play Support v0.97 (c) Adam Belay
    PnPBIOS: Disabled
    PCI: Probing PCI hardware
    PCI: Probing PCI hardware (bus 00)
    PCI: Ignoring BAR0-3 of IDE controller 0000:00:1f.1
    Transparent bridge - 0000:00:1e.0
    PCI: Discovered primary peer bus 01 [IRQ]
    PCI: Using IRQ router PIIX/ICH [8086/24d0] at 0000:00:1f.0
    PCI: IRQ 0 for device 0000:00:1f.1 doesn't match PIRQ mask - try pci=usepirqmask
    PCI: Found IRQ 10 for device 0000:00:1f.1
    PCI: Sharing IRQ 10 with 0000:00:1d.2
    PCI: Sharing IRQ 10 with 0000:00:1f.2
    PCI: Sharing IRQ 10 with 0000:02:01.0
    SBF: Simple Boot Flag extension found and enabled.
    SBF: Setting boot flags 0x1
    apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16ac)
    apm: disabled - APM is not SMP safe.
    Starting balanced_irq
    ikconfig 0.7 with /proc/config*
    VFS: Disk quotas dquot_6.5.1
    devfs: 2004-01-31 Richard Gooch ([email protected])
    devfs: boot_options: 0x1
    Initializing Cryptographic API
    isapnp: Scanning for PnP cards...
    isapnp: No Plug & Play device found
    pty: 1024 Unix98 ptys configured
    Serial: 8250/16550 driver $Revision: 1.90 $ 8 ports, IRQ sharing enabled
    ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
    ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
    RAMDISK driver initialized: 16 RAM disks of 32000K size 1024 blocksize
    Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
    ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
    ICH5: IDE controller at PCI slot 0000:00:1f.1
    PCI: Found IRQ 10 for device 0000:00:1f.1
    PCI: Sharing IRQ 10 with 0000:00:1d.2
    PCI: Sharing IRQ 10 with 0000:00:1f.2
    PCI: Sharing IRQ 10 with 0000:02:01.0
    ICH5: chipset revision 2
    ICH5: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0x3000-0x3007, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0x3008-0x300f, BIOS settings: hdc:DMA, hdd:pio
    hda: WDC WD800LB-07DNA2, ATA DISK drive
    Using anticipatory io scheduler
    ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
    hdc: LITE-ON COMBO LTC-48161H, ATAPI CD/DVD-ROM drive
    ide1 at 0x170-0x177,0x376 on irq 15
    ICH5-SATA: IDE controller at PCI slot 0000:00:1f.2
    PCI: Found IRQ 10 for device 0000:00:1f.2
    PCI: Sharing IRQ 10 with 0000:00:1d.2
    PCI: Sharing IRQ 10 with 0000:00:1f.1
    PCI: Sharing IRQ 10 with 0000:02:01.0
    ICH5-SATA: chipset revision 2
    ICH5-SATA: 100% native mode on irq 10
    ide2: BM-DMA at 0x3010-0x3017, BIOS settings: hde:pio, hdf:pio
    ide3: BM-DMA at 0x3018-0x301f, BIOS settings: hdg:pio, hdh:pio
    hda: max request size: 1024KiB
    hda: 156301488 sectors (80026 MB) w/2048KiB Cache, CHS=16383/255/63, UDMA(100)
    /dev/ide/host0/bus0/target0/lun0: p1 p2 < p5 p6 >
    mice: PS/2 mouse device common for all mice
    serio: i8042 AUX port at 0x60,0x64 irq 12
    input: ImPS/2 Generic Wheel Mouse on isa0060/serio1
    serio: i8042 KBD port at 0x60,0x64 irq 1
    input: AT Translated Set 2 keyboard on isa0060/serio0
    md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
    EISA: Probing bus 0 at eisa0
    NET: Registered protocol family 2
    IP: routing cache hash table of 4096 buckets, 32Kbytes
    TCP: Hash tables configured (established 32768 bind 32768)
    NET: Registered protocol family 1
    BIOS EDD facility v0.13 2004-Mar-09, 1 devices found
    Please report your BIOS at http://linux.dell.com/edd/results.html
    PM: Reading pmdisk image.
    PM: Resume from disk failed.
    md: Autodetecting RAID arrays.
    md: autorun ...
    md: ... autorun DONE.
    RAMDISK: Compressed image found at block 0
    VFS: Mounted root (ext2 filesystem).
    Mounted devfs on /dev
    SCSI subsystem initialized
    libata version 1.00 loaded.
    EXT3-fs: INFO: recovery required on readonly filesystem.
    EXT3-fs: write access will be enabled during recovery.
    kjournald starting. Commit interval 5 seconds
    EXT3-fs: hda1: orphan cleanup on readonly fs
    ext3_orphan_cleanup: deleting unreferenced inode 1038473
    ext3_orphan_cleanup: deleting unreferenced inode 1038472
    ext3_orphan_cleanup: deleting unreferenced inode 1038471
    ext3_orphan_cleanup: deleting unreferenced inode 1038470
    ext3_orphan_cleanup: deleting unreferenced inode 1038469
    ext3_orphan_cleanup: deleting unreferenced inode 1038467
    ext3_orphan_cleanup: deleting unreferenced inode 1038466
    ext3_orphan_cleanup: deleting unreferenced inode 1038464
    ext3_orphan_cleanup: deleting unreferenced inode 1038463
    ext3_orphan_cleanup: deleting unreferenced inode 1038462
    ext3_orphan_cleanup: deleting unreferenced inode 1038461
    ext3_orphan_cleanup: deleting unreferenced inode 1038460
    ext3_orphan_cleanup: deleting unreferenced inode 1038459
    ext3_orphan_cleanup: deleting unreferenced inode 1038458
    ext3_orphan_cleanup: deleting unreferenced inode 1038457
    ext3_orphan_cleanup: deleting unreferenced inode 1038456
    ext3_orphan_cleanup: deleting unreferenced inode 1038455
    ext3_orphan_cleanup: deleting unreferenced inode 1038454
    ext3_orphan_cleanup: deleting unreferenced inode 973782
    EXT3-fs: hda1: 19 orphan inodes deleted
    EXT3-fs: recovery complete.
    EXT3-fs: mounted filesystem with ordered data mode.
    Mounted devfs on /dev
    Freeing unused kernel memory: 288k freed
    Real Time Clock Driver v1.12
    drivers/usb/core/usb.c: registered new driver usbfs
    drivers/usb/core/usb.c: registered new driver hub
    drivers/usb/host/uhci-hcd.c: USB Universal Host Controller Interface driver v2.1
    PCI: Found IRQ 9 for device 0000:00:1d.0
    PCI: Sharing IRQ 9 with 0000:00:02.0
    PCI: Sharing IRQ 9 with 0000:00:1d.3
    uhci_hcd 0000:00:1d.0: UHCI Host Controller
    PCI: Setting latency timer of device 0000:00:1d.0 to 64
    uhci_hcd 0000:00:1d.0: irq 9, io base 00001400
    uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 1
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 2 ports detected
    PCI: Found IRQ 11 for device 0000:00:1d.1
    uhci_hcd 0000:00:1d.1: UHCI Host Controller
    PCI: Setting latency timer of device 0000:00:1d.1 to 64
    uhci_hcd 0000:00:1d.1: irq 11, io base 00001800
    uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 2
    hub 2-0:1.0: USB hub found
    hub 2-0:1.0: 2 ports detected
    PCI: Found IRQ 10 for device 0000:00:1d.2
    PCI: Sharing IRQ 10 with 0000:00:1f.1
    PCI: Sharing IRQ 10 with 0000:00:1f.2
    PCI: Sharing IRQ 10 with 0000:02:01.0
    uhci_hcd 0000:00:1d.2: UHCI Host Controller
    PCI: Setting latency timer of device 0000:00:1d.2 to 64
    uhci_hcd 0000:00:1d.2: irq 10, io base 00001c00
    uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 3
    hub 3-0:1.0: USB hub found
    hub 3-0:1.0: 2 ports detected
    PCI: Found IRQ 9 for device 0000:00:1d.3
    PCI: Sharing IRQ 9 with 0000:00:02.0
    PCI: Sharing IRQ 9 with 0000:00:1d.0
    uhci_hcd 0000:00:1d.3: UHCI Host Controller
    PCI: Setting latency timer of device 0000:00:1d.3 to 64
    uhci_hcd 0000:00:1d.3: irq 9, io base 00002000
    uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 4
    hub 4-0:1.0: USB hub found
    hub 4-0:1.0: 2 ports detected
    PCI: Found IRQ 9 for device 0000:00:1d.7
    ehci_hcd 0000:00:1d.7: EHCI Host Controller
    PCI: Setting latency timer of device 0000:00:1d.7 to 64
    ehci_hcd 0000:00:1d.7: irq 9, pci mem e0004000
    ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 5
    PCI: cache line size of 128 is not supported by device 0000:00:1d.7
    ehci_hcd 0000:00:1d.7: USB 2.0 enabled, EHCI 1.00, driver 2003-Dec-29
    hub 5-0:1.0: USB hub found
    hub 5-0:1.0: 8 ports detected
    EXT3 FS on hda1, internal journal
    Adding 522072k swap on /dev/hda5. Priority:-1 extents:1
    Linux agpgart interface v0.100 (c) Dave Jones
    agpgart: Detected an Intel 865 Chipset.
    agpgart: Maximum main memory to use for agp memory: 431M
    agpgart: Detected 8060K stolen memory.
    agpgart: AGP aperture is 128M @ 0xf0000000
    Supermount version 2.0.4 for kernel 2.6
    kjournald starting. Commit interval 5 seconds
    EXT3 FS on hda6, internal journal
    EXT3-fs: mounted filesystem with ordered data mode.
    Intel(R) PRO/1000 Network Driver - version 5.2.30.1-k2
    Copyright (c) 1999-2004 Intel Corporation.
    PCI: Found IRQ 10 for device 0000:02:01.0
    PCI: Sharing IRQ 10 with 0000:00:1d.2
    PCI: Sharing IRQ 10 with 0000:00:1f.1
    PCI: Sharing IRQ 10 with 0000:00:1f.2
    PCI: Setting latency timer of device 0000:02:01.0 to 64
    eth0: Intel(R) PRO/1000 Network Connection
    inserting floppy driver for 2.6.3-7mdksmp
    Floppy drive(s): fd0 is 1.44M
    FDC 0 is a post-1991 82077
    hdc: ATAPI 48X DVD-ROM CD-R/RW CD-MRW drive, 2048kB Cache, UDMA(33)
    Uniform CD-ROM driver Revision: 3.20
    ide-floppy driver 0.99.newide
    drivers/usb/core/usb.c: registered new driver hiddev
    drivers/usb/core/usb.c: registered new driver hid
    drivers/usb/input/hid-core.c: v2.0:USB HID core driver
    NET: Registered protocol family 17
    e1000: eth0 NIC Link is Up 100 Mbps Half Duplex
    PCI: Found IRQ 5 for device 0000:00:1f.5
    PCI: Sharing IRQ 5 with 0000:00:1f.3
    PCI: Setting latency timer of device 0000:00:1f.5 to 64
    intel8x0_measure_ac97_clock: measured 49851 usecs
    intel8x0: clocking to 48000
    NET: Registered protocol family 10
    Disabled Privacy Extensions on device c037da00(lo)
    IPv6 over IPv4 tunneling driver
    Installing knfsd (copyright (C) 1996 [email protected]).
    atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0).
    atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly.
    atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0).
    atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly.
    eth0: no IPv6 routers present
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    printk: 24045 messages suppressed.
    Neighbour table overflow.
    printk: 24276 messages suppressed.
    Neighbour table overflow.
    printk: 16555 messages suppressed.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    printk: 24221 messages suppressed.
    Neighbour table overflow.
    printk: 24272 messages suppressed.
    Neighbour table overflow.
    printk: 15931 messages suppressed.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    Neighbour table overflow.
    printk: 24289 messages suppressed.
    Neighbour table overflow.
    printk: 21235 messages suppressed.
    Neighbour table overflow.
    ---- LSPCI ---
    00:00.0 Host bridge: Intel Corp. 82865G/PE/P Processor to I/O Controller (rev 02)
    00:02.0 VGA compatible controller: Intel Corp. 82865G Integrated Graphics Device (rev 02)
    00:03.0 PCI bridge: Intel Corp. 82865G/PE/P Processor to PCI to CSA Bridge (rev 02)
    00:1d.0 USB Controller: Intel Corp. 82801EB USB (rev 02)
    00:1d.1 USB Controller: Intel Corp. 82801EB USB (rev 02)
    00:1d.2 USB Controller: Intel Corp. 82801EB USB (rev 02)
    00:1d.3 USB Controller: Intel Corp. 82801EB USB (rev 02)
    00:1d.7 USB Controller: Intel Corp. 82801EB USB2 (rev 02)
    00:1e.0 PCI bridge: Intel Corp. 82801BA/CA/DB/EB PCI Bridge (rev c2)
    00:1f.0 ISA bridge: Intel Corp. 82801EB LPC Interface Controller (rev 02)
    00:1f.1 IDE interface: Intel Corp. 82801EB Ultra ATA Storage Controller (rev 02)
    00:1f.2 IDE interface: Intel Corp. 82801EB Ultra ATA Storage Controller (rev 02)
    00:1f.3 SMBus: Intel Corp. 82801EB SMBus Controller (rev 02)
    00:1f.5 Multimedia audio controller: Intel Corp. 82801EB AC'97 Audio Controller (rev 02)
    02:01.0 Ethernet controller: Intel Corp.: Unknown device 1019
    -- LSMOD --
    Module Size Used by
    nfsd 175840 8
    exportfs 7552 1 nfsd
    md5 4864 1
    ipv6 251392 29
    snd-seq-oss 33568 0
    snd-seq-midi-event 8704 1 snd-seq-oss
    snd-seq 55696 4 snd-seq-oss,snd-seq-midi-event
    snd-pcm-oss 53316 0
    snd-mixer-oss 19008 1 snd-pcm-oss
    snd-intel8x0 34440 0
    snd-ac97-codec 59588 1 snd-intel8x0
    snd-pcm 97440 2 snd-pcm-oss,snd-intel8x0
    snd-timer 26660 2 snd-seq,snd-pcm
    gameport 5664 1 snd-intel8x0
    snd-page-alloc 12996 2 snd-intel8x0,snd-pcm
    snd-mpu401-uart 8320 1 snd-intel8x0
    snd-rawmidi 25248 1 snd-mpu401-uart
    snd-seq-device 9032 3 snd-seq-oss,snd-seq,snd-rawmidi
    snd 55492 12 snd-seq-oss,snd-seq-midi-event,snd-seq,snd-pcm-oss,snd-mixer-oss,snd-intel8x0,snd-ac97-codec,snd-pcm,snd-timer,snd-mpu401-uart,snd-rawmidi,snd-seq-device
    soundcore 10560 1 snd
    af_packet 22632 0
    hid 55360 0
    raw 8640 1
    ide-floppy 19776 0
    ide-tape 36752 0
    ide-cd 41764 0
    cdrom 38272 1 ide-cd
    floppy 61620 0
    e1000 83460 0
    supermount 39856 1
    intel-agp 18364 1
    agpgart 32460 2 intel-agp
    ehci-hcd 25572 0
    uhci-hcd 31856 0
    usbcore 103228 5 hid,ehci-hcd,uhci-hcd
    rtc 13640 0
    ext3 114216 2
    jbd 61976 1 ext3
    sd_mod 17696 0
    ata_piix 8836 0
    libata 40256 1 ata_piix,[permanent]
    scsi_mod 117104 2 sd_mod,libata
    ----- /var/log/kernel/warnings -------
    Oct 5 10:16:47 nsilaslin02 kernel: printing eip:
    Oct 5 10:16:47 nsilaslin02 kernel: c018e379
    Oct 5 10:16:47 nsilaslin02 kernel: Oops: 0000 [#1]
    Oct 5 10:16:47 nsilaslin02 kernel: CPU: 1
    Oct 5 10:16:47 nsilaslin02 kernel: EIP: 0060:[proc_pid_stat+137/928] Not tainted VLI
    Oct 5 10:16:47 nsilaslin02 kernel: EIP: 0060:[<c018e379>] Not tainted VLI
    Oct 5 10:16:47 nsilaslin02 kernel: EFLAGS: 00010286
    Oct 5 10:16:47 nsilaslin02 kernel: EIP is at proc_pid_stat+0x89/0x3a0
    Oct 5 10:16:47 nsilaslin02 kernel: eax: 00000000 ebx: 02000000 ecx: d85ac000 edx: 92960700
    Oct 5 10:16:47 nsilaslin02 kernel: esi: d11ea6f0 edi: ded440a0 ebp: cf0ddf44 esp: cf0ddee4
    Oct 5 10:16:47 nsilaslin02 kernel: ds: 007b es: 007b ss: 0068
    Oct 5 10:16:47 nsilaslin02 kernel: Process javac (pid: 2415, threadinfo=cf0dc000 task=d11ea6f0)
    Oct 5 10:16:47 nsilaslin02 kernel: Stack: c0143d5a c1259e78 00000000 c1259e78 c0343980 0000015b 00000000 cf0ddf40
    Oct 5 10:16:47 nsilaslin02 kernel: 52143e93 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    Oct 5 10:16:47 nsilaslin02 kernel: 00000000 00000000 000000d0 00001000 000000d0 d11ea6f0 00000400 de64f060
    Oct 5 10:16:47 nsilaslin02 kernel: Call Trace:
    Oct 5 10:16:47 nsilaslin02 kernel: [buffered_rmqueue+234/400] buffered_rmqueue+0xea/0x190
    Oct 5 10:16:47 nsilaslin02 kernel: [<c0143d5a>] buffered_rmqueue+0xea/0x190
    Oct 5 10:16:47 nsilaslin02 kernel: [proc_info_read+75/320] proc_info_read+0x4b/0x140
    Oct 5 10:16:47 nsilaslin02 kernel: [<c018b60b>] proc_info_read+0x4b/0x140
    Oct 5 10:16:47 nsilaslin02 kernel: [vfs_read+142/224] vfs_read+0x8e/0xe0
    Oct 5 10:16:47 nsilaslin02 kernel: [<c015bf2e>] vfs_read+0x8e/0xe0
    Oct 5 10:16:47 nsilaslin02 kernel: [sys_read+46/80] sys_read+0x2e/0x50
    Oct 5 10:16:47 nsilaslin02 kernel: [<c015c14e>] sys_read+0x2e/0x50
    Oct 5 10:16:47 nsilaslin02 kernel: [sysenter_past_esp+82/121] sysenter_past_esp+0x52/0x79
    Oct 5 10:16:47 nsilaslin02 kernel: [<c010b1b9>] sysenter_past_esp+0x52/0x79
    Oct 5 10:16:47 nsilaslin02 kernel:
    Oct 5 10:16:47 nsilaslin02 kernel: Code: 00 00 8b 7e 68 85 ff 74 09 57 e8 b3 5f f9 ff 59 89 c7 8b 8e 24 03 00 00 85 c9 74 38 8b 81 98 00 00 00 89 45 c8 8b 59 04 8b 51 08 <0f> bf 43 64 0f bf 5b 66 c1 e0 14 09 d8 01 d0 89 c1 c1 e9 14 0f
    Oct 5 10:30:32 nsilaslin02 kernel: Linux version 2.6.3-7mdksmp ([email protected]) (gcc version 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)) #1 SMP Wed Mar 17 14:24:28 CET 2004
    Oct 5 10:30:32 nsilaslin02 kernel: BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
    Oct 5 10:30:32 nsilaslin02 kernel: BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
    Oct 5 10:30:32 nsilaslin02 kernel: BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
    Oct 5 10:30:32 nsilaslin02 kernel: BIOS-e820: 0000000000100000 - 000000001f6f0000 (usable)
    Oct 5 10:30:32 nsilaslin02 kernel: BIOS-e820: 000000001f6f0000 - 000000001f6fb000 (ACPI data)
    Oct 5 10:30:32 nsilaslin02 kernel: BIOS-e820: 000000001f6fb000 - 000000001f700000 (ACPI NVS)
    Oct 5 10:30:32 nsilaslin02 kernel: BIOS-e820: 000000001f700000 - 000000001f780000 (usable)
    Oct 5 10:30:32 nsilaslin02 kernel: BIOS-e820: 000000001f780000 - 0000000020000000 (reserved)
    Oct 5 10:30:32 nsilaslin02 kernel: BIOS-e820: 00000000fec00000 - 00000000fed00400 (reserved)
    Oct 5 10:30:32 nsilaslin02 kernel: BIOS-e820: 00000000fee00000 - 00000000fef00000 (reserved)
    Oct 5 10:30:32 nsilaslin02 kernel: BIOS-e820: 00000000ffb80000 - 00000000ffc00000 (reserved)
    Oct 5 10:30:32 nsilaslin02 kernel: BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved)
    Oct 5 10:30:32 nsilaslin02 kernel: hm, page 000f7000 reserved twice.
    Oct 5 10:30:32 nsilaslin02 kernel: hm, page 000f8000 reserved twice.
    Oct 5 10:30:32 nsilaslin02 kernel: hm, page 0009f000 reserved twice.
    Oct 5 10:30:32 nsilaslin02 kernel: hm, page 000a0000 reserved twice.
    Oct 5 10:30:32 nsilaslin02 kernel: On node 0 totalpages: 128896
    Oct 5 10:30:32 nsilaslin02 kernel: DMA zone: 4096 pages, LIFO batch:1
    Oct 5 10:30:32 nsilaslin02 kernel: Normal zone: 124800 pages, LIFO batch:16
    Oct 5 10:30:32 nsilaslin02 kernel: HighMem zone: 0 pages, LIFO batch:1
    Oct 5 10:30:33 nsilaslin02 kernel: Processor #0 15:2 APIC version 20
    Oct 5 10:30:33 nsilaslin02 kernel: Processor #1 15:2 APIC version 20
    Oct 5 10:30:33 nsilaslin02 kernel: Enabling APIC mode: Flat. Using 1 I/O APICs
    Oct 5 10:30:33 nsilaslin02 kernel: Built 1 zonelists
    Oct 5 10:30:33 nsilaslin02 kernel: Kernel command line: auto BOOT_IMAGE=linux-nonfb ro root=301 noapic devfs=mount acpi=ht resume=/dev/hda5
    Oct 5 10:30:33 nsilaslin02 kernel: PID hash table entries: 2048 (order 11: 16384 bytes)
    Oct 5 10:30:33 nsilaslin02 kernel: Detected 2793.223 MHz processor.
    Oct 5 10:30:33 nsilaslin02 kernel: Console: colour VGA+ 80x25
    Oct 5 10:30:33 nsilaslin02 kernel: Checking if this processor honours the WP bit even in supervisor mode... Ok.
    Oct 5 10:30:33 nsilaslin02 kernel: Calibrating delay loop... 5537.79 BogoMIPS
    Oct 5 10:30:33 nsilaslin02 kernel: Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
    Oct 5 10:30:33 nsilaslin02 kernel: Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
    Oct 5 10:30:33 nsilaslin02 kernel: POSIX conformance testing by UNIFIX
    Oct 5 10:30:33 nsilaslin02 kernel: CPU0: Intel(R) Pentium(R) 4 CPU 2.80GHz stepping 09
    Oct 5 10:30:33 nsilaslin02 kernel: per-CPU timeslice cutoff: 1462.56 usecs.
    Oct 5 10:30:33 nsilaslin02 kernel: task migration cache decay timeout: 2 msecs.
    Oct 5 10:30:33 nsilaslin02 kernel: enabled ExtINT on CPU#0
    Oct 5 10:30:33 nsilaslin02 kernel: ESR value before enabling vector: 00000000
    Oct 5 10:30:33 nsilaslin02 kernel: ESR value after enabling vector: 00000000
    Oct 5 10:30:33 nsilaslin02 kernel: Booting processor 1/1 eip 3000
    Oct 5 10:30:33 nsilaslin02 kernel: masked ExtINT on CPU#1
    Oct 5 10:30:33 nsilaslin02 kernel: ESR value before enabling vector: 00000000
    Oct 5 10:30:33 nsilaslin02 kernel: ESR value after enabling vector: 00000000
    Oct 5 10:30:33 nsilaslin02 kernel: Calibrating delay loop... 5570.56 BogoMIPS
    Oct 5 10:30:33 nsilaslin02 kernel: CPU1: Intel(R) Pentium(R) 4 CPU 2.80GHz stepping 09
    Oct 5 10:30:33 nsilaslin02 kernel: cpu_sibling_map[0] = 1
    Oct 5 10:30:33 nsilaslin02 kernel: cpu_sibling_map[1] = 0
    Oct 5 10:30:33 nsilaslin02 kernel: Using local APIC timer interrupts.
    Oct 5 10:30:33 nsilaslin02 kernel: calibrating APIC timer ...
    Oct 5 10:30:33 nsilaslin02 kernel: ..... CPU clock speed is 2792.0645 MHz.
    Oct 5 10:30:33 nsilaslin02 kernel: ..... host bus clock speed is 199.0474 MHz.
    Oct 5 10:30:33 nsilaslin02 kernel: checking TSC synchronization across 2 CPUs: passed.
    Oct 5 10:30:33 nsilaslin02 kernel: Starting migration thread for cpu 0
    Oct 5 10:30:33 nsilaslin02 kernel: Starting migration thread for cpu 1
    Oct 5 10:30:33 nsilaslin02 kernel: Brought up 1 CPUs
    Oct 5 10:30:33 nsilaslin02 kernel: PCI: Probing PCI hardware
    Oct 5 10:30:33 nsilaslin02 kernel: PCI: Probing PCI hardware (bus 00)
    Oct 5 10:30:33 nsilaslin02 kernel: Transparent bridge - 0000:00:1e.0
    Oct 5 10:30:33 nsilaslin02 kernel: PCI: IRQ 0 for device 0000:00:1f.1 doesn't match PIRQ mask - try pci=usepirqmask
    Oct 5 10:30:33 nsilaslin02 kernel: pty: 1024 Unix98 ptys configured
    Oct 5 10:30:33 nsilaslin02 kernel: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
    Oct 5 10:30:33 nsilaslin02 kernel: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
    Oct 5 10:30:33 nsilaslin02 kernel: RAMDISK driver initialized: 16 RAM disks of 32000K size 1024 blocksize
    Oct 5 10:30:33 nsilaslin02 kernel: hda: WDC WD800LB-07DNA2, ATA DISK drive
    Oct 5 10:30:33 nsilaslin02 kernel: Using anticipatory io scheduler
    Oct 5 10:30:33 nsilaslin02 kernel: ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
    Oct 5 10:30:33 nsilaslin02 kernel: hdc: LITE-ON COMBO LTC-48161H, ATAPI CD/DVD-ROM drive
    Oct 5 10:30:33 nsilaslin02 kernel: ide1 at 0x170-0x177,0x376 on irq 15
    Oct 5 10:30:33 nsilaslin02 kernel: hda: max request size: 1024KiB
    Oct 5 10:30:33 nsilaslin02 kernel: VFS: Mounted root (ext2 filesystem).
    Oct 5 10:30:33 nsilaslin02 kernel: PCI: cache line size of 128 is not supported by device 0000:00:1d.7
    Oct 5 10:30:33 nsilaslin02 kernel: hdc: ATAPI 48X DVD-ROM CD-R/RW CD-MRW drive, 2048kB Cache, UDMA(33)
    Oct 5 10:30:33 nsilaslin02 kernel: ide-floppy driver 0.99.newide
    Oct 5 10:30:39 nsilaslin02 kernel: atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0).
    Oct 5 10:30:39 nsilaslin02 kernel: atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly.
    Oct 5 10:30:39 nsilaslin02 kernel: atkbd.c: Unknown key released (translated set 2, code 0x7a on isa0060/serio0).
    Oct 5 10:30:39 nsilaslin02 kernel: atkbd.c: This is an XFree86 bug. It shouldn't access hardware directly.
    Oct 5 10:30:50 nsilaslin02 kernel: Neighbour table overflow.
    Oct 5 10:30:50 nsilaslin02 last message repeated 9 times
    Oct 5 10:30:55 nsilaslin02 kernel: printk: 24045 messages suppressed.
    Oct 5 10:30:55 nsilaslin02 kernel: Neighbour table overflow.
    Oct 5 10:31:00 nsilaslin02 kernel: printk: 24276 messages suppressed.
    Oct 5 10:31:00 nsilaslin02 kernel: Neighbour table overflow.
    Oct 5 10:36:06 nsilaslin02 kernel: printk: 16555 messages suppressed.
    Oct 5 10:36:06 nsilaslin02 kernel: Neighbour table overflow.
    Oct 5 10:36:06 nsilaslin02 last message repeated 9 times
    Oct 5 10:36:11 nsilaslin02 kernel: printk: 24221 messages suppressed.
    Oct 5 10:36:11 nsilaslin02 kernel: Neighbour table overflow.
    Oct 5 10:36:16 nsilaslin02 kernel: printk: 24272 messages suppressed.
    Oct 5 10:36:16 nsilaslin02 kernel: Neighbour table overflow.
    Oct 5 10:46:22 nsilaslin02 kernel: printk: 15931 messages suppressed.
    Oct 5 10:46:22 nsilaslin02 kernel: Neighbour table overflow.
    Oct 5 10:46:22 nsilaslin02 last message repeated 9 times
    Oct 5 10:46:27 nsilaslin02 kernel: printk: 24289 messages suppressed.
    Oct 5 10:46:27 nsilaslin02 kernel: Neighbour table overflow.
    Oct 5 10:46:32 nsilaslin02 kernel: printk: 21235 messages suppressed.
    Oct 5 10:46:32 nsilaslin02 kernel: Neighbour table overflow.

    Java programs are run by a virtual machine which is running in userland. They don't "mess" with the kernel.
    OTOH, each userland program interacts with the kernel through system calls, signals, pageing activity, ...
    My guess is that it's either broken hardware, or a fault in the linux kernel.
    Is the crash reproducible? Does ist always crash with the same error message, at the same "eip" location?
    If the crashes are sporadic and non deterministic, with different error messages each time, then I'd say it's
    a hardware problem. Otherwise, it could be a linux kernel software problem.

  • ER unable to compile using javac with java 1.3.1 library (JDEV 10.1.3.0.4)

    Hi !
    When I try to compile in JDev with javac and the java 1.3.1 library, I get the following error :
    Error: javac: invalid flag: -source
    The command line generated by JDev looks like :
    C:\jdk1.3.1_03\bin\javac.exe -J-mx512m -verbose -deprecation -source 1.3 -target 1.3 -encoding Cp1252 -g -classpath [...] -sourcepath [...] -d [...] @C:\DOCUME~1\user\LOCALS~1\Temp\javac54193.tmp
    It seems that -source and -target flags do not exist in this version of javac.
    But it does not seem possible to remove these flags generated by JDev, so I'm unable to compile with javac 1.3.1 and JDev.
    So i'm looking for :
    - A workaround to prevent JDev from adding the -source and -target flags.
    - A future release of JDev where you could disable these flags, or, much better, where JDev automatically disables these flags when it detects a 1.3.1 library (there may be other incompatible flags I did not mention).
    Thank you for your answers :)

    Hi,
    when you open the project properties and choose the compiler option to tht the compiler to "javac" and then the "source" and "target" to 1.3, wouldn't this compile it for Java 3? I don't think that it is necesary to use JDK 1.3 for compiling the sources
    Cross-Compilation Options
    By default, classes are compiled against the bootstrap and extension classes of the platform that javac shipped with. But javac also supports cross-compiling, where classes are compiled against a bootstrap and extension classes of a different Java platform implementation. It is important to use -bootclasspath and -extdirs when cross-compiling; see Cross-Compilation Example below.
    -target version
    Generate class files that will work on VMs with the specified version. The default is to generate class files to be compatible with the 1.2 VM in the Java 2 SDK. The versions supported by javac in the Java 2 SDK are:
    1.1
    Ensure that generated class files will be compatible with 1.1 and VMs in the Java 2 SDK.
    1.2
    Generate class files that will run on VMs in the Java 2 SDK, v 1.2 and later, but will not run on 1.1 VMs. This is the default.
    1.3
    Generate class files that will run on VMs in the Java 2 SDK, v 1.3 and later, but will not run on 1.1 or 1.2 VMs.
    1.4
    Generate class files that are compatible only with 1.4 VMs.
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javac.html
    Frank

  • Javac: The exception Privileged instruction, why?

    Hi,
    I apologize for posting this question twice, I'm brand new to this forum. My question is both relatedto installation and compiling (I must have done a bad installation?).
    Here is my problem:
    I just installed jdk1.1.6 on my computer.
    The examples work fine but I can't compile.
    I get 2 different errors:
    1) When I try the 1.1 example:
    D:\dev\jdk1.1.6\demo\demo\Animator\1.1>d:\dev\jdk1.1.6\bin\javac animator.java
    =>
    The exception Privileged instruction.
    (0x0000096) occured in the application at location 0x00010104
    Click Ok to terminate, Cancel to debug.
    The debug doesn't help...
    2)When I try the 1.0.2 example:
    D:\dev\jdk1.1.6\demo\demo\Animator\1.0.2>d:\dev\jdk1.1.6\bin\javac *.java
    =>
    java.lang.NullPointerException
    at java.util.Hashtable.put(Compiled Code)
    at java.util.zip.ZipFile.readCEN(Compiled Code)
    at java.util.zip.ZipFile.<init>(ZipFile.java:61)
    at java.util.zip.ZipFile.<init>(ZipFile.java:71)
    at sun.tools.java.ClassPath.<init>(Compiled Code)
    at sun.tools.javac.Main.compile(Compiled Code)
    at sun.tools.javac.Main.main(Main.java:473)
    Here is the config of my computer:
    System Information report written at: 12/05/2001 11:06:23 AM
    [System Summary]
    Item Value
    OS Name Microsoft Windows 2000 Advanced Server
    Version 5.0.2195 Service Pack 2 Build 2195
    OS Manufacturer Microsoft Corporation
    System Manufacturer IBM
    System Model 684940U
    System Type X86-based PC
    Processor x86 Family 15 Model 0 Stepping 10 GenuineIntel ~1796 Mhz
    BIOS Version 09/27/01
    Windows Directory C:\WINNT
    System Directory C:\WINNT\System32
    Boot Device \Device\Harddisk0\Partition1
    Locale United States
    Time Zone Pacific Standard Time
    Total Physical Memory 261,424 KB
    Available Physical Memory 32,368 KB
    Total Virtual Memory 893,364 KB
    Available Virtual Memory 387,436 KB
    Page File Space 631,940 KB
    Page File C:\pagefile.sys
    Please help !
    Thanks :-)
    Catherine
    [email protected]

    I am also getting same error can you please help me in this matter.
    java.lang.NullPointerException
    at java.util.Hashtable.put(Compiled Code)
    at java.util.zip.ZipFile.readCEN(Compiled Code)
    at java.util.zip.ZipFile.<init>(ZipFile.java:61)
    at java.util.zip.ZipFile.<init>(ZipFile.java:71)
    at sun.tools.java.ClassPath.<init>(Compiled Code)
    at sun.tools.javac.Main.compile(Compiled Code)
    at sun.tools.javac.Main.main(Main.java:465)

  • Cannot find javac compiler

    I have recently installed apache tomcat and the J2SE SDk on my windows machine and have managed to get tomcat to run. However, when i try to test a jsp page I get an error saying ii cannot find the javac compiler. The error I amgetting is shown below.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:97)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:346)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:414)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    Unable to find a javac compiler;
    com.sun.tools.javac.Main is not on the classpath.
    Perhaps JAVA_HOME does not point to the JDK
         org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:106)
         org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
         org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:382)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    I have checked my environment variables that I set up and I cannot finad anything wrong with them as they all seem to point to the right directory. Here are my environment variables.
    CLASSPATH = C:\jdk1.5.0_02\lib\tools.jar;C:\Servers\Tomcat 5.0\common\lib\servlet-api.jar;C:\Servers\Tomcat 5.0\common\lib\jsp-api.jar
    JAVA_HOME = C:\jdk1.5.0_02
    PATH = %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\ATI-CPanel;C:\Program Files\Pragma\Clients;C:\Program Files\MySQL\MySQL Server 4.1\bin;C:\jdk1.5.0_02\bin
    Does anyone have any idea what the problem could be? Any solutions would be much appreciated.
    Thanks

    I have recently installed apache tomcat and the J2SE SDk on my windows machine and have managed to get tomcat to run.
    the error i have got is below:
    Exception:
    Unable to find a javac compiler;
    com.sun.tools.javac.Main is not on the classpath.
    Perhaps JAVA_HOME does not point to the JDK
         at org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler(CompilerAdapterFactory.java:106)
         at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:935)
         at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:282)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:328)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:427)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:142)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:536)
    Does anyone have any idea what the problem could be? Any solutions would be much appreciated.
    Thanks

  • How to put the ".class" file in Memory with Javac?

    The J2SE 6 RC have an tool : javax.tools.JavaComplier. I can use it to compile the source code in memory( I implemented an JavaFileObject).
    But the compiler aways put the output file(.class) to file system. It;s not my want to do . I am writing an IDE ,I use javac to determine the code error after the user's typing. So complier is used a lot , writing to file system is a time consuming job.
    I also want to use the byte code(".class" file) for reflection , so if the JavaCompiler can put the output file in memory and then I can reflect it.
    My current solution is puting the output file to file system then use Class.forName() to reload it in memory then reflect it. It seems a useless IO operation with file system.
    How can I do with it?
    Thanks!

    Those 'useless' I/O operations are one or two out of thousands that are implied by compiling a Java source file.
    I wouldn't worry about it.

Maybe you are looking for

  • Have Apple TV.  Do not have remote control

    So I just moved and of course brought my Apple TV with me because it's just so awesome... When I got to new place however I realized that I forgot to bring the remote control! I have a new router so the Apple TV isn't connected to the new wifi. Any t

  • Recovery disc error code: 0xe0ef000e

    Back in December I started getting warning messages about my SMART Drive failing and was told to create recovery disks for my Pavilion dv-7 Notebook, which I did. A few weeks ago the hard drive crashed and I replaced it. When I went to recovery page

  • GRN against short closed PO

    Hi, System is allowing to post the GRN against those POs which are already short closed...which is wrong. Can anybody plz suggest how to put ERROR Message in GRN while posting against short closed PO ??? Regards, Raghunath

  • How do I retrieve my imessages once deleted

    I have deleted a block of iMessages off my phone but want to retrieve them ? Is this possible ?

  • Weblogic server console unstable

    Hi guys, I use DOS windows to start my weblogic server. When the server started, most of the time, it keeps showing the status info, but some times (once or two) nothing comes out from the DOS windows and the Console works perfect under those circums