Environment variable JAVA_HOME and ANT

Hi,
I have one parent parent.xml ant file that calls another build.xml files (task <ant>). Each build.xml file uses <javac> but needs to compile with another java version: 1.4 and 5 (defualt in system is JAVA_HOME=java1.4)
I tried this command:
<property environment="env"/>
<ant antfile="build.xml" dir="${my_dir}" target="compile.debug">
  <property name="env.JAVA_HOME" value="c:\jdk1.5.0_05"/>
</ant>But it seem it doesn't work. The compilation of project in ${my_dir} directory fails because of using 1.4 java compiler.
Has anybody any idea, plz?

how about j2ee.bat?

Similar Messages

  • Unable to start java tools - Error : Environment variable JAVA_HOME not set

    hi all,
    I am not able to start the java tool - Visual Admin, Configtool, etc in the solaris Bash shell.
    I was given authorizations on solaris and i'm able to view the logs and browse in solaris boxes,
    But, when i try to start Visual Admin, it says" ERROR environment variable JAVA_HOME not set "
    Since,my colleagues are using this tool for years, how come the environment variable is not set only for my user profile ?
    Is it like the environment variable has to set seperately for every user profile ?
    Do i need to set it initially for my profile eventhough it is working for others ?
    i am confused..please help.
    Addy

    Nicholls, Thanks for your quick reply.
    Ofcourse, I use my login ID to use java tools and they use their's obviously.I don't use <SID>adm.
    We WRQ reflection for X-Windows and Putty for Command line Solaris Access.
    When i try to use VA through the X-Window tool WRQ reflection, I am not able to start the tool.
    My doubt here is, Do we need to setup the environment variable for every new user initially for the first time ? ( I am a new user for this environment )
    Supposing if i need to setup the environment variable, do i need to set it up for the all the Solaris Boxes i use ?
    I am able to browse through the files.when i try to start the VA by giving ./go i am not able to start it up.
    Appreciate your time and valuable replies.
    Addy

  • How to Specify the environment variable JCE_POLICY_ZIP and restart

    Hello All,
    I am installing the ABAP SAP NetWeaver 7.01 SR1 ABAP Trial Version.
    sapinst.exe installed successfully.
    I am installing the sapinstgui.exe but I got the following message:
    Program is starting... Please wait!
      Path: C:\Users\George\AppData\Local\Temp\sapinst_exe.6220.1246290325
    jre\bin\java.exe
    For the requested processing mode java policy
    files within the used SAP JVM are needed.
    Specify the environment variable JCE_POLICY_ZIP and restart.
    See also SAP note 1238121.
    Exit status of child: 10
    JRE is installed in C:\Program Files\Java\j2re1.4.2_19
    How do I specify the environment variable JCE_POLICY_ZIP?
    Thanks
    George
    Edited by: George King on Jun 29, 2009 9:01 PM

    Hi everyone,
    I had the same problem and found the solution !
    I was trying to setup the GUI thanks to sapinstgui.exe from the trial download folder and I got the exact same message,
    The problem is not the policies but the installation file.
    The installation file for the GUI is located at :
    <extract_folder_SAP_trial_version>\GUI\SAP_GUI_FOR_WINDOWS(...)\SAP_GUI_for_windows_(...)_Components.exe
    Hope it helps !
    Nicolas

  • Usage of CGI environment variables SERVER_NAME and HTTP_HOST by APEX

    Hi,
    I have a question about the usage of the CGI environment variables SERVER_NAME/SERVER_PORT and HTTP_HOST by APEX.
    When does it use which CGI environment variables when it is generating absolute URLs.
    Based on the following thread about the online help (Re: Help does not show content it seems to use SERVER_NAME/SERVER_PORT. At least for the online help.
    But based on my own tests some time ago about the flash charting at the following thread (Re: APEX Charts - Error XML Loading falied I investigated that at least flash charting is using HTTP_HOST to generate an absolute URL.
    My question now is what is the logical difference between HTTP_HOST and SERVER_NAME and which of the URLs should be used when I want to generate absolute URLs in my application?
    I would tend to use HTTP_HOST because it seems to be more logically. I would see SERVER_NAME more as just the name of the web-server, which doesn't have to be the URL the user enters in case a reverse proxy is used.
    Thanks
    Patrick
    My APEX Blog: http://inside-apex.blogspot.com
    The ApexLib Framework: http://apexlib.sourceforge.net
    The APEX Builder Plugin: http://sourceforge.net/projects/apexplugin/

    We use HTTP_HOST in most cases from what I can see. You may have also noted that HTTP_HOST may have :<port> appended to the hostname as well.
    Scott

  • Environment variable PATH and Sql*Plus

    Hi all,
    i have a problem with sqlplus.
    It might seem not to be able to read the path environment variable.
    I need to launch some sqls without typing their path (to put the path i should modify morre than 300 shell scripts), e.g.: @script.sql.
    My shell scripts are invoked by the database using java.
    Inside the shell scripts we have commands like "sqlplus -silent <login> @script.sql [parameters]"
    So if sqlplus is not able to read the PATH environment variable, the command hangs waiting for something to do without the chance to close it.(it is silent).
    I run RDBMS v8.1.7 on compaq tru64 Unix.
    Can someone help me??
    Thanks in advance.
    Marco - Milan, Italy

    Where do I set SQL*Plus SQLPATH variable??As every other unix environment variable - either in your profile or in your current shell whatever you like
    Is this the PATH where SQL*Plus searches for .sql
    files??SQL*Plus searches for your files in your current directory, and then the directories you specify with the SQLPATH environment variable.
    SQL*Plus searches this colon-separated list of directories in the order they are listed.

  • Environment variable java_home

    I got a problem with my Forte. I installed Forte Community Edition (bundled with Java 1.4 , downloaded from Sun).My Forte's ide.log file told me that the Java_Home="C:\forte_jdk\j2sdk1.1.0\jre".
    While my computer got Java 1.4.0 installed in C:\j2sdk1.4.0, and my Window 2000 's java_home setting is C:\j2sdk1.4.0
    as well. How can I make my Forte to find proper Java 1.4? I hate to re-installed everything once again.
    Thanks

    There's a file named ide.cfg under the bin directory of Forte installation directory that you can modify to run Forte with different JDKs.

  • I am trying to install itunes 10 but error messages saying could not update the environment variable PATH and CLASSPATH appear. how can i fix this?

    this is really frustrating ive been googling for hours trying to find the solution! any help would be greatly appreciated. I have windows 7 and the newest gen ipod nano

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    tt2

  • How to set environment variables for Tomcat on mac osx 10.8.5

    How do I set up my environment variables - JAVA_HOME and CATALINA_HOME on my iMac running mac osx 10.8.5?

    You need to create a setenv.sh script in the tomcat bin directory. The link is an example that you will need adjust- http://www.unidata.ucar.edu/software/thredds/current/tds/tds4.2/tutorial/Getting Started.html

  • Setting JAVA_HOME environment variable?

    Sorry for such a trivial question, but in Windows 2000 Server with Microsoft Visual J++ 6 and the JRK 1.1.8, can somebody tell me what the environment variables should be so that I can use this jdk? If not can you tell me what your environment variable JAVA_HOME points to?
    And one last question if it's not too much to ask. Can you tell me the NNTP server address for SUN so that I can go to the newsgroups in my News reader rather than over the web?
    Thanks.
    George Hester

    Thanks. I have a problem though. I installed the jdk 1.1.8 because I heard that was the last one supported using Visual J++. Hence I have a C:\jdk1.1.8. This folder has no JRE subfolder so I am stuck at what you said the Classpath should contain as the path\folder you say it should be does not exist.
    I have a folder C:\Program Files\JavaSoft\JRE\1.3.1 which has the lib folder containing rt.jar.
    So as you can see I'm sort of in a quandry.
    If I make JAVA_HOME as you say then it does not contain the JRE. If I make JAVA_HOME C:\Program Files\JavaSoft so that your suggestion for Classpath is correct that folder does not contain the jrk and it seems that I will not be using it.
    Any suggestions how to set this up so that it's right?
    George Hester

  • Multiple oracle homes on Windows and the "Path" environment variable

    Hi There,
    We have a windows 2003 database server that has few databases running oracle 10.2.0.3. We are installing oracle 11.2.0.1 on the box as well, and we were wondering, which binaries should come 1st in the path environment variable? and how does this effect the working oracle environment?
    Going to the oracle home selector and swapping the 2 oracle homes around will have the same effect on the windows path variable - which will treat the 1st oracle home to be the default home - are there any general rules reg. multiple oracle homes on a server and the default home?
    Should the earlier version of oracle always proceed the newer one (i.e. c:\oracle\product\10.2.0.3\bin;c:\oracle\product\11.2.0.1\bin) or should the newer oracle version comes 1st as newer oracle versions are usually backward compatible?
    Your thoughts are highly appreciated.
    Thanks

    That isn't going to happen.
    If you install 11.2 last it will appear in the PATH variable first
    If you don't want that you need to Oracle Home Selector utility in the Installer to change it.
    Obviously, as usual, all of this is documented.
    Sybrand Bakker
    Senior Oracle DBA

  • JAVA_HOME and CLASSPATH

    Hi to everybody,
    I just installed tomcat 4.1 and JDK 1.4.2.
    I can see the welcome page of tomcat and some example run perfectly.
    I cannot see the Hello.jsp page the usual simple page (see the error msg below).
    "bin" directory of JDK is in C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin
    "lib" directory of tomcat is in C:Programmi\Apache Group\Tomcat 4.1\common\lib
    "Hello.jsp" is in C:\Programmi\Apache Group\Tomcat 4.1\webapps\ROOT\w-web (I create w-web directory)
    I set the following environment variable:
    JAVA_HOME=C:\Program Files\j2sdk_nb\j2sdk1.4.2 ---> Is it correct?
    path=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\WbemC:\Program Files\j2sdk_nb\j2sdk1.4.2;C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin ---> is it correct?
    CLASSPATH=.;C:\Programmi\Apache Group\Tomcat 4.1\common\lib\servlet.jar;C:\Programmi\Apache Group\Tomcat 4.1\webapps\ROOT\w-web
    Is correct to set them in that way?
    thanks in advance and bye Davide
    =========================ERROR MESSAGE===================================
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: -1 in the jsp file: null
    Generated servlet error:
    [javac] Compiling 1 source file
    ============================================================================

    in the console shell the error message reported is:
    unable to find javac compiler;
    com.sun.tools.javac.Main is not in the classpath.
    Perhaps JAVA_HOME does not point the JDK
    at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:969)
    Hi to everybody,
    I just installed tomcat 4.1 and JDK 1.4.2.
    I can see the welcome page of tomcat and some example
    run perfectly.
    I cannot see the Hello.jsp page the usual simple page
    (see the error msg below).
    "bin" directory of JDK is in C:\Program
    Files\j2sdk_nb\j2sdk1.4.2\bin
    "lib" directory of tomcat is in C:Programmi\Apache
    Group\Tomcat 4.1\common\lib
    "Hello.jsp" is in C:\Programmi\Apache Group\Tomcat
    4.1\webapps\ROOT\w-web (I create w-web directory)
    I set the following environment variable:
    JAVA_HOME=C:\Program Files\j2sdk_nb\j2sdk1.4.2
    ---> Is it correct?
    path=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Sy
    tem32\WbemC:\Program
    Files\j2sdk_nb\j2sdk1.4.2;C:\Program
    Files\j2sdk_nb\j2sdk1.4.2\bin ---> is it correct?
    CLASSPATH=.;C:\Programmi\Apache Group\Tomcat
    4.1\common\lib\servlet.jar;C:\Programmi\Apache
    Group\Tomcat 4.1\webapps\ROOT\w-web
    Is correct to set them in that way?
    thanks in advance and bye Davide
    =========================ERROR
    MESSAGE===================================
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error
    () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile
    class for JSP
    An error occurred at line: -1 in the jsp file: null
    Generated servlet error:
    [javac] Compiling 1 source file
    =======================================================
    ====================

  • Within JBuilder, Reading Environment Variable From a BATCH File

    Hi ppl:
    Following my scenario without JBuilder. I would like to be able to do the same with JBuilder, so that I can run my application from within.
    1. In the DOS window, I run a config.bat file that sets up a whole bunch of environment variables and then calls another script file that sets up another whole bunch to set up environment for a third party API (C++ based).
    2. My application uses native methods to call the third party API which uses the environment variables set in step 1.
    I know how to set the environment varialbes in JBuilder (Project Parameters, VM). However, I don't know how I can call a batch file that does the same. I don't want to set up the third party variables in JBuilder manually, since the script that sets them up checks on a few things to customize the environment.
    I also know how to run a batch file from JBuilder, but that does not set the environment for the application. It seems like the batch file is run in a separate process.
    Any ideas?
    Kamran

    It seems like the batch file is run in a separate process.Yes, it is. That's a design feature of Windows. The environment variables that a process creates are available to any subprocess, but when the process ends, the environment variables vanish. That's because they are part of the process, not global variables as you might wish.
    So that's why your non-JBuilder scenario works; your C++ program is running in a subprocess of the process that defined the environment variables. And your JBuilder scenario doesn't work because the batch file it runs is in a process whose parent process is Windows, not JBuilder.

  • Windows Environment Variable

    Hey,
    I am trying to use
    cl_gui_frontend_services=>gui_download
    and include the windows environment variable %USERPROFILE%
    in the path for example:
    filename = '%USERPROFILE%/filename.txt'
    that only creates a directory called %USERPROFILE% but not the Variable.
    Has anybody experienced this ?
    Thank your for your help,
    kind Regards
    Christof

    you have to use the following code to get the environment variable value and then use that with gui_download
    call method cl_gui_frontend_services=>environment_get_variable
          exporting
            variable     = p_envir_name
          changing
            value        = ls_envir_path
          exceptions
            cntl_error   = 1
            error_no_gui = 2
            others       = 3.
    call method cl_gui_cfw=>flush
          exceptions
            cntl_system_error = 1
            cntl_error        = 2
            others            = 3.

  • Add firewall rule with custom environment variable in program path

    Hi,
    We want to create a firewall rule for a program which is placed in folder which changes sometimes. I know you can add a firewall with the ProgramFiles environment variable like this:
    netsh advfirewall firewall add rule name="Test Firewall rule" dir=in program="%%ProgramFiles%%\Test\Test.exe" action=allow security=notrequired
    The environment variable ProgramFiles isn't expanded and if the Program Files folder is different on a system the rule still works.
    We try to use this with a custom environment variable which we set a system environment variable with this command:
    SETX SomeFolder "D:\Some Folder\Apr 2015" /M
    If we use the command below to add the firewall rule in a batch file the environment variable SomeFolder is expanded correctly and the program path is added as a static path.
    netsh advfirewall firewall add rule name="Some Firewall Rule" dir=in program="%SomeFolder%\AFile.exe" action=allow security=notrequired
    Because the folder changes sometimes we want to change the environment variable SomeFolder and not remove the old firewall rule and create a new one. We want to add the environment variable SomeFolder to the program path as a (dynamic) environment variable
    and not as the expanded path at the moment when the rule is added. If we use this command:
    netsh advfirewall firewall add rule name="Some Firewall Rule" dir=in program="%%SomeFolder%%\AFile.exe" action=allow security=notrequired
    We get the error:
              Windows Firewall with Advanced Security
              An error occurred while adding the rule.
              Error: The parameter is incorrect
              Status: The application name could not be resolved
              OK   
    Why can't we use %%SOMEFOLDER%% like we can use %%PROGRAMFILES%%? The same error is shown when we try to add the firewall rule through the management console 'Windows Firewall with Advanced Security'
    W. Spu

    Hi,
    Based on my plenty of test with this problem, it seems like there is no better method to achieve your requirement. To add new policy to firewall, it would be better using general cmdlet. The path parameter like %%SomeFolder%% do have problem in add firewall
    policy cmdlet. 
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Extract Environment Variable from System Variables

    Hi,
    I want to define a custom environment variable manually and from my code I want to retrieve the value for that system variable which I have created.
    Steps:
    Manual Actions
    1. Right Click "My Computer" >> Properties >> Advanced System Settings >> Advanced >> Environment Variables
    Here I have 2 options. User Variables and System Variables.
    In either of these I have to declare a variable - "Test Region" and its value as "Test1"
    Now, when I run my c# program I have to get "Test1" as output when I provide "Test Region" as parameter.
    Please provide me the code for this.

    Dear Cheong,
    It is working perfect now, when I restarted the PC.
    But the problem is each time when I change the Value of the environment variable, I need to restart the PC to make it effective.
    Is there any solution for this?
    Your support is much appreciated.

Maybe you are looking for

  • Pages '09 .template files cannot be opened in pages 5

    I have an older iMac and just bought a new Macbook. I have been having problems (seems like I'm not the only one) with the new Pages. Mostly, even on my iMac, I've had problems opening files. I always get an error that says, "'X file' can't be opened

  • 3rd Gen Ipod touch stuck in recovery mode....please help!

    I just wanted to add some music for a birthday party and this has become a total failure. worked fine yesterday...so i plud it into my laptop and it asks to update itunes, for the sake of being in a hurry i skipped that, and came back and all of a su

  • How to get the build version of a built application

    Hi, I trying to get the build version of my applications to display it on the front panel. It looked into the property node but I did not find the good class and property I hope you can help me. I joint a picture to discriebe my problem BR and thanks

  • HOW TO SAVE DATA FROM TABLE A AND TABLE B INTO TABLE C

    Hi, I have a table called EMPLOYEE , GROUP and EMPLOYEE_GROUP table EMPLOYEE contains emp_id, emp_name, emp_dep and emp_level table GROUP contains group_id and group_description table EMPLOYEE_GROUP contains emp_id and group_id (emp_id is a primary k

  • Set the default in a drop down box using BHTML

    Hi, I've got the following code in my html template: `repeat with i from 1 to g_curr_name.DIM` <option value="`g_curr_code<i>`">`g_curr_name<i>`</option> `end` This works fine, it displays all the values I've set from my program.  But I want to defau