Jbuilder current directory

When I run the a project by double clicking the jpr file
the current dir is set to the dir where jpr is located.
when I lanuch jbuilder program using start menu
the currrent dir is set to jbuilder35/bin which creates problems every time I run java application.
(Files are seached in current jbuilder35/bin rather than
the project dir ).
How can I fix this so that no matter method i use
the current dir will be set to the current project directory ?
Joseph.

Hi,
Have you set the path defaults from the Project / Properties dialog?
Look at the Project menu, the last two items.
If there is no project open, the current working directory will be the one specified from the Default Project dialog on the Paths tab.
If you have a project open the current working directory should always be the working directory from the Project dialog on the Paths tab.
regards,
Terry

Similar Messages

  • Java not checking current directory

    I'm trying to run one of my classes in command line. First time I've done this, usually use JBuilder, but I need to send command line arguments for this assignment, which is easier to do in command line.
    I'm using Windows XP. My class is called Fexpand. I go to the directory that the class is in. I check this with dir, and Fexpand.class is clearly present. I type "java Fexpand" and hit enter. I get "Exception in thread "main" java.lang.NoClassDefFoundError: Fexpand" If I put the full path to the current directory in manually with -classpath it will run just fine. But everything I've checked says this shouldn't be necessary and it should be checking the current directory automatically.
    Now javac works just fine. Just for kicks I thought I'd see if compiling with javac would make any difference. Went to my source directory (because JBuilder keeps compiled classes separate from source), typed "javac Fexpand.java" and it worked just fine. And since there was now an Fexpand.class in this directory, too, I thought I'd try running it. "java Fexpand" Still get the same error.
    My CLASSPATH variable contains the following (including quotes, I didn't add those for clarity, they're in the value for CLASSPATH): "C:\Program Files\Java\j2re1.4.2_04\lib\ext\QTJava.zip"
    I have no idea whether or not this is right, but it's the only culprit I can think of.
    Thanks for any help.

    But everything I've checked says this shouldn't be necessary and it should be checking the current directory automatically.Not if you hava overridden the default checking by explicitly specifying a classpath. Read the documentation Setting the Classpath and How Classes are Found here:
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/tools.html

  • Running a java program in a directory other than the current directory

    How do I run a java program that's located in a directory other than the current directory?
    There is a file Test.java in /dir1/subdir1. If my current directory is anywhere other than that directory, say /dir2/subdir2, I can compile Test.java by using:
    javac -classpath /dir1/subdir1 /dir1/subdir1/Test.java
    But when I try to run it with:
    java -classpath /dir1/subdir1 /dir1/subdir1/Test
    I get a java.lang.NoClassDefFoundError: \dir1\subdir1\Test
    Any thoughts?

    You need to specify just the name of the class you want to run. So java -classpath /dir1/subdir1 Test

  • How to trace an application which is not in the current directory?

    Hi,
    When I use simple example 'Trace' to trace my application in current directory, it works well.
    But I cannot trace the applications which are in different directory or in an .jar file. Even I've already add it to the classpath.
    The following is my test:
    I put Myapp.class in .\classes
    java -cp .;.\classes com.sun.tools.example.trace.Trace Myappit shows me:
    java.lang.NoClassDefFoundError: Myapp
    Warning: classic VM not supported; client VM will be used
    Exception in thread "main" -- VM Started --
    -- The application exited --Can anyone help me ?
    thanks

    The following is my test:
    I put Myapp.class in .\classes
    java -cp .;.\classescom.sun.tools.example.trace.Trace MyappThere are two JVMs involved when you are tracing or debugging.
    Rather than putting the classpath on your command line, set it as
    an environment variable so that both JVMs can use it. That way, the
    second JVM (which is executing the Myapp class) will be able to find it.
    If your current directory is %JAVA_HOME%/demp/jpda, then this example
    will trace the SwingSet2 demo program:
    set CLASSPATH=".;%JAVA_HOME%/lib/tools.jar;%JAVA_HOME%/demo/jfc/SwingSet2/SwingSet2.jar"
    java com.sun.tools.example.trace.Trace SwingSet2Let me deconstruct the CLASSPATH:
    . is on the classpath so the first JVM will locate
    the com.sun.tools.example.trace.Trace class relative to
    your current directory. You may also use the absolute
    path instead of dot.
    %JAVA_HOME%/lib/tools.jar is there so both JVMs
    can locate the JDI (Java Debug Interface) classes in tools.jar.
    %JAVA_HOME%/demo/jfc/SwingSet2/SwingSet2.jar is
    there so the second JVM (the debugee) can load the
    SwingSet2 class..

  • Getting current directory from an applet

    Hi. How can I get the current directory of my applet running on web without having to worry about permissin. I used the one below:
    curDir = System.getProperty("user.dir");
    but I get this error:
    ava.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
    any substiture for this? Thanks.

    You should be using URLs or similar approaches, and avoiding File, which will
    never work with an ordinary applet.
    InputStream in = this.getClass().getResourceAsStream("file.txt");That assumes the txt file is in the same place as the current classes .class file.
    For example, the same folder or that they are jarred in the same "folder" in the jar.
    You can also use a URL directly:
    URL url = ...
    InputStream in = url.openStream();and you can construct that URL with the help of Applet methods getDocumentBase or getCodeBase:
    URL url = new URL(this.getDocumentBase(), "file.txt");That assumes the txt file is in the same folder as the html file in which the applet is embedded.

  • How can I make an applet look to the current directory to read a txt file in?

    I am using a File class passing only the file name as the contructor but forte still looks in "C:\forte_jdk\forte4j\bin\Events.txt" which is not my current directory for the project.
    If leave it and ftp this applet to my web site I get an IOException.

    I always find visual aids helpful. See below for screenshots & discriptions.
    01. The Basics
    When you create a new site & go into design view (in the example below it's the Home page), you'll see the following.
    The white box is your page.
    The grey box outside of that is your browser area.
    The black & white checkered area is the Adobe Muse CC application chrome.
    02. Add Box
    Draw / Add your rectangle or text frame (text tool). I drew a rectangle, gave it a fill color of blue & turned the stroke from 1 to 0.
    03. Extend & Snap to Browser Edge (Left)
    Click, hold  and drag your mouse on the center adorner (adorner is the little squares that you can grab to resize your rectangle) until you resize your rectangle to the browser edge (the dark grey area) until you see a red line. This means you've 'snapped' one of the rectangle's edge to the browser edge.
    04. Extend & Snap to Browser Edge (Right)
    Repeat the process except do this for the right edge. In truth, it doesn't matter in which order you resize your rectangle to snap to the browser edges. The key thing is to be sure to do this for both sides of the rectangle & snap it to the browser edge (see the red line).
    05. You're done! Preview.
    06. Bonus!
    Once again, you can make rectangles or text frames 100% width, BUT you can't do this with placed images.
    However, you can do this with a rectangle or text frame. Then set the Fill of either the rectangle & text frame to be an Image & set the Fitting to 'Scale to Fill.'
    (see below for example - I used a rectangle & changed it's Fill property)
    Now when I preview, the image is 100% width. In truth, it's a 100% width rectangle with a fill of an image.

  • How to get the path of current directory?

    I have the Java servlet to produce text file, and it produces to C:\hello.txt,
    but I want to output in the current directory as the Java File:
    i.e. C:\jakarta-tomcat-4.1.30\webapps\ExtendedGUI\WEB-INF\classes
    try
         PrintWriter out = new PrintWriter(new FileWriter("hello.txt"));
         out.println("HELLO");
         out.close();
    catch(IOException e)
    any ideas?? Thanks!!

    The current directory is defined as the directory that you started your servlet container from. In your case, it was c:\. If you want it to fall into the same directory as your class files, I would start by finding out what TOMCAT_HOME or whatever container you're using is and adding to the directory until you get to your class directory. Make sense?
    The easiest way is to read the output directory from a properties file as a resource or a hardcoded path.
    HTH

  • How to create a file in current directory

    hi,
    I want to create a file in a current directory, But when i written following
    code then it cannot create file, How i will create file in current directory?
    Is there anyone who can help me?what will be the solution of this problem?
    Please give me solution
    String dir=application.getRealPath("/");
         int count;
         String filename="sample.txt";
         out.println(dir+filename);
         FileOutputStream fout=new FileOutputStream(filename);
         PrintStream p;
         p=new PrintStream(fout);
         p.print("1");
         p.close();with regards
    Bina

    hi,
    my problem is that my path is ok...but when i open file in this directory then
    it cannot open a file, is there anyone who can do it? When a user save data in server from remote
    area then what will be path of my code? how i will solve it? please give me
    solution.
    with regards
    bina

  • Acrobat Pro "save as" function in the file menu does not show the current directory of the file

    I have installed CC but Acrobat Pro gives me headaches.
    The "save as" function in the file menu does not show the current directory of the file but something I have worked on in the past.
    It forces me to navigates through my hard disk for this very straightforward thing in normal conditions. I precise: Acrobat is the only software reacting like that.
    I use Windows7 professional 64bits.

    I use what seems to be the latest version available on the Cloud:
    To illustrate my point, I open a directory with explorer and double-click on the only PDF in there:
    So here it is, open:
    When I do a "Save as", it takes me to a totally different place on the disk!
    Very annoying...
    Thanks for your time!
    JJ

  • How to get absolute path of current directory?

    Hi, everyone!
    I want to get the absolute path of current directory.
    Are there some APIs that I can use?
    Thanks in advance,
    George

    Hi, dheeraj_tak buddie!
    What do you mean in your reply?
    "in File class u have all this methods for getting absolute path "regards,
    George

  • Specifying current directory in Receiver File Adapter

    Hi Experts,
    I have been configuring a receiver file adapter to place a file onto an FTP server. As per the information provided, as soon as I login to the FTP server, I have to place the file in current logged in directory. In this case, how can I mention this in file adapter as to use the current directory path to place the file? What should I enter in 'Target Directory' in File Access Parameters?
    Thanks,
    Dhawal

    Hi Praveen,
    Since file directory parameter is mandatory, my question is what should I enter in this parameter so that the file adapter will know that the file should be placed in the root directory itself?
    Regards,
    Dhawal

  • How to read files from current directory for applet

    I have an applet that needs to read some audio files located in its current directory on the server and I just can't seem to figure it out...maybe I am being dumb...any help?

    You can use the ListSorter File Adapter Configuration property to sort based on timestamp. Basically add the following property to the inbound JCA file:
    <property name="ListSorter"
    value="oracle.tip.adapter.file.inbound.listing.TimestampSorterAscending"/>
    <property name="SingleThreadModel" value="true"/>
    More info see section 4.2.6 in http://docs.oracle.com/cd/E23943_01/integration.1111/e10231/adptr_file.htm

  • E-mailing report attempts to write temp file in current directory

    When e-mailing a report from the previewer, Reports 6.0 attempts to write a temporary file in the current NT directory. This file is the actual e-mail attachment, in this case a PDF file.
    Unfortunately the current directory is where the application resides, and therefore users do not have write permission. Is there any way to re-direct where the temporary file is created (i.e. a local drive or the Windows temp directory)?
    Thanks in advance.

    change your registry key entry which says
    REPORTS60_TMP to which ever dir you want

  • How to create a file in server's current directory

    hi,
    I have a project, but when i will run my program on internet Explorer then
    it will create a folder in server's current directory, but i will not specify
    drive & folder, it will create a folder in server's current directory, after that
    i will read file from that, what will be the solution of this ? Is there
    anyone who can give me solution? PLease help me
    With regards
    Nahar

    ServletContext context = session.getServletContext();
    String realContextPath = context.getRealPath(request.getContextPath());this will give you access to the servlets current directory
    from there you can create a file
    I dont know how much this will help

  • Create folder in current directory

    Hi all,
    I would like to be able to create a folder through my java program, in the current directory that the java program is in.
    Furthermore, I do not want to have to change any code if the java program is suddenly moved to a different folder.
    Something like this, but obviously currentDirectory would have to actually be the specific directory that the program is in:File f = new File(currentDirectory);
    f.mkDir();Also, just on a side note if anyone has any knowledge of MySQL, I would like to be able to do this when using 'batch mode' and pointing a batch file to a text file containing mysql commands:
    mysql -u root -p < d:\mysql\jdbc\createdatabase.txtso the current directory would replace 'd:\mysql\jdbc\'.
    thanks very much

    Hi Jon
    On the first topic, try this.
    import java.io.File;
    public class MakeDir {
         public static void main(String[] args) {
              if (args.length != 1 || args[0] == null || args[0].trim().length() == 0) {
                   System.out.println("Usage: java MakeDir <folder name>");
                   System.exit(-1);
              File f = new File(System.getProperty("user.dir") + "\\" + args[0]);
              f.mkdir();
    }/John

Maybe you are looking for