Can't open javac

Hello. I'm new to java, but I've been trying for a while to figure out how to compile a .java file. My problem is that I can't open javac.exe. When I double click on the file a black command-line window pops up for a half a second, displays a bunch of text, and then closes before I have a chance to read it or take any action. I've tried to open javac.exe from the shell by typeing >start 'c:\etc\javac.exe' but this does nothing. (note: I have no experience in a command line/shell environment.)
I'm sure I'm just doing something wronge, but I can't figure out what it is, or how I'm supposed to access javac.exe (is it accessed by another program I'm supposed to be using?).
Thanks in advance.

First of all, let me know the version of the JDK or J2SDK u've installed.
There'll b a 'bin' folder inside the java installation folder. All the executables are placed over ther. You need to include that folder in your path. For this, right click on MyComputer--> go to Properties--> Advanced tab --> Environment Variables --> either in system variables or in the user variables, create a new variable with name "path" ( if not exists already) --> and give the full path of 'bin', and click ok.
For ex: in my case it is path = D:\j2sdk1.4.1_02\bin
Then open command prompt ( start --> run--> cmd). Then type javac. If it gives the usage, it means that it recognized the javac, else you missed something.
Then go to the location of your java file, and type javac filename.java. It compiles the file and generates .class files for all the classes.
Then you can execute the class as, java filename
Ex : D:\>javac test.java
D:\>java test
Hope this helps ...
If you are using Textpad or EditPlus, sometimes we have to explicitely configure this, ie we need to explicitly point to these .exe files.
Sriram.

Similar Messages

  • Java Code file 1 meg... Can't open it

    Hi All,
    I've just started using SJSE and have run into a couple of issues. First problem is that I can't open my java source file. Second issue is I can't get the ide to run my applet. It just displays a small box and that's it. Everything worked great in V7. Below is the output with respect to the opening of the source file.
    java.lang.NullPointerException
         at org.netbeans.modules.javanavigation.actions.OpenAction.selectElementInPane(OpenAction.java:187)
         at org.netbeans.modules.javanavigation.actions.OpenAction.access$000(OpenAction.java:56)
    [catch] at org.netbeans.modules.javanavigation.actions.OpenAction$1.run(OpenAction.java:129)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

    Yes it only happens with large files. I have set the following in the jstudio.conf file.
    netbeans_default_options="-J-Xms512m -J-Xmx512m -J-XX:PermSize=128m -J-XX:MaxPermSize=256m -J-Dnetbeans.logger.console=true -J-ea -J-Dsun.java2d.pmoffscreen=false -J-Dcom.sun.im.service.xmpp.session.keepaliveinterval=30 -J-Dcom.sun.aas.installRoot=\"K:\Program Files\Sun\jstudio_ent8\AppServ8.1UR2\""
    Also, when building my sources I get another 'bug report' message.
    An exception has occurred in the compiler (1.5.0_04). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
    com.sun.tools.javac.code.Symbol$CompletionFailure: file javax\servlet\ServletContext.class not found

  • Can not open, view inbox in godaddy web mail

    I have been using godaddy webmail for awhile - one day I tried to view my emails and I could not. I can't open them or reply to them or even highlight "inbox". I have avg - they disabled the firewall and viris protection but the problem prosisted. I called godaddy, the ran a check of their system and said it's working properly and it was a problem with my browser. I am able to compose and send emails if I type in a address.

    That worked fine in Firefox after Comcast instituted that Xfinity interface last spring, then they fixed something else and broke that for some Firefox users. Connect Lite still works fine.
    Using IE, once you're in the full email page open Preferences -> General in the Xfinity menu header and select Xfinity Connect Lite. Then try it in Firefox.
    Or, click on the first new email on the preview page, and when you're done with it click on the Inbox link in the Nav Menu in the left column to get your complete Inbox.

  • Can i open and edit animated GIF in Adobe Photoshop Touch?

    Can i open and edit animated GIF in Adobe Photoshop Touch?

    No, only regular static GIF images are supported. The desktop version of Photoshop does support this however.

  • Pages downloaded, but I still can't open iCloud pages from iPad. Says that I need a new version of Pages on my Mac

    For my Mac Pro, after I downloaded the new Mavericks OS, I downloaded the new pages. However, I still can't open iCloud pages from iPad. Says that I need a new version of Pages on my Mac.
    Please help.

    It appears that you are launching the old version, probably using an icon in your Dock. That icon is an alias & is not updated. You will need to go to your Applications folder & find the new Pages 5 icon & double-click it. Once it is launched, you can right-click on the icon & choose Options > keep in Dock from the contextual menu.

  • Can't open pages from iCloud

    Pages 5.2 OSX 10.9.2.
    It's the 2 time I have this problem. Trying to open a pages document from iCloud. Message; can't open file "filename.pages". If i download pages can open the document. If i load it on iCloud it can't be opened. Some pollution in the cloud?I can open all documents in iCloud pages.
    Screenshot in swedish. // Roland

    Well I sort of solved the problem all by myself. Just restarted my Mac // Roland

  • Vi error on nfs mount; E212: Can't open file for writing

    Hi all,
    I've setup a umask of 0 for testing on both NFS client (Centos 5.2) and NFS server (OSX 10.5.5 server).
    I can create files as one user and edit/save out as another user w/o issue when directly logged into the server via ARD.
    However, when I attempt the same from an NFS mount on a client machine, even as root I get the following error using vi;
    "file" E212: Can't open file for writing
    Looking at the system.log file on the server, I see;
    kernel[0]: add_fsevent: no name hard-link! dropping the event. (event 2 vp == 0xa5db510 (-UNKNOWN-FILE)).
    This baffles me. My umask is 0 meaning files I create and attempt to edit as other users are 777, but I cannot save out edits unless I do a wq! in vi. At that point, the owner of the file changes to whomever did the vi.
    This isn't just a vi issue as it happens using any editor, but I like to use vi.
    Any help is greatly appreciated. Hey, beer is on me!

    Hi all,
    Thanks for the replies
    I've narrowed it down to a Centos client issue.
    Everything works fine using other Linux based OS's as clients.
    Since we have such a huge investment in Centos, I must figure out a workaround. Apple support wasn't much help as usual however they were very nice.
    There usual response is "its unsupported".
    If Apple really wants to play in the enterprise of business space, they really need to change there philosophy. I mean telling me that I shouldn't mount home directories via NFS is completely rediculus.
    What am I supposed to use then, Samba of AFP? No, I don't think so. No offense to Microsoft but why would I use a Windows based file sharing protocol to mount network shares in a Nix env???

  • Process.start("winword", filename) can not open file with space in the path and name

    Hi,
    I am trying to write a class which can open file with selected application. for simplicity, now I just hard code the varaibles.
    the problem: if the path or file name has space in it, even it exist, winword still can not open it.
    could someone kindly show me what I did wrong and how to do it properly.
    Thanks in advance.
    Belinda
    public static class FileOpen
    public static void info()
    string path = @"c:\a temp folder\aaa 1.txt";
    if (File.Exists(path))
        // the file I am using in the sample does exist
         MsgBox.info("yes");
    else
         MsgBox.info("no");
    // working
    //Process.Start("winword", "c:\\aaa.txt");
    // not working
    //Process.Start("winword", "c:\aaa.txt");
    // not working
    Process.Start("winword", "c:\\a temp folder\\aaa 1.txt");
    // not working
    Process.Start("winword", path);

    string AppPath;
    AppPath = ReadRegistry(Registry.CurrentUser, "Software\\FabricStudio", "TARGETDIR", value).ToString() + @"help";
    string FileName = "'"+ AppPath + "\\ImageSamples.doc" + "'";
    try
    System.Diagnostics.Process.Start("Winword.exe", FileName);
    can any body please help for this.
    where i am making mistake?

  • I need help to find and open a job app that I exported, was able to fill out and sign and saved and now can't open it? What did I do wrong?

    I need help to find and open a job app that I exported, was able to fill out and sign and saved and now can't open it? What did I do wrong?

    What file format did you export it to?

  • I have tried to reinstall firefox a number of times but it can't open - it repeatedly crashes? whats the deal? (MBPro)

    Mac OSX 10.6.6
    Can't seem to install firefox....worked originally but then started crashing all the time. Now I can't open it at all, have tried deleting all firefox files and re-downloading...nothing works/ Thoughts?
    This in the crash info report when I try to open it:
    Add-ons: {23fcfd51-4958-4f00-80a3-ae97e717ed8b}:2.1.0.900,{6904342A-8307-11DF-A508-4AE2DFD72085}:2.1.0.900,{972ce4c6-7e08-4474-a285-3208198ce6fd}:3.6.15
    BuildID: 20110303024001
    CrashTime: 1299265519
    EMCheckCompatibility: true
    FramePoisonBase: 00000000f0dea000
    FramePoisonSize: 4096
    InstallTime: 1299264996
    ProductName: Firefox
    ReleaseChannel: release
    SecondsSinceLastCrash: 372
    StartupTime: 1299265517
    Theme: classic/1.0
    Throttleable: 1
    Vendor: Mozilla
    Version: 3.6.15
    This report also contains technical information about the state of the application when it crashed.

    try opening in safe mode

  • I have recently purchased MacBook Pro with Mac OSX 10.7.3 Lion and I would like to install Final Cut Pro 6 Studio2, and it came up with this error: 'you can't open application FinalCutProStudio.mpkg because PowerPc apps are no longer supported..pls advise

    I have recently purchased MacBook Pro with Mac OSX 10.7.3 Lion and I would like to install Final Cut Pro 6 Studio2, and it came up with this error: 'you can't open application FinalCutProStudio.mpkg because PowerPc apps are no longer supported......Is there a way to run FCP6 on lion withoput this error? Any help would be appreciated.....

    Hi Shane,
    Just one more quesiton re: this topic, I am looking to get rosetta but do not have Leopard or Snow Leopard...
    I read that it is not on Snow Leopard only on Leopard....so do I need to get only Leopard? Can u advise?
    Alternatively I do have Mac OS X Tiger so is it on this and can I install it from here?
    Please excuse my lack of knowledge here, just trying to get my FCP 6 up and running asap....
    Best Rgds.

  • After upgrading to iOS 8 I can not open iTunes and iTunes store. Furthermore I cannot even update my app like Facebook etc

    I Upgraded my iPad mini with retina screen 16 GB to iOS 8. I'm facing weird issues..i can't open iTunes , itunes store and can't upgrade app which I have downloaded..furthermore my iPad became slow..I don't understand what to do...please help me

    Hey ahmedfromtanta,
    Thanks for the question. After reviewing your post, it sounds like trouble with Wi-Fi. I would recommend that you read this article, it may be able to help you resolve or isolate the issue.
    iOS: Troubleshooting Wi-Fi networks and connections
    Thanks for using Apple Support Communities.
    Have a nice day,
    Mario

  • Can't Open iBookm Preview, App Store and other apps after upgrading to mavericks. PELASE HELP!

    Well,
    I Can't open several apps, as for example, iBooks, Preview, or App Store!
    I can't read pdf's or open books, cant's see images or anything that uses preview app.
    Can't go to App Store to look for any available update.
    Please help!

    First attempt a clean install...
    http://mashable.com/2013/10/23/clean-install-os-x-mavericks/
    If this doesn't work, which it didn't in my case, then download
    Pacifist.
    http://www.charlessoft.com/
    You will need a copy of the Maverick installer.
    Use Pacificst to " Open Apple Intallers"
    The go to Contents of Mavericks->Contents of EssentialSystemSoftware->Contents of Essentials.pkg->Applications
    Then Click on the programs that don't seem to be working and insall. This helped me update certain applications that weren't working such as App Store, Font Book, Mail, and any others.

  • Can't open my photo library after upgrading to iPhoto 11.  is it possible to load iPhoto 9.0.1 after loading 11?  have followed all other instructions but it still won't let me open iPhoto.

    can't open my photo library after upgrading to iphoto 11.  Is it possible to download iphoto 9.0.1 after installing '11.  Have followed all the other instructions and am in a loop which doesn't allow me to access iphoto or my photos.

    when iphoto wouldnt open we read the trouble shooting info and it said that we may have needed to download 9.0.1 if we had an older version.  We obviously didn't download it before the upgrade and wondered if it would cause problems or indeed solve the problem if we downloaded it now!
    When we try to open iphoto is says:
    To open your library with this version of iphoto it first needs to be prepared
    To prepare the library use the iphoto library upgrader available from Apple.
    We have downloaded this twice now and it still sends us this message when we try to open iphoto. 

  • A Copy of Firefox is already open. Only one copy of Firefox can be open at a time

    I have shut down my mac for half a dozen times in response to the warning -- A Copy of Firefox is already open. Only one copy of Firefox can be open at a time -- that comes up each time I attempt to launch the browser. I have tried out the solutions suggested for previous users (on the Mozilla Forum) who were experiencing similar issues, but I can't even see Firefox on my Mac's Activity Monitor. What's going on?
    I started experiencing this problem out of the blue on a networked computer two days ago (on Tuesday December 6). I have been using computers on this network for more than a year and it's only now that I have started experiencing this problem. Furthermore, I have been a Firefox user for more than four years and never encountered this issue. It's frustrating considering I have come to rely on Firefox as my browser of choice.
    Other than this background I don't know what else to tell you by way of details.

    Hi Swarnava,
    Thanks for your prompt response. Intriguingly, when I logged on to my Mac (it's on a university network) this morning and launched Firefox it opened without a problem. If the issue resurfaces, I will try out the solutions you posted. Judging from the experiences of users who successfully trouble-shot their issues, apparently, Madakkadam's solution would be most helpful.
    All the best.
    Vukoni

Maybe you are looking for

  • UD for a Material in HU-Storage location

    Hi Gurus, I have situation where Stock posting tab is not coming while doing the UD for a material Process flow is below: 1. Creation/Release of Process - Inspection lot get created since early lot creation status REL CALC 2. GR of Process Order is d

  • IPhone charging problem please help

    ok me and my fiance switched to at&t 3 days ago, we have a total of 4 lines on the account, 3 iphone 3g and just a cheap other phone. The iPhones went to myself, my fiance, and my mother. As soon as i got home i obviously started exploring my new pho

  • Having problems downloading an iBook

    I hope someone can help I have downloaded the 2nd edition of fifty shades of grey and I have a message saying there is an error I have paid for it and cant read it it's so frustrating, please help

  • Conversion Oracle data into query

    Hi everyone, I've 1000 records in my table. Now i want to create the same table in another database. If i have script to create and insert all values, i can very easily execute it. How to generate script for the Oracle table which contains 1000 recor

  • The click wheel is not working

    my click wheel is not working, i cannot select my music because i cant change it..... can you guys help me !!!!!!!!!!