No java file in application folder

After most recent update of Java, the Java does not work.  Looked for Preference file in application file and there is not one.  What do I do?

Applications > Utilities > java Preferences.
http://support.apple.com/kb/DL1572 Gives you an idea what the update did if it was 2012-006
However, I understood there was a later one than that which removed Java SE6 altogether and provided a redirect to Oracle's website to download the latest Java 7 version.
Can't find that one on Support Downloads now?

Similar Messages

  • Delete locked file from /Applications folder

    Hi there
    I used Clean My Mac to remove a file install - something I have done many times without any problems.
    This time though the application file was left behind in the /Applications folder and I am unable to move it to the Trash because it is locked.
    I have tried the following
    sudo chflags nouchg /Applications/CrashPlan.app
    This however does not resolve the issue and I am still unable to move the file to Trash - it does not remove the locked flag
    Does anyone have any other ideas or suggestions how to remove the file?

    Hi WIlliam
    I tried what you said but I get an unexpected result...
    Johns-Mac-Pro:~ John$ sudo rm -r /Applications/CrashPlan.app
    Password:
    rm: /Applications/CrashPlan.app/Contents: Operation not permitted
    override rwxrwxr-x  root/admin schg for /Applications/CrashPlan.app?
    I'm not sure how to respond to the question it is asking. I tried keying in Y but the response was
    override rwxrwxr-x  root/admin schg for /Applications/CrashPlan.app? y
    rm: /Applications/CrashPlan.app: Operation not permitted
    Johns-Mac-Pro:~ John$

  • Strange file in Applications folder, placeholder.txt

    Saw this file today, placeholder.txt, this file wasn't here before, it is in my Applications folder and on the dock as well, with contents (copy pasted):
    Placeholder to make sure directory gets created during a synch
    File creation date January 16, 2010 7:43 AM
    I don't have any backups or even a Mac back then. Was this added during 10.7.2, do you have this too? I'm just going to delete it.

    It's not in 10.7.2 only, I have 10.6.8, and it's there too. If you delete it, it reappears. Somepeople suggest it's from adobe digital editions.

  • Guide file in Applications Folder

    I am trying to clean out old software and such from my computer. There is a file in the Applications folder called Guide with a bunch of html items in it. What is this and can I delete it? So much came over from the old computer that I am sure is not necessary in Snow Leopard.
    Thanks

    Judy,
    I think it would  be safe to get rid of it. 

  • No files in applications folder after installing yosemite

    Problem description:
    After installing yosemite on MBP (early 2011) the applications folder is empty. How do I get them Back? Further the fan is blowing all the time and the MBP gets very warm.
    EtreCheck version: 2.0.6 (91)
    Report generated 25 oktober 2014 16:29:46 CEST
    Hardware Information: ℹ️
      MacBook Pro (13-inch, Early 2011) (Verified)
      MacBook Pro - model: MacBookPro8,1
      1 2.7 GHz Intel Core i7 CPU: 2-core
      8 GB RAM Upgradeable
      BANK 0/DIMM0
      4 GB DDR3 1333 MHz ok
      BANK 1/DIMM0
      4 GB DDR3 1333 MHz ok
      Bluetooth: Old - Handoff/Airdrop2 not supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      Intel HD Graphics 3000 - VRAM: 512 MB
      Color LCD 1280 x 800
    System Software: ℹ️
      OS X 10.10 (14A389) - Uptime: 0:36:19
    Disk Information: ℹ️
      Hitachi HTS545050B9A302 disk0 : (500,11 GB)
      S.M.A.R.T. Status: Verified
      EFI (disk0s1) <not mounted> : 210 MB
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      Macintosh HD (disk1) /  [Startup]: 498.88 GB (167.91 GB free)
      Core Storage: disk0s2 499.25 GB Online
      MATSHITADVD-R   UJ-898 
    USB Information: ℹ️
      Apple Inc. FaceTime HD Camera (Built-in)
      Apple Inc. BRCM2070 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Computer, Inc. IR Receiver
    Thunderbolt Information: ℹ️
      Apple Inc. thunderbolt_bus
    Gatekeeper: ℹ️
      Mac App Store and identified developers
    Kernel Extensions: ℹ️
      /System/Library/Extensions
      [loaded] VirtualAudioDriver (1 - SDK 10.6)
      [not loaded] com.ZTE.driver.ZTEUSBCDCACMControl (1.1.2) Support
      [not loaded] com.ZTE.driver.ZTEUSBCDCACMData (1.1.2) Support
      [not loaded] com.wacom.kext.pentablet (5.2.1) Support
      [not loaded] com.wacom.kext.wacomtablet (6.3.6b6 - SDK 10.8) Support
      [not loaded] net.osculator.driver.OSCulatorIOKit (1.2.2) Support
    Launch Agents: ℹ️
      [loaded] com.adobe.CS4ServiceManager.plist Support
      [loaded] com.google.keystone.agent.plist Support
    Launch Daemons: ℹ️
      [loaded] com.adobe.fpsaud.plist Support
      [loaded] com.adobe.versioncueCS4.plist Support
      [loaded] com.google.keystone.daemon.plist Support
      [loaded] com.macpaw.CleanMyMac2.Agent.plist Support
    User Launch Agents: ℹ️
      [loaded] com.adobe.ARM.[...].plist Support
      [invalid?] com.citrixonline.GoToMeeting.G2MUpdate.plist Support
      [loaded] com.divx.agent.postinstall.plist Support
      [loaded] com.macpaw.CleanMyMac2Helper.diskSpaceWatcher.plist Support
      [loaded] com.macpaw.CleanMyMac2Helper.scheduledScan.plist Support
      [loaded] com.macpaw.CleanMyMac2Helper.trashWatcher.plist Support
    User Login Items: ℹ️
      Dropbox Application (/Applications/Dropbox.app)
      Google Drive Application (/Applications/Google Drive.app)
      Google Chrome ApplicationHidden (/Applications/Google Chrome.app)
      FontExplorerXAutoload ApplicationHidden (/Users/[redacted]/Library/Application Support/Linotype/FontExplorer X/FontExplorerXAutoload.app)
      EvernoteHelper Application (/Users/[redacted]/.Trash/Evernote (450845).app/Contents/Library/LoginItems/EvernoteHelper.app)
    Internet Plug-ins: ℹ️
      o1dbrowserplugin: Version: 5.4.2.18903 Support
      WacomNetscape: Version: 2.1.0-1 - SDK 10.8 Support
      Google Earth Web Plug-in: Version: 6.0 Support
      Default Browser: Version: 600 - SDK 10.10
      OVSHelper: Version: 1.1 Support
      WacomTabletPlugin: Version: WacomTabletPlugin 2.1.0.2 Support
      Silverlight: Version: 5.1.30514.0 - SDK 10.6 Support
      FlashPlayer-10.6: Version: 15.0.0.189 - SDK 10.6 Support
      DivXBrowserPlugin: Version: 2.2 Support
      WidevineMediaOptimizer: Version: 6.0.0.12757 - SDK 10.7 Support
      Flash Player: Version: 15.0.0.189 - SDK 10.6 Support
      Gears: Version: 1.0 Support
      CitrixICAClientPlugIn: Version: 11.2.0 Support
      googletalkbrowserplugin: Version: 5.4.2.18903 Support
      AdobePDFViewer: Version: 9.5.5 Support
      iPhotoPhotocast: Version: 6.0
      QuickTime Plugin: Version: 7.7.3
      JavaAppletPlugin: Version: 15.0.0 - SDK 10.10 Check version
    User Internet Plug-ins: ℹ️
      CitrixOnlineWebDeploymentPlugin: Version: 1.0.105 Support
      WebEx: Version: 1.0 Support
    Safari Extensions: ℹ️
      AdBlock
      Pinterest
    3rd Party Preference Panes: ℹ️
      Adobe Version Cue CS4  Support
      DivX  Support
      Flash Player  Support
    Time Machine: ℹ️
      Skip System Files: NO
      Mobile backups: ON
      Auto backup: YES
      Destinations:
      WD 3T [Local]
      Total size: 3 TB
      Total number of backups: 52
      Oldest backup: 2013-05-25 18:11:16 +0000
      Last backup: 2014-10-24 11:12:27 +0000
      Size of backup disk: Excellent
      Backup size 3 TB > (Disk size 0 B X 3)
    Top Processes by CPU: ℹ️
        100% Finder
          99% Dock
          89% mds
          68% Spotlight
          1% Google Chrome
    Top Processes by Memory: ℹ️
      180 MB Finder
      163 MB Google Chrome
      120 MB WindowServer
      112 MB Spotlight
      112 MB com.apple.preferences.icloud.remoteservice
    Virtual Memory Information: ℹ️
      1.43 GB Free RAM
      3.57 GB Active RAM
      2.15 GB Inactive RAM
      1.43 GB Wired RAM
      2.02 GB Page-ins
      33 KB Page-outs

    sorry, this took a while, here it is:
    Christofs-MacBook-Pro-2:~ christofzurn$  chown -R :staff ~/
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /Girl and Snowcone.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /Happy Girls.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /stone_marble_barA_flat-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /stone_marble_barA_grad-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /stone_marble_barB_flat-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /stone_marble_barB_grad-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /stone_marble_barC_flat-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /stone_marble_barC_grad-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /stone_marble_barD_flat-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /stone_marble_barD_grad-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /stone_marble_barE_flat-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /stone_marble_barE_grad-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /stone_marble_barF_flat-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /stone_marble_barF_grad-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /tile_paper_blue.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /tile_paper_gray.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /tile_paper_green.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /tile_paper_purple.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /tile_paper_red.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/evaluatie_visuals.key/theme-files /tile_paper_yellow.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/Girl and Snowcone.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/Happy Girls.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/stone_marble_barA_flat-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/stone_marble_barA_grad-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/stone_marble_barB_flat-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/stone_marble_barB_grad-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/stone_marble_barC_flat-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/stone_marble_barC_grad-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/stone_marble_barD_flat-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/stone_marble_barD_grad-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/stone_marble_barE_flat-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/stone_marble_barE_grad-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/stone_marble_barF_flat-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/stone_marble_barF_grad-Layer0Image.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/tile_paper_blue.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/tile_paper_gray.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/tile_paper_green.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/tile_paper_purple.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/tile_paper_red.jpg: Operation not permitted
    chown: /Users/christofzurn//Documents/CCCZ_Projects/zzz___non active _done/Philips Design/3_Documents/Assessment_Evaluation/_old/Pictures_FE_Philips.key/theme-fil es/tile_paper_yellow.jpg: Operation not permitted

  • Is it necessary to put .java file in 'bin' folder

    when ever i am creating a .java file i have to put that in bin folder then only javac compiling the file.
    otherwise its not compiling the file.
    how can i compile my java file by putting in any folder of mine?
    even if i am creating any folder inside the bin folder then also its not compiling my .java file.

    when ever i am creating a .java file i have to put
    that in bin folder then only javac compiling the
    file.That's a huge mistake. You should never do that.
    otherwise its not compiling the file.
    how can i compile my java file by putting in any
    folder of mine?Add the Java /bin directory to your PATH so the operating system can find the javac.exe and java.exe apps.
    even if i am creating any folder inside the bin
    folder then also its not compiling my .java file.Then you've got a bigger problem. You must have compiler errors that you need to read and fix in your source code.
    %

  • Changing multiple file permissions - Applications folder

    After using migration assistant in Snow Leopard and then changing the username of my primary user, all third party apps in my Applications folder require me to enter the admin password when moving, updating with Sparkle, etc. They don't seem to have a primary owner.
    I saw the steps outlined here: http://discussions.apple.com/thread.jspa?threadID=1778969 for changing permissions on multiple files but I'm wary of doing this on the Applications folder.
    Does anyone have any advice on how to fix this? I went through files individually and i'm still getting messed up permissions all over the place. Thanks!

    DO NOT use "apply to enclosed items" on the main Applications folder! Do not use it on any system created folders. they often have hidden ACLs and using this button would propagate the ACLs to everything inside. this is the case for the main Applications folder. there is no easy way to do what you want because Apple changed the permissions structure in Snow leopard and the default applications no longer have read+write access by admin users by default. I would suggest you don't mess with permissions on Applications. if you ever need to update a 3rd party application simply delete the existing copy in /Applications and put the new one in. it will have correct permissions.

  • Help, moved folders & files to Applications folder accidentally!

    Hi guys,
    Need help here. Accidentally moved some non-app (music) files to the Applications folder, thinking it was an iTunes window :s
    Embarrassing, I know. But now each time I try to drag them back into where they were, they end up showing as aliases to the files in their initial location, with the accidentally-copied ones still in the Applications folder!
    What can I do to restore their original location? Just FYI - Cmd + Z doesn't work, nor does Undo (it's, actually, unavailable). Is there anything I can do, or am I basically stuck with a dozen music folders inbetween my apps, unless I decide to delete and redownload them? (Oh yeah, I can't move them anywhere except Trashing them).
    Many thanks!
    Best,
    Dynamitri

    OK, well, I found a way around this - archived the folders/files within the Applications folder, and then unpacked the archive to the initial location of the files, where they were before I moved them by accident. Did the job.
    Still, would be good to know if there is any other way to do this (for future reference, just as this post is). Thank you!

  • Placing java file in src folder

    hi my dear friends,
         i am new to webdynpro , but i did some sample examples
        ok fine,,, but i want to create xxx.java file . how to create that file
       in src package how to place that .java file
      please help me
    thanks,
    tony

    hi Naga
        Thanks for giving valuable information
         my problem is solved
    thanks

  • How to create interfaces or .java files to application modules,entites

    How did you create ToyStoreService.Java Interface in ToyStore sample application.Can you please explain in detail.
    urgent, pl help with any material if you know..

    I am following the same directory structure as of ToyStore demo for controller and View.
    I am getting page not available error.
    I did like this,
    d:
    MyWorkSpace
    Controller
    struts_config.xml
    /xx -- which forward to b.jsp
    View
    webroot
    JSP
    a.jsp
    b.jsp
    can you please give me one concrete procedure for implementing this..
    I mean how maintain these files and how to set the root path in project setting etC..
    Big job.. But it helps me a lot, Please do the big job.
    Thanks in advance.

  • Mavericks doesn't ask for password when copying files into applications folder (e.g. installing plugins for After Effects)

    For example, when i was copied a plugin for after effects into the plugins folder, finder asked me for my password and now it doesn't. I can just copy it directly without any authentication.

    Do you have Service Pack 1 for Windows 7? It's listed in the system requirements for CC 2014. If you don't have SP1, AE won't run.
    That GPU sniffer error message is usually what happens. This should be a simple fix! Of course, you should always take the normal precautions when updating an OS, but still...

  • Need help with simple file sharing application

    I have an assignment to build a Java File Sharing application. Since I'm relatively new to programming, this is not gonna be an easy task for me.
    Therefore I was wondering if there are people willing to help me in the next few days. I will ask questions in this thread, there will be loads of them.
    I already have something done but I'm not nearly halfway finished.
    Is there a code example of a simple file sharing application somewhere? I didn't manage to find it.
    More-less, this is what it needs to contain:
    -client/server communication (almost over)
    -file sending (upload, download)
    -file search function (almost over)
    -GUI of an application.
    GUI is something I will do at the end, hopefully.
    I hope someone will help me. Cheers
    One more thing, I'm not asking for anyone to do my homework. I will only be needing some help in the various steps of building an application.
    As I said code examples are most welcome.
    This is what I have done so far
    Server:
    package ToJeTo;
    import java.io.*;
    import java.net.*;
    public class MultiServer {
        public static ServerSocket serverskiSoket;
        public static int PORT = 1233;
        public static void main(String[] args) throws IOException {
            try {
                serverskiSoket = new ServerSocket(PORT);
            }catch (IOException e) {
                System.out.println("Connection impossible");
                System.exit(1);
            do {
                Socket client = serverskiSoket.accept();
                System.out.println("accepted");
                ClientHandler handler = new ClientHandler(client);
                handler.start();
            } while(true);
    }Client:
    package ToJeTo;
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.net.*;
    import java.util.Scanner;
    public class MultiClient {
        public static InetAddress host;
        public static int PORT = 1233;
        public static void main(String[] args) {
            try {
                host = InetAddress.getLocalHost();
            }catch (UnknownHostException uhe) {
                System.out.println("Error!");
                System.exit(1);
            sendMessages();
        private static void sendMessages() {
            Socket soket = null;
            try {
                soket = new Socket(host, PORT);
                Scanner networkInput = new Scanner(soket.getInputStream());
                PrintWriter networkOutput = new PrintWriter(soket.getOutputStream(), true);
                Scanner unos = new Scanner(System.in);
                String message, response;
                do {
                    System.out.println("Enter message");
                    message = unos.nextLine();
                    networkOutput.println(message);
                    response = networkInput.nextLine();
                    System.out.println("Server: " + response);
                }while (!message.equals("QUIT"));
            } catch (IOException e) {
                e.printStackTrace();
            finally {
                try{
                    System.out.println("Closing..");
                    soket.close();
                } catch (IOException e) {
                    System.out.println("Impossible to disconnect!");
                    System.exit(1);
    }ClientHandler:
    package ToJeTo;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    public class ClientHandler extends Thread {
        private Socket client;
        private Scanner input;
        private PrintWriter output;
        public ClientHandler(Socket serverskiSoket) {
            client = serverskiSoket;
            try {
            input = new Scanner(client.getInputStream());
            output = new PrintWriter(client.getOutputStream(), true);
            } catch (IOException e) {
                e.printStackTrace();
            public void run() {
                String received;
                do {
                received = input.nextLine();
                output.println("Reply: " + received);
                } while (!received.equals("QUIT"));
                try {
                    if (client != null)
                        System.out.println("Closing the connection...");
                        client.close();
                }catch (IOException e) {
                    System.out.println("Error!");
    }Those three classes are simple client server multi-threaded connection.

    Now the other part that contains the search function looks like this:
    package ToJeTo;
    import java.io.*;
    import java.util.*;
    public class User {
        String nickname;
        String ipAddress;
        static ArrayList<String> listOfFiles = new ArrayList<String>();
        File sharedFolder;
        String fileLocation;
        public User(String nickname, String ipAddress, String fileLocation) {
            this.nickname = nickname.toLowerCase();
            this.ipAddress = ipAddress;
            sharedFolder = new File(fileLocation);
            File[] files = sharedFolder.listFiles();
            for (int i = 0; i < files.length; i++) {
                listOfFiles.add(i, files.toString().substring(fileLocation.length()+1));
    public static void showTheList() {
    for (int i = 0; i < listOfFiles.size(); i++) {
    System.out.println(listOfFiles.get(i).toString());
    @Override
    public String toString() {
    return nickname + " " + ipAddress;
    User Manager:
    package ToJeTo;
    import java.io.*;
    import java.util.*;
    class UserManager {
        static ArrayList<User> allTheUsers = new ArrayList<User>();;
        public static void addUser(User newUser) {
            allTheUsers.add(newUser);
        public static void showAndStoreTheListOfUsers() throws FileNotFoundException, IOException {
            BufferedWriter out = new BufferedWriter(new FileWriter("List Of Users.txt"));
            for (int i = 0; i < allTheUsers.size(); i++) {
                    System.out.println(allTheUsers.get(i));
                    out.write(allTheUsers.get(i).toString());
                    out.newLine();
            out.close();
    }Request For File
    package ToJeTo;
    import java.util.*;
    public class RequestForFile {
        static ArrayList<String> listOfUsersWithFile = new ArrayList<String>();
        Scanner input;
        String fileName;
        public RequestForFile() {
            System.out.println("Type the wanted filename here: ");
            input = new Scanner(System.in);
            fileName = input.nextLine();
            for (User u : UserManager.allTheUsers) {
                for (String str : User.listOfFiles) {
                    if (str.equalsIgnoreCase(fileName))
                        listOfUsersWithFile.add(u.nickname);
        public RequestForFile(String fileName) {
            for (User u : UserManager.allTheUsers) {
                for (String str : User.listOfFiles) {
                    if (str.equalsIgnoreCase(fileName))
                        listOfUsersWithFile.add(u.nickname);
        public static List<String> getAll() {
            for (int i = 0; i < listOfUsersWithFile.size(); i++) {
                //System.out.println("User that has the file: " + listOfUsersWithFile.get(i));
            return listOfUsersWithFile;
    }Now this is the general idea.
    The user logs in with his nickname and ip address. He defines his own shared folder and makes it available for other users that log on to server.
    Now each user has their own list of files from a shared folder. It's an ArrayList.
    User manager class is there to store another list, a list of users that are connected with server.
    When the user is searching for a particular file, he is searching through all the users and their respective files lists. Therefore for each loop inside a for each loop.
    Now the problem is how to connect all that with Client and Server class and put it into one piece.
    GUI should look somewhat like this:

  • Problem in compiling a java file

    hello...
    i placed all my java file in the folder C:\nmt
    and i run the following command to compile it...
    javac -sourcepath C:\nmt testabc.java
    now it showing an error..
    cannot read testabc.java
    javac -sourcepath C:\nmt -d C:\nmt testabc.java
    to produce the output in the C:\nmt folder but it shows the same message...pls tell what worng here??
    sam

    You don't have a testabc.java file in the directory.

  • Java File Missing while import

    Hi,
       When I try to import a project into the workspace, only one java file is missing(showing error : R3View does not exist).
       Before I import the project, the folder contains that java file in gen_wdp folder. but after import, it doesnt. It automatically got deleted. I dint know how it happens. I have taken one copy of that java file. So I have created a new java file(R3View.java) in gen_wdp folder and copied the code. Now it works fine. I have taken this backup folder.
      When I try to import it next time, the same problem exists. Actually the folder contains all the java files before import.
    Why this problem occurs? Kindly help me out.
    Regards,
    Kalai

    Hi,
    As abhilash stated the folder gen_wdp always have generated code based upon web dynpro metadata.
    You cann't contribute code by placing any souce file in this directory. That you have to do in some source directory that is generally "src\packages".
    If you place code in gen_wdp folder and reload the project, do a dc build, or simple project build ....... the file will get deleted.
    Regards,
    Ashwani Kr Sharma

  • Creating .jnlp files from .java files

    Last resort: Ask on the forums. I'm having a lot of trouble creating .jnlp files with only a .java file. For some reason if I do create project, the project does not run correctly, but when I make the file and run the file alone, it works perfectly fine. Most of the tutorials that I have read online ask me to do weird manifest .class stuff (in order to make JAR files, which i have failed to do even after attempting to make one after 3 hours). And still, when it comes to make the .jnlp file, I don't quite understand anything. When putting it on the web, I'm planning not to use php (html is in my mind right now), and I have aborted every single attempt at making the JAR files and whatnot.
    At this point, I'm not asking for anything other than a link to a tutorial that actually works, because all that I have tried (for the JAR files, especially) have been giving me errors. By the way, one really bothersome output that comes up is the "illegal option: j" when I use the Tool for the JAR file, and I have no idea what that means--I google it and find nothing. The .java itself extends JPanel, so it isn't really an applet.
    How to: Run an Applet
    Create an Applet Class by clicking File > New > File > File Type > Java Classes > Applet Class.
    Enter a name and path for the applet and click Finish.
    Build the file by pressing F7.
    Create an Applet HTML file by clicking File > New > File > File Type > Other > HTML Applet.
    Enter a name and path for the applet and click Finish.
    Open the HTML file in JCreator and modify the applet tag to match the name of the applet class.
    Open the Project Settings window and select the HTML file as the Run parameter.
    Click the Run Project button.It isn't really a code, but I tried doing this and the HTML Applet said code = ".class" Again, I don't have a class for the file. And when you do the "File > New > File > File Type > Java Classes > Applet Class," you get the .java file and a folder that says "components, with two classes in it. I was completely befuddled.

    http://forum.java.sun.com/thread.jspa?messageID=9783924

Maybe you are looking for

  • Error on using MyFaces component

    Hy all, I don't know if someone as already tested to work with JSF and MyFaces on its WebAS. In fact I've started by developping a simple JSF page and next I would like to add some sweet component  by using MyFaces and Tomawakh. For the JSF page, no

  • In the trial version of LR5, my NEF images (taken with a Nikon D7100) are not visible

    I downloaded the trial version of LR5, then imported a set of images, shot with my new Nikon D7100, and saved as both JPEG and NEF on the memory card.  When I imported them to LR, the JPEG images are visible but the NEF images are grey squares--altho

  • AC3 Collison detection inside a movie clip (rather than with its bounding box)

    I want to navigate a maze and therefore I want to create collison detection with the maze itself, but when I try the collison is made with the entire maze movieclip, so even if my character is safe in a corridor without touching the walls of the maze

  • Webservice for input data in BW

    With BW 3.5 you can create datasource with webservice (SOAP). How can I develop an html page with input box and a send button for send the data to my Datasource ? Datasource is created without problem and tested with J2EE Tools. Any idea ?

  • Question about ML installation..

    I am still waiting for redemption code, which is fine. My question is... Once I have it how long do I have before I HAVE to use it? Some of the problems I am seeing here are making me a little nervous to install right away! Thanks in advance.