All java files directory

I need to know all java files directory by sample:
/System/Library/Java/Support/CoreDeploy.bundle/Contents/JavaAppletPlugin.plugin
etcetera.
I have deleted them all and i don't rember where those file where located, if i knew i would go to another mac computer and paste them to mine, because since i have delethed them all, i can't open safari, mail or app store and i don't want to reinstall the OS.

FYI.... Here's the quick and dirty, slower than a wet week, ugly, but effective batch script
set TIKE=C:\Java\lib\tikeswing-1.5
set SRC=%TIKE%\src
set LIB=%TIKE%\lib
set CLASSPATH=%LIB%\commons-beanutils.jar;%LIB%\commons-lang-2.0.jar;%LIB%\commons-logging.jar;%LIB%\log4j.jar;.
FOR /R %SRC% %%f IN (*.java) DO javac -d C:\Java\home\classes -cp %CLASSPATH% %%f
@ECHO OFF
REM http://www.robvanderwoude.com/ntfor.html
REM Walks the directory tree rooted at [drive:]path, executing the FOR statement
REM in each directory of the tree. If no directory specification is specified
REM after /R then the current directory is assumed. If set is just a single
REM period (.) character then it will just enumerate the directory tree.I can't figure out how do the equivalent of javac `dir /s /b *.java` (ie: cmd doesn't seem to have a built-in facility for expanding the results of a command into the command line) which would be a lot quicker and cleaner.
Cheers all. Thanx for the help. I appreciate it.

Similar Messages

  • Compile one by one, or all .java-files at once?

    I just wanted to know if i have to, or if i can compile all java-files from a package, at the same time, or if i can compile first one file, and then the next.
    I ask, because till now i only tried java-applets with 1 .java-file...but now i am doing a bigger project, but i just don't get it to work =((...it won't even compile....so i hope u can help me...
    thx, ur Kay

    if i allready compiled something of my package...and i want to use those classes, which allready exist....can i include or import them?....i mean....i only want to compile my main-class again..my main .java-file i mean....do u know how to do that?

  • How to compile ALL java files in OR UNDER a given directory?

    G'Day Folkies,
    At face value, TikeSwing looks like the money shot for enforcing MVC in my version of minesweeper http://forum.java.sun.com/thread.jspa?forumID=54&threadID=5248903
    I'm attempting to build the "Hello World" example which comes with TikeSwing.
    http://www.javaworld.com/javaworld/jw-06-2005/jw-0620-tikeswing.html
    It compiles ok
    C:\Java\lib\tikeswing-1.5\example\src\fi\mmm\hello>javac -d C:\Java\home\classes -cp C:\Java\lib\tikeswing-1.5\src;C:\Java\lib\tikes
    wing-1.5\lib\commons-beanutils.jar;C:\Java\lib\tikeswing-1.5\lib\commons-lang-2.0.jar;C:\Java\lib\tikeswing-1.5\lib\commons-logging.
    jar;C:\Java\lib\tikeswing-1.5\lib\log4j.jar;C:\Java\lib\tikeswing-1.5\example\src;. HelloApplication.java
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    But it doesn't run
    I presume that javac isn't detecting all dependancies, presumably because Tike "decouples M from V from C" using reflections.
    C:\Java\lib\tikeswing-1.5\example\src\fi\mmm\hello>java -cp C:\Java\home\classes;C:\Java\lib\tikeswing-1.5\lib\commons-beanutils.jar
    ;C:\Java\lib\tikeswing-1.5\lib\commons-lang-2.0.jar;C:\Java\lib\tikeswing-1.5\lib\commons-logging.jar;C:\Java\lib\tikeswing-1.5\lib\
    log4j.jar;C:\Java\lib\tikeswing-1.5\example\src;C:\Java\lib\tikeswing-1.5\src;. fi.mmm.hello.HelloApplication
    Exception in thread "main" java.lang.NoClassDefFoundError: fi/mmm/yhteinen/swing/core/component/YFrame
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
            at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at fi.mmm.hello.HelloController.<init>(HelloController.java:8)
            at fi.mmm.hello.HelloApplication.main(HelloApplication.java:8)So, Please, is there a way of telling javac to just build *.java in or under C:\Java\lib\tikeswing-1.5\src\ ... regardless of dependencies?
    Thanking You for any thoughts. Keith.

    FYI.... Here's the quick and dirty, slower than a wet week, ugly, but effective batch script
    set TIKE=C:\Java\lib\tikeswing-1.5
    set SRC=%TIKE%\src
    set LIB=%TIKE%\lib
    set CLASSPATH=%LIB%\commons-beanutils.jar;%LIB%\commons-lang-2.0.jar;%LIB%\commons-logging.jar;%LIB%\log4j.jar;.
    FOR /R %SRC% %%f IN (*.java) DO javac -d C:\Java\home\classes -cp %CLASSPATH% %%f
    @ECHO OFF
    REM http://www.robvanderwoude.com/ntfor.html
    REM Walks the directory tree rooted at [drive:]path, executing the FOR statement
    REM in each directory of the tree. If no directory specification is specified
    REM after /R then the current directory is assumed. If set is just a single
    REM period (.) character then it will just enumerate the directory tree.I can't figure out how do the equivalent of javac `dir /s /b *.java` (ie: cmd doesn't seem to have a built-in facility for expanding the results of a command into the command line) which would be a lot quicker and cleaner.
    Cheers all. Thanx for the help. I appreciate it.

  • Selecting all the files in a directory

    How would i select all the files in a directory, write the info of the files into a new file, and after the end of each file, make a New Line?

    hi zymus,
    check this code u will get the solution for ur problem..
    import java.io.*;
    public class files {
    public static void main(String[] args) {
    File f = new File("c://");// specify ur directory name here
    String[] n = f.list();
    System.out.println("ALL FILES.....");
                   if (n != null)
                             System.out.println("length = " + n.length);
    for (int i = 0; i < n.length; i++) { System.out.println("i = " + n[i]); }
                                  String[] n2 = f.list(new myJavaFileFilter());
                                  System.out.println("ALL JAVA FILES.....");
                                  if (n2 != null)
                                       System.out.println("length = " + n2.length);
    for (int i = 0; i < n2.length; i++)
         System.out.println("the files are::::::::: " + n2);
    class myJavaFileFilter implements FilenameFilter
    public boolean accept(File dir, String name)
         if (name.indexOf(".pdf") > 0)// give the file extension what u want
         return true;
    return false;

  • Reading Java files from a EAR file

    I want to read all Java files from a EAR file and from inner (inside EAR) EAR or WAR file with out unpacking.
    suppose "Demo.ear" contaions the following files:
    abc.java
    programs / a.java
    programs / b.java
    src / index.java
    src / com / myFolder / main.java
    src.war
    and suppose "src.war" again contains some java files inside differenet folders.
    The main problem is that i can read all java files from "Demo.ear" but unable to reading from "src.war" b'coz my program is using JarFile class constructor which needs a archive file path, So only top level archive having the path but not the inner archives.
    So, pls help me out to this problems
    Thanks in advance

    Maybe you can use java.util.zip.ZipInputStream to
    open the Ear and recursively to open the files in
    it; I'm not sure whether this will result in a full
    unpacking of the file in some temporary directory,
    though.
    Please let me know if it worked the way you wanted,
    I'm curious about it.This jerk just created the third thread about the same topic, because he didn't understand your suggestion, which I already provided earlier.
    http://forum.java.sun.com/thread.jspa?threadID=790015

  • How to open java files in a java project

    hi ,
    i have to implement a java program analyzer and now i have implement a java parser using javaCC. My parser parse a java file at a time and i have to read and parse all java files in a java project. my idea is to enter
    java project name *.jpx as an input and search java files in project and parse them one by one, or , to enter the folder path of java source files of project and parse them.
    i am a beginer of java language and i don't know where to start to do it.
    is there someone tell me which way is easier and better for my case and some ways to implement it. i search sample files that is similar to my case but i cannot find any.
    thanks in advance.
    ami

    if u don't mind , can u tell me which tutorial i
    should read for that? http://java.sun.com/docs/books/tutorial/essential/io/
    This... for example.
    xH4x0r

  • .java files appear double spaced in Jdeveloper IDE.

    After checking for updates and not finding what I was looking for, all .java files appear double spaced in the Code Editor. I can't find project property that seems to control this. The files appear fine when opened with other editors.

    How does the file show up in notepad or vi? How does it show up in firefox?
    You might want to evaluate the file with an ASCII reader to see if there are any extra line breaks in the code.
    Also are some of the developers on linux/unix and some on windows?

  • How to compile Java files using Ant in Eclipse

    Hi All ,
    I would like to compile all Java files using Ant in Eclipse.Since am very new to Ant and Eclipse can someone help me to create a build.xml file and let me know how to compile all the java files.
    For ex , I have placed my java files inside the path C:\HEC\Terab.Initially the Terab folder holds 7 jar files which i had decompiled using JD compiler and placed the unzipped 7 folders (which contains the java files ).Now i have imported the HEC project into Eclipse using New ->Project ->Java Project.after importig it throwed me an error saying missing jar files.again i copied the jar files and placed inside Terab folder with other 7 folder.
    Now How i can compile the java files and convert in to class files.Then after compiling the files i will again need to jar all the 7 folder.
    Please tell me the steps i need to follow.How to write an build.xml file ? where i should keep it ? only one build.xml file is enough or should i write 7 build.xml file for each folder ? Please help me out...
    Thanks & Regards
    Kar1983

    put it another way, what I am trying to do is to compile David Brackeen's ch 18 code from his book. The java sourse files can be downloaded here:
    http://www.brackeen.com/javagamebook/
    my question is that how would I complie all of these file so that I can get the program in ch18src\src\com\brackeen\javagamebook\test\ to run?

  • Java files from a EAR file and from inner (inside EAR)

    I want to read all Java files from a EAR file and from inner (inside EAR) EAR or WAR file with out unpacking.
    suppose "Demo.ear" contaions the following files:
    abc.java
    programs / a.java
    programs / b.java
    src / index.java
    src / com / myFolder / main.java
    src.war
    and suppose "src.war" again contains some java files inside differenet folders.
    The main problem is that i can read all java files from "Demo.ear" but unable to reading from "src.war" b'coz my program is using JarFile class constructor which needs a archive file path, So only top level archive having the path but not the inner archives.
    So, pls help me out to this problems
    Thanks in advance

    Firstly Sorry to writing long letter. but i was unable to express my problem.
    see my code==============================
    JarFile jarFile = new JarFile("Demo.ear");
    Enumeration e=jarFile.entries();
    while (e.hasMoreElements())
    JarEntry entry=(JarEntry)e.nextElement();
    if (entry.getName().endsWith(".war"))
    // Then what Next to do...........
    ===========================================
    you have mentioned "theFile" , What is this?...............
    InputStream in = theFile.getInputStream(theEntryOfTheWAR);
    This line is not a compatible type casting in Java..........
    ZipOutputStream theWar = new ZipInputStream(in);

  • Java files from a EAR file

    I want to read all Java files from a EAR file and from inner (inside EAR) EAR or WAR file with out unpacking.
    suppose "Demo.ear" contaions the following files:
    abc.java
    programs / a.java
    programs / b.java
    src / index.java
    src / com / myFolder / main.java
    src.war
    and suppose "src.war" again contains some java files inside differenet folders.
    The main problem is that i can read all java files from "Demo.ear" but unable to reading from "src.war" b'coz my program is using JarFile class constructor which needs a archive file path, So only top level archive having the path but not the inner archives.
    So, pls help me out to this problems
    Thanks in advance

    please help me
    I am waiting for ur response
    thanking you

  • Appending Text To Start of Java Files

    Hello,
    I have many Java source files, and I want to insert some text to the beginiing of all these files.
    Any ideas how I should go about it ?
    Btw, the direcrtory structure is such that, there are only Java files, but distributed under many sub directories.
    --Steve                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    On UNIX/Linux this is a piece of cake ...
    1. write a shell script that takes a parameter (being your java filename)
    2. In script concatenate the standard text file using the cat command (append output to new file)
    cat stdText.txt > tmpFile.java
    cat $1 >> tmpFile.java
    cp tmpFile.java $1
    3. At the command prompt using the fabulous unix 'find' command search for all java files in your source tree and on each one execute your script :
    find . -name "*.java" -exec myscript {} \;
    4. voila
    ...but your probably on windows ! I'm sure its possible but I have no other clues. Try using the bash shell thing I know as Cygwin. By the way, I have just hacked this together and would suggest backing everything up before you start doing anything...

  • Windows Explorer does not like java-files

    First, I know this is very off-topic, but bear with me anyway.
    I have discovered that the search-function in Windows-Explorer shows an erratic behaviour when encountering java-files (and probably other files). I did the following:
    Created c:\temp\test.java with the following contents:
    testI right-clicked on c:\temp, then search, and told it to look for test. Nothing. Renamed the file test.java->test.txt. Tried another search and found the file. Ok, probably an index problem, ignoring all java-files.
    Then I tried the following
    Choosed the root of a project with over 1000 java-files, set to search for the keyword public. Nothing. I tried the keyword class. Nothing. Then I tried for, and voila, 8 files found.
    Has anyone else encountered this particular Windows-Feature? I am using Windows XP SP2. Can anyone verify if this is a SP2 problem?
    Bonus question: Does anyone know the algorithm of this Microsoft-search?

    Windows search does also look for text in certain
    files, and ".java" is not one of them. You need to
    add the extension to the search list by manually
    adding data to the registry
    (http://pubs.logicalexpressions.com/Pub0009/LPMArticle
    .asp?ID=323).Ah yes. But... why does it find some files?
    That is the thing what bothers me. If it hadn't found
    anything, I would say the usual "Win is crap" phrase
    and forget about it.I thought the index server might be causing that.

  • Get the duration of all mp3 files inside a directory

    Hello everyone,
    I am working on a little project done with swing. Since I need an mp3 player inside my swing application, I found a really good solution with JavaFX 2. I have never worked with JavaFX before, therefor it seems to me a little bit strange on some parts.
    Anyway.
    I created a button on my application and as soon as somebody presses that button, the application should scan recursivly a unique directory for mp3 files and store the information of artist, title and track length into a database.
    The mp3 player I created is based on the example from this page:
    http://www.java2s.com/Code/Java/JavaFX/Mp3playerwithmetadataviewandcontrolpanel.htm
    I understand the source code for most parts, but some behaivors are not really clear to me. My thoughts about getting the complete length of the mp3 file was
    media.getDuration
    or
    mediaplayer.getTotalDuration
    but both results are NaN if I call .toMillis();
    Instead I need to create a listener (why?)
    private class TotalDurationListener implements InvalidationListener {
        @Override
        public void invalidated(Observable observable) {
          final MediaPlayer mediaPlayer = songModel.getMediaPlayer();
          final Duration totalDuration = mediaPlayer.getTotalDuration();
          totalDurationLabel.setText(formatDuration(totalDuration));
      }and register this listener on the mediaplayer
    mp.totalDurationProperty().addListener(new TotalDurationListener());I can image that the mediaplayer can "host" several media objects somewho and the listener is called as soon as a new media will be added to the mediaplayer in order
    the calculate the overall duration.
    When is this listener exactly called and is there no other ways to get the total length of the mp3 file?
    Here is a minimal example which should work without any external libs
    package de.hauke.schwimmbad.application.playground;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.File;
    import java.util.ArrayList;
    import java.util.List;
    import javafx.application.Platform;
    import javafx.beans.property.ReadOnlyObjectWrapper;
    import javafx.embed.swing.JFXPanel;
    import javafx.scene.Scene;
    import javafx.scene.layout.BorderPane;
    import javafx.scene.media.Media;
    import javafx.scene.media.MediaPlayer;
    import javafx.scene.paint.Color;
    import javafx.util.Duration;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.UIManager;
    public class Testing10 extends JFrame {
         private MediaPlayer mediaPlayer;
         private final ReadOnlyObjectWrapper<MediaPlayer> mediaPlayerWrapper = new ReadOnlyObjectWrapper<MediaPlayer>(
                   this, "mediaPlayer");
         public static void main(String[] args) {
              try {
                   UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                   new Testing10();
              } catch (Exception ex) {
                   System.out.println(ex);
         public Testing10() {
              super();
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              setLayout(null);
              setSize(500, 500);
              setTitle("Testing");
              setLocationRelativeTo(null);
              setResizable(false);
              JButton button = new JButton("Scan");
              button.setBounds(10, 10, 150, 30);
              add(button);
              button.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent arg0) {
                        scan();
              final JFXPanel fxPanel = new JFXPanel();
              fxPanel.setBounds(30, 80, 300, 300);
              add(fxPanel);
              Platform.runLater(new Runnable() {
                   public void run() {
                        initFX(fxPanel);
              setVisible(true);
         private void scan() {
              File directory = new File("C:\\dev\\mp3");
              List<File> mp3Files = new ArrayList<File>();
              for (File file : directory.listFiles()) {
                   if(file.getName().endsWith("mp3")) {
                        mp3Files.add(file);
              for (File file : mp3Files) {
                   System.out.println(file.getAbsoluteFile());
                   getLength(file);
         private Duration getLength(File file) {
              if(mediaPlayer != null) {
                   mediaPlayer.stop();
              final Media media = new Media(file.toURI().toString());
              mediaPlayer = new MediaPlayer(media);
              mediaPlayerWrapper.setValue(mediaPlayer);
              if(media.durationProperty()==null) System.out.println("durationProperty ist null");
              if(media.durationProperty().get()==null) System.out.println(".get() ist null");
              System.out.println("---> " + media.durationProperty().get().toMillis());
              return media.getDuration();
         private void initFX(JFXPanel fxPanel) {
              BorderPane root = new BorderPane();
              Scene scene = new Scene(root, Color.ALICEBLUE);
              fxPanel.setScene(scene);
    }The other question is why do I need a listener for the meta data to be changed in order to get the meta data?
    media.getMetadata().addListener(new MapChangeListener<String, Object>()Why can't I call something like
    media.getMetadata() --> returns a filled map?
    The metadata problem is not included inside the example from above.
    Sorry for my english but I hope everybody can understand the issue.
    Many greetings,
    Hauke

    The nature of the Media class is that it accesses it asynchronously. This means that when you create an instance of it, and then immediately query it, the data you want may not be available yet. This is all in the Javadoc, see the doc for Media:
    The media information is obtained asynchronously and so not necessarily available immediately after instantiation of the class. All information should however be available if the instance has been associated with a MediaPlayer and that player has transitioned to MediaPlayer.Status.READY statusSo you could associate the Media with a MediaPlayer, and then wait until it goes to the Status READY, and then read the length of the Media.
    As for your 2nd question, getMetadata() returns a Map. You can just loop through it:
      for(Map.Entry<String, Object> entry : media.getMetadata()) {
        // etc
      }However, the same restrictions apply as with Media -- you will probably need to wait before the information is available -- that's why the Listener approach works, because it will notify you as soon as the information is added to the map.

  • Where are all the .java files????

    I placed a few of Oracle's demo JAR and fmb/fmx files on my server to test a couple of things, and they are working fine. (I moved them over to the server by copying the JAR file off my local machine and pasting then into the forms90/java folder on my server. Then I copy and pasted the fmx and fmb files over and created a [this_demo] profile for each one I was using. I also added the .jar to the formsweb.cfg)
    Anyways.....
    I would like to look at the actual code for one of these demos, but can't find the .java file anywhere. It's not in the JAR file. All that is in the JAR file is META-INF and oracle/forms/demos/enhancedItems2/.class(es) files.
    I also downloaded sun's juggling duke JAR file(s) -juggler.jar and methodtracer.jar. I created a test form and got Duke to juggle just fine, but I would like to take a look at the .java code. Where should that be???
    Thanks in advance

    An error occured when trying to open the file for reading. Filename: ".\jad\tmp\MOLine.java"
    Current Working Directory: C:\Program Files\Cavaj Java Decompiler\
    System error message: The system cannot find the file specified.
    C++ exception: ios: failbit setDo you get the same error if you use a directory name which has no space in name?
    Question is, when I am trying to decompile MOLine.class to produce MOLine.java, why is it looking for MOLine.java?Most probably because you cannot decompile the class file (I believe if it was possible, Oracle would have provided the java file).
    Thanks,
    Hussein

  • Script to open all PST files in a directory and open with Outlook.

    Hi!  I am looking for a script that opens all PST files in a directory, opens it in outlook, and writes to a log to see if it completed correctly.  I'm new to VBscript and just want to see how the script would be written.
    Thank you!!

    Thank you for all the input!  JRV, I went through the repository and couldn't find anything about importing into Outlook.  I will use it for future references and I appreciate you directing me there.
    Grant, I need to be able to locate all PST files within a directory, not point it to a specific pst.  I also need it written to a log file.  Here is what I have...Don't laugh, I'm very new...
    const ForAppending = 8
    set objTextFile = objFSO.OpenTextFile ("C:\Users\jimmy.nguyen\Desktop\Lucky.txt", ForAppending, True)
    set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("WScript.Shell")
    strCommand = "C:\Program Files (x86)\Microsoft Office\Office12\outlook.exe"
    Set objExecObject = objShell.Exec(strCommand)
    wscript.sleep 4000
    Set myOlApp = CreateObject("Outlook.Application")
    Set myNS = myolapp.GetNamespace("MAPI")
    myNS.AddStore "objfile.name"
    Sub ShowSubFolders(fFolder)
    Set objFolder = objFSO.GetFolder(fFolder.Path)
    Set colFiles = objFolder.Files
    For Each objFile in colFiles
    If UCase(objFSO.GetExtensionName(objFile.name)) = "pst" Then
    objFile.Name
    End If
    Next
    For Each Subfolder in fFolder.SubFolders
    ShowSubFolders(Subfolder)
    Next
    End Sub
    strResults = ShowSubFolders(fFolder)
    objTextFile.WriteLine(strResults)
    objTextFile.Close

Maybe you are looking for

  • With purchased music videos they will not play, an error comes up"The requested URP was not fopund on thsi server", and video doesn't play?

    I ahve purchased 5 music vidoes from iTunes and they will not play on my iPhone4. The error message that appears is: "The requested URL was not fopund on this server" I am not sure how to fix this so I can watch my videos?

  • Word docs and PDFs on iPad

    I don't have an iPad yet but I'm considering buying one. Can I transfer a Word doc or a PDF from my computer to an iPad in order to read it? To edit it?

  • How to start replicat with mising table in target

    Hi, when I start replicat, i got the error below 2011-10-21 15:28:30  ERROR   OGG-00199  Oracle GoldenGate Delivery for Oracle, rep1.prm:  Table SIEBEL.S_SRM_TASK_HIST does not exist in target database. 2011-10-21 15:28:30  ERROR   OGG-01668  Oracle

  • MDB Not able to consume the messages

    Hi The code below put the messages in the queue which I can see through the admin console public class TestMDBClient { public static void main(String [] args) throws JMSException, NamingException { final Context ic = getInitialContext(); final QueueC

  • Embed Web based reviews into PDF

    We are using the ESM solution accelerator which initiates web-based reviews.  The comment files created by Acrobat are stored as RSS feeds.  At the end of a stage, I need to deliver a self-contained PDF with all the comments.  I'm looking for DDX or