Cannot get Java to compile

I have recently installed the newest Java version on my XP computer. I can't get it to compile the programs
I have written. I have it saved in C:/Program Files/java_save. When I go to compile I get "javac is not a recognized action or file name." I have tried creating the path in the system settings but I still cannot get it to work. I have tried just about everything I can think of. I am getting really frustrated and haven't gotten an answer from java when I emailed them. Do I need to reinstall java or am I doing something wrong? Any help would be appreciated. Thank You!
trtrainer

'Software\JavaSoft\Jave Runtime
Environment\CurrentVersion' has value '1.4' but '13'
is required.
Error: could not find java.dll
Error: could not find Java 2 Runtime EnvironmentA fast review of the threads on this topic lead me to believe you may need to either 1) add the new bin directory to the path variable as mentioned earlier 2) reinstall the JRE only, due to confusion at the registry level 3) edit/repair the registry itself (careful...)
Note also the order of the items in the PATH setting. As discussed here in Reply 1..
http://forum.java.sun.com/thread.jsp?forum=54&thread=164483
You may wish to remove from the PATH setting any earlier versions of a java sdk you had attempted to install.
Here are some other threads on this topic..
http://forum.java.sun.com/thread.jsp?forum=32&thread=142506
http://forum.java.sun.com/thread.jsp?forum=31&thread=276400
Reply 1 of this thread suggests reinstalling Java and the response from the OP is that the reinstall resolved the issue.
http://forum.java.sun.com/thread.jsp?forum=54&thread=299702
If you installed an IDE with it's own JDK, you may want to look at Reply 2 here..
http://forum.java.sun.com/thread.jsp?forum=54&thread=183721
When I type the path: c:\j2sdk1.4.2_04\bin\javac
HelloWorldApp.java, I get: Error: Cannot Read:
HelloWorldApp.javaThis simply means that the compiler can not find the file "HelloWorldApp.java" inside the directory from where you are attempting to compile the file.

Similar Messages

  • It does not matter what I do, I cannot get Java security settings to allow an applet to run.

    I have gone to just about every extreme possible, and no matter what I do, I cannot get Java to allow an applet to run. I have been trying to do a J-Track on some satellites on the NASA/JPL website, and no matter what I do, and from the totally useless "help" sites here in the Firefox "help" pages, I cannot get the &^%$#@ applet to run.

    Did you try to clear the Java cache?
    *http://www.java.com/en/download/help/5000020300.xml - How do I clear the Java cache?
    *Control Panel > Java > General tab > "Temporary Internet Files" > Settings > Delete Files
    Did you add an exception to the Java security manager?
    *https://support.mozilla.org/kb/how-allow-java-trusted-sites
    *http://www.java.com/en/download/help/appsecuritydialogs.xml

  • New to Java - cannot get computer to compile?

    Hi
    I'm from UK, although I've used one for ages I am new to computing itself and very new to programming - in fact I haven't started yet because I cannot get my JDK to work!! I have downloaded it successfully, it is installed and I have verified the version from athe command prompt. I have written a programme as detailed in my Programming with Java book, and saved it with a java file extension and I am sure it is correct. But when I try to compile mit I get "'javac' is not recognised as an internal or external command, operable program or batch file"
    My book has no further advice on what to do - can anyone on this site offer me any help please.
    Thanks

    Make sure the path to the javac.exe is specified in the environment CLASSPATH, otherwise you'll have to instruct your command window to point to the java/bin directory every time you wish to compile something... Not fun... :P
    After that, just follow the instructions pointed at the tutorial...
    Check out the installation doc at http://java.sun.com/j2se/1.5.0/install-windows.html , specifically, the heading: 5. Update the PATH variable (Optional)
    If you're new to java, I recommend getting an IDE to simplify things: www.jcreator.com is nice and free, try it out... ;)

  • Cannot Get Java Business Service to Work

    Hi,
    This is my first time using Siebel Java Business Service and I cannot get it to work.
    I followed all the steps: in
    http://www.impossiblesiebel.com/2010/04/java-business-service-jbs-tutorial.html
    1) used netbeans, Created the Java class with no package, created a jar file . I copied the jar file to my Tools/CLASSES directory
    2) added a [JAVA] entry to my local client CFG. in the
    [JAVA]
    DLL = C:\Program Files\Java\jre6\bin\client\jvm.dll
    CLASSPATH = D:\Siebel\8.1\Tools_1\CLASSES\Siebel.jar;D:\Siebel \8.1\Tools_1\CLASSES\SiebelJI_enu.jar;D:\classes;D :\Siebel\8.1\Tools_1\CLASSES\ImposSiebelXSLT.jar
    VMOPTIONS = -Xrs -Djava.compiler=NONE
    3) Created a BS based on CSSJavaBusinessService and added user property
    @class
    4) Execute the BS and I am always getting the error
    Class name incorrect or does not extend SiebelBusinessService : ImposSiebelXSLT -- JVM Exception:java.lang.UnsupportedClassVersionError: ImposSiebelXSLT : Unsupported major.minor version 51.0(SBL-EAI-05010)(SBL-EXL-00151)
    Can anyone please help!!!

    in case anyone faces a similar problem. The issue was a mismatch of java versions. I compiled with Java 7 but the jvm.dll was pointing to JRE6. When I pointed it to JRE7 it worked

  • Cannot get java window to run at all.

    I'm using 1.4.2, and cannot get any java to run at all. It's on a Windows 2000 server, and I've rebooted it a few times. Can't even get the Java Applet window to open from the control panel. javaw.exe runs in the task manager, but that's it. Any ideas? Anything else I need?

    That's the Java Control Panel you can't open.
    Try uninstalling ALL Java versions, rebooting after each uninstall, and manually removing any directories that Java made after all are removed. Reboot again, then download a new offline Java installer file and install that. There's something in the machine that's bad.

  • Cannot get Java Web plugin to work in Safari.

    I have been using the JAva web plugin for a while, and managed to get past the problem with the Oracle Java 7 plugin successfully, but today, the Java web plugin is not working for me at all, and I'm struggling to find out why.
    When I visit java.com and run their detection page, afer about a minute, it comes back with "We are unable to verify if Java is currently installed and enabled in your browser."
    I've followed the advice at http://support.apple.com/kb/HT5559 on how to re-enable the old Java 6 web plugin, I've tried reinstalling the Oracle plugin... but no matter what I do (restarting Safari, enabling disabling Java in Safari preferences, rebooting the Mac), I still cannot get it working in Safari.
    This is a massive problem as website myself and my 20,000 colleagues use to log in to work remotely depends on the Java web plugin.  Right now (as in this morning)... the only option I have is to use a different OS (i.e. Windows). 
    Longer term, I really want to get this working on OS X again - any advice on further troubleshooting?

    Apple has barred Java from running on Macs, leaving companies that rely on Java plug-ins out in the cold.
    Apple blocked Java 7 Update 11 by adding it to the banned list in XProtect.
    This is the second time in two weeks that Apple has blocked Oracle's code from running on Macs. This time Java is blocked through Apple's XProtect anti-malware feature.
    Java has come under fire as the means by which hackers have been able to gain control of computers. In April 2012 more than 600,000 Macs were reported to have been infected with a Flashback Trojan horse that was being installed on people's computers with the help of Java exploits. Then in August Macs were again at risk due to a flaw in Java, this time around, there was good news for Mac users: Thanks to changes Apple has made, most of us were safe from the threat.
    Unwilling to leave its customers open to potential threats Apple has apparently decided it's safer to block Java entirely.
    Macs running OS X Snow Leopard and beyond are affected.

  • HT1338 I cannot get java to work on my macbook

    I canot get java to work on macbook

    Hi 007jtspy,
    Run Software Update and install all updates until Software Update reports "Your software is up to date."
    How to disable the Java web plug-in in Safari
    https://support.apple.com/kb/HT5241
    Do the oposite to enable java.
    Hope this helps,
    Mario

  • Getting java to compile

    I just downloaded the j2ee SDK and am hoping to compile some simple java applets. HOwever, I am having difficulty either finding an appropriate FAQ or getting some code to compile.
    When I type in javac on the command line (in windows xp) it brings back "javac is not recognized as an internal or external command"
    I tried creating under system properties / advanced/ environment variables/ a system variable called java with the path c:\Program Files\java\jdk1.5.0_04\bin but this did not solve it.
    Any pointers to a FAQ, the correct forum to post this to, or any other info would be greatly appreciated.
    Thanks,
    SQLFriend

    The problem seems to be that 'javac' is not in the PATH.
    You will need to add c:\Program Files\java\jdk1.5.0_04\bin to the PATH variable, as specified in http://java.sun.com/j2se/1.4.2/install-windows.html#Environment.
    Ref:
    http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html
    Also, for questions on java, javaforums are available at:
    http://forum.java.sun.com/index.jspa

  • Need Help Please - I can't get Java to compile my programs

    Hi, I'm taking a programming course in college and want to be able to compile my java programs at my home laptop instead of just at the lab...
    However, when I write my code and try to compile with TextPad, there is no "Compile" option....Instead there is a grayed-out option of "User-tool"...
    I have installed the J2SE Developmental Kit 5.0 Update 11 and the JavaRuntime Environment 5.0 Update 11....In the labs, the computers have the exact same thing except they are the Update 9 versions....
    What am I missing? Thanks for any help you can offer....

    > TextPad isn't part of the JDK nor runtime of Java,
    and this isn't a TextPad product support site.
    (Edit: Except when yawmark is around)
    Pish. I pointed himmer to the proper place. ;o)
    It would be advisable to lose your addiction to IDE's
    anyway (like TextPad)
    Pish. TextPad isn't an IDE. It's a feature-rich text editor that happens to let you run commands from within the program (though I don't argue with the benefit of compiling/executing from the CL when learning).
    ~

  • Cannot get java system call to work

    I am trying to make a system level call that will create a new user but have not been sucessful. I am reading the list of new users from newbousrs.txt file. Why am I getting the error message shown below? Here is my program:
    import java.io.*;
    public class ReadSource {
    public static void main(String[] arguments) {
    try {
    FileReader file = new FileReader("newbousrs.txt");
    BufferedReader buff = new BufferedReader(file);
    Runtime rt = Runtime.getRuntime();
    boolean eof = false;
    while (!eof) {
    String line = buff.readLine();
    if (line == null)
    eof = true;
    else
    System.out.println(line);
    Process proc = rt.exec("\\Blowfish\\droot\\Program Files\\Business Objects\\BusinessObjects 5.0\\supervsr.exe -USER xxxxx -PASS yyyy -IMPORTUSERS \\Blowfish\\droot\\accsp\\public\\newusers\\newbousrs.txt");
    buff.close();
    } catch (IOException e) {
    System.out.println("Error -- " + e.toString());
    There error I get is this:
    C:\jakarta-tomcat-4.0.3\webapps\webdav\WEB-INF\classes\accsp>java ReadSource
    NU,Public,Steve Mcnealy,Steve Mcnealy,U,N,N,Y,N,N,PC,F,Y,N,N
    Error -- java.io.IOException: CreateProcess: \Blowfish\droot\Program Files\Busin
    ess Objects\BusinessObjects 5.0\supervsr.exe -USER accsp -PASS fish -IMPORTUSERS
    \Blowfish\droot\accsp\public\newusers\newbousrs.txt error=3

    Just a guess....
    Program Files\\Business ObjectsSpace used in arguments in a command line command must have quotes around them. That includes the first argument.

  • Cannot get Java UFL to work on Vista

    <p>Hi,</p><p>we are having trouble getting our Java UFL to work in CR Designer on a machine running Vista. The same UFL works fine on a XP system. Doing the same setup on the Vista machine simple does not show the "Java UFLs" node in Formula Workshop&#39;s function tree. Additional functions is just empty...</p><p>Are there any special configurations to be done on Vista? Is there any chance to get a detailed error message? (no log4j output is generated) </p><p>Thanks for any ideas</p><p>Stefan</p><p>&#160;</p><p>&#160;</p>

    Sorry. My advice stands.
    Troubleshooting an unsupported system is an exercise in futility. You may or may not succeed but you'll always have the risk of something else going wrong at the worst possible time.
    Bob

  • Cannot get Java to work on XP Pro SP2

    I have just installed Win XP with SP2
    I have installed Sun's Java VM
    Java just does NOT WANT TO WORK!
    I have enabled almost everything to do with Java in the internet options. I just can't get applets to work!
    Does anyone have any ideas? HELP ME PLEASE!
    I am also using ZA Security Suite 5
    Thanks

    I am having the same problem, at least I think so.. When opening a site that uses Java, a popup screen opens that tells me Java virtual machine has to be installed. I lately installed Java Plug-in 1.5.0
    Using JRE version 1.5.0-rc Java HotSpot(TM) Client VM. I have configured everythin that has to do with Java to use this plugin, but it just won�t work. Website is http://www.nl.map24.com/ just fill in any adres to go to the part of the site that uses java. I have opened the java console, but there is no error message coming up there. Also there is no message that IE (6) is accessing JVM, but I don�t know if there has to be one...
    System Windows XP Home with SP1
    Thanks for your reply�s
    Mark Oppedijk
    The Netherlands

  • Cannot get java to give me multiple runtime environments on Vista

    Hi,
    I got Bruce Eckel's book Thinking in Java 4 as I need to learn some java as I am a quantitative geneticist doing a postdoc at Cornell and I am told that I need to learn some java programming. That's cool, so I got Bruce's book. However, he tells me that I need to configure java so that it works with the java development kit. No problem, I learned about the environment variables, got ant downloaded and began to set the whole thing up. The problem is that java, as it is downloaded now on my machine will ONLY let me have one runtime setting, that being C:\Program Files\Java\jre6. This is a problem for TWO reasons. First, the jre6 folder apparently does not have javac, second, tools is located in C:\Program Files\Java\jdk1.6.0_10\lib, however, and I need BOTH to be in the same runtime location. I KNOW with 99.99% certainty that I need to set the path variables to the jre in the java development kit folder location NOT the jre6 folder. When I go into the control panel and click on the java icon and select Java, I am TOLD by the pop-up that I can add a runtime environment. Makes sense to ME! However, when I do a find (just to be sure that java locates the jre for itself) and add it to the applet setting (hey I learned that java application runtime settings automatically change when I add the prior, way COOL!), I press APPLY as I want these new settings, and what happens when the pop-up goes away and I re-click on it. MY APPLIED SETTINGS HAVE DISAPPEARED??? I would REALLY like learn a little java for my job, and Bruce's book is a good start as I program in R, but this is nuts. It's not like I don't know about setting the environment parameters because I learned how to do it. I almost want to copy the tools that I need into the jre6 lib folder along with the javac into the bin folder to get the damn thing to work, but I REALLY don't want to do it if at all possible. There has to be a way to get Vista to allow me to add the location of the JDK jre, that's where javac and the tools are located. I just don't know how to do it. Can someone help me out. Thanks. Sorry about the extended note, but I feel that it was necessary so that the person or person's who reply know EXACTLY my problem so they can tell me what to do. Hey, have a great week. Hope I get a reply soon.
    Tom Parker

    Can someone help me please?

  • Cannot get Java Query API to work

    I am trying to use the ultrasearch java api and am having no luck. I get this error:
    Exception in thread "main" oracle.ultrasearch.query.SearchException: WKG17005: connection failure: Closed Connection
    at oracle.ultrasearch.query.Instance.connect(Instance.java:383)
    at oracle.ultrasearch.query.Instance.getResult(Instance.java:561)
    at oracle.ultrasearch.query.Instance.getResult(Instance.java:725)
    at oracle.ultrasearch.query.Instance.getResult(Instance.java:677)
    at Test.search(Test.java:77)
    at Test.main(Test.java:92)
    Here is my code:
    oracle.ultrasearch.query.Instance searcher=new oracle.ultrasearch.query.Instance();
    Connection conn=getConnection();
    try {
    searcher.setConnection(conn);
    searcher.setInstanceName("ULTRASEARCH_DOTORG");
    oracle.ultrasearch.query.Request searchRequest=new oracle.ultrasearch.query.Request();
    oracle.ultrasearch.query.Query searchQuery=new oracle.ultrasearch.query.Contains("water", searcher.getMetaData());
    searchRequest.setQuery(searchQuery);
    oracle.ultrasearch.query.Result searchResults=searcher.getResult(searchRequest);
    } finally {
    conn.close();
    Note that "getConnection()" is using the standard OracleDataSource class supplied with the current 10g driver; I've used it to connect to other oracle databases without trouble. I am working within a standard Windows JDK 1.5 (also tried 1.4.2) environment.
    I've also tried using QueryInstance instead of Instance - exception and code follow:
    Exception in thread "main" oracle.ultrasearch.query.SearchException: WKG17005: connection failure: User credentials doesn't match the existi
    ng ones
    at oracle.ultrasearch.query.Instance.connect(Instance.java:383)
    at oracle.ultrasearch.query.Instance.getMetaData(Instance.java:432)
    at Test.search2(Test.java:89)
    at Test.main(Test.java:94)
    oracle.ultrasearch.query.QueryInstance searcher=new oracle.ultrasearch.query.QueryInstance();
    searcher.setConnectionString(jdbcURL);
    searcher.setUser(jdbcUserName);
    searcher.setPassword(jdbcUserPass);
    searcher.setInstanceName("ULTRASEARCH_DOTORG");
    oracle.ultrasearch.query.Request searchRequest=new oracle.ultrasearch.query.Request();
    oracle.ultrasearch.query.Query searchQuery=new oracle.ultrasearch.query.Contains("water", searcher.getMetaData());
    searchRequest.setQuery(searchQuery);
    oracle.ultrasearch.query.Result searchResults=searcher.getResult(searchRequest);
    Any ideas?

    As always I find the answer right after I post a question....
    This post explained it pretty well:
    Connection Pooling and QueryInstance
    My first example will work as long as I call Instance.setCloseConnection(false). Apparently the second example can only work in OC4J, although I haven't verified such.
    It would be a really good idea for Oracle to get it together and add this information to their JavaDocs.

  • Author       "javax.sound.midi.InvalidMidiDataException: cannot get soundbank from stream" after java update

    Not sure where to post this issue.
    I am noticing this error since I did the Mac update. The Mac update included the java update. Right now the java version is 1.6.0_31. My Mac OS X version is 10.7.3. I am seeing the problem for all the soundfont files that I am trying to load. The error i get is.
    javax.sound.midi.InvalidMidiDataException: cannot get soundbank from stream
         at javax.sound.midi.MidiSystem.getSoundbank(MidiSystem.java:565)
         at myPackage.MyMusicApp.main(MyMusicApp.java:14)
    Below is a small program I built that shows the code.
    package myPackage;
    import java.io.File;
    import javax.sound.midi.*;
    public class MyMusicApp {
        public static void main(String[] args) {
            try {
                Synthesizer synth = MidiSystem.getSynthesizer(); synth.open();
                File f =  new File("/Users/poorav/eclipseGIT/myApp/soundbanks/1247_KitDRY.sf2");
                Soundbank soundbank = MidiSystem.getSoundbank( f);
                synth.loadAllInstruments(soundbank);
            } catch (Exception e)
                e.printStackTrace();
    I am not sure what the previous build of java I was on, but i know that it was a 1.6 version. Any ideas of what could have caused this?
    thanks

    No satisfactory progress!
    I submitted a bug for this using the Apple bug reporter on 9th April (#11208868) and despite asking for an update, it has been completely ignored (even now). I'm not impressed.
    I then issued a (paid for) Developer Technical Support issue which was credited back to my account a few days later with no explanation. When I asked why, I eventually got: "At this time DTS does not provide code-level support for Java"!
    So, Apple are assuming to responsibility for this problem. I realise that Oracle is mostly responsible for Java but Apple took this crippled version (how much testing did they do?) and updated our customers' machines with it. This has effectively disabled a key feature of our product and has cost us damage to our company's reputation. Still Apple don't care and they rely on the fact that we are too small to sue them. You can see I'm not happy! I naively thought Apple would make some attempt to assist their developers.

Maybe you are looking for