How to compile a dll in window

Hi ALL:
I want a compile a java program through natvie method in c . Below is my code
cl -I"c:\Program Files\j2sdk_nb\j2sdk1.4.2\include" -I"c:\Program Files\j2sdk_nb\j2sdk1.4.2\include\win32" -I"c:\Program Files\Microsoft Visual Studio\VC98\include" -LD Analyze.c -FeAnalyze.dllAnd there is a error message
Command line error D2003 : missing source filenameBut I certain a file called Analyze.c in the path , why ther error ouccer???
Can anyone help me
Thanks in advance

Hallo,
You have not specified your problem very well. As I understand it, you want to be able to start the Java VM from C, and then call some Java methods from your C code. Is that correct? Or are you trying to create some native methods, that you can call from java?
Your first problem is that you have not specified any code! You have just shown how you want to start the Microsoft compiler to compile your DLL. You have clearly not specified the compiler parameters correctly.
I respectfully suggest that this is the wrong forum to get help with your Microsoft compiler problem. You need to read the documentation that comes with the compiler. It is very comprehensive. I would in any case ask: Why are you trying to compile your code from the command line? It is normally very much easier to create a Visual Studio project and do everything from within Visual Studio itself.

Similar Messages

  • How to compile a report in windows

    Dear Memebers,
    Generally standard reports contain a lot of user exits as a results of which we cannot compile the reports using reports builder. How can we compile a standard report in windows. I know the syntax which is shown below but how should i proceed.
    REM WINDOWS COMPILE REPORT
    ::compile_report.bat
    cls
    Echo compiling Report .....
    for %%f IN (FAS400.rdf) do RWCON60 userid=apps/apps@test batch=yes source=%%f
    stype=rdffile DTYPE=REPFILE OVERWRITE=yes logfile=log.txt
    ECHO FINISHED COMPILING
    What if i have a report in some directory in windows. Can i mention the path and how do i run the above mentioned commands as a script in windows command prompt.
    I would really appreciate your help. Correct me if i am wrong.
    Thanks
    Sandeep

    for forms:
    REM WINDOWS COMPILE FORMS
    ::compile_forms.bat
    @echo off
    cls
    SET DBConnectString =
    SET /P DBConnectString= Please enter DB connect string (user/password@sid):
    SET workingDirectory =
    SET /P workingDirectory= Enter the directory where FMBs are located (i.e. c:\dev\forms\):
    cd %workingDirectory%
    @echo on
    echo Compiling Forms....
    for /f %%a IN ('dir /b *.fmb') do ifcmp90 module=%%a userid=%DBConnectString% batch=yes
    echo Finished Compiling for reports:
    REM WINDOWS COMPILE FORMS
    ::compile_reports.bat
    @echo off
    cls
    SET DBConnectString =
    SET /P DBConnectString= Please enter DB connect string (user/password@sid):
    SET workingDirectory =
    SET /P workingDirectory= Enter the directory where RDFs are located (i.e. c:\dev\reports\):
    cd %workingDirectory%
    @echo on
    echo Compiling Reports....
    for /f %%a IN ('dir /b *.rdf') do rwconverter userid=%DBConnectString% batch=yes source=%%a stype=rdffile dtype=repfile overwrite=yes logfile=log.txt
    echo Finished Compiling

  • How to compile a dll for JNI in the CMD correctly

    Now I find alot of old threads on using the mno command in cygwin to created dlls to use as an interface between c and Java, however I know this command is no longer available in cygwin and so I took the advid of downloading minGW and using this in the CMD instead.
    However every example I try to compile and run this way throws the unsatified link error when the native function is to be called by the Java program. I believe it must be a compiling error creating a mismatch between the native function and the function to be called.
    Here is the method I'm using to comile dlls for JNI, it is from the FAQ section of the minGw website:
    gcc -Wall -D_JNI_IMPLEMENTATION_ -Wl,--kill-at
    -Ic:/j2sdk1.4.1_02/include -Ic:/j2sdk1.4.1_02/include/win32
    -shared someJavaImp.c -o JavaImp.dll
    Is this how dll should be compiled? If not any suggestions?

    sudsey wrote:
    I know how to program well in C and Java, I just need to know the proper way to compile a dll for JNI.1. Get the MS IDE
    2. Create a dll project - it must NOT be a managed dll
    3. All done.

  • How to compile .java files in windows server

    Hi All,
    I want to compile my CO.java file in server directly how can i do that my server is windows server
    If it is Linux i can login through putty and go to java top and then file location then i use to do javac filename.java then i use to get filename.class but now same thing i did in windows server which is not working please sugget how to do its bit urgent.

    Why do you want to compile it on the server and not in jdeveloper? You should be able to issue the javac command from the prompt. Your unix account must have permissions to that command though.
    For more info on the javac command:
    http://download.oracle.com/javase/1.4.2/docs/tooldocs/windows/javac.html
    Kristofer Cruz

  • Ntopng compilation and installation on Windows Server 2008 R2

    Hi All, need some help on how to compile ntopng source to windows 64-bit OS.
    I tried to look for some good solutions but nothing.
    Cheers, JK

    On Tue, 2 Sep 2014 10:04:26 +0000, njk84 wrote:
    Hi All, need some help on how to compile ntopng source to windows 64-bit OS.
    I tried to look for some good solutions but nothing.
    You're asking about a non-Microsoft product. You should asked the providers
    of the software this question.
    http://www.ntop.org/support/need-help/
    Paul Adare - FIM CM MVP
    An ASCII character walks into a bar and orders a double. "Having a
    bad day?" asks the barman. "Yeah, I have a parity error," replies the
    ASCII character. The barman says, "Yeah, I thought you looked a bit
    off." -- Skud

  • How to compile only prism-es2 native on windows...

    Hi,
    I only desire to compile the JavaFX prism-es2 native for windows.
    (Because the prism-es2.dll is not included in JDK 8).
    The information I have from OpenJFX is:
    https://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX
    (Not very usefull).
    https://wiki.openjdk.java.net/display/Nashorn/Building+Nashorn
    http://hg.openjdk.java.net/jdk8/build/raw-file/tip/README-builds.html
    I do not wish to recompile the JDK 8 in totality !!!!!!
    Only the part Prism-es2 native... How I can do that ???
    I had taken the source code from:
    http://hg.openjdk.java.net/openjfx/8/master/rt
    Thank you ....

    -How to compile OpenJFX ?
    I try several ways (JDK1.6, JDK1.7, ...) to compile and all time,
    I receive a lot of errors.
    (Missing com.sun.javafx.font,
      I do not found these packages: com.sun.javafx.font and com.sun.javafx.text.
          (possibly auto-generated)
    And the use of ant with: -Dbuild.compiler=javac1.7 change absolutely nothing...
    =>This is how finally I compile sucessfully. (After one week of different tests !!!)
    +First, I follow the instructions of:
      https://wikis.oracle.com/display/OpenJDK/Building+OpenJFX
      http://hg.openjdk.java.net/jdk7/build/raw-file/tip/README-builds.html#windows
    Take the source code:
      http://hg.openjdk.java.net/openjfx/8/master
      http://hg.openjdk.java.net/openjfx/8/master/rt
      http://hg.openjdk.java.net/openjfx/8/master/tests
    +From OpenJDK)
    -Basic Windows Check List:    (I follow all the instructions).
    1. Install the CYGWIN product.                          <--Done (The 64 bits version)
    2. Install the Bootstrap JDK, set ALT_BOOTDIR.          <--Done (JDK 1.8)
    3. Optional Import JDK, set ALT_JDK_IMPORT_PATH.    <--Not done(Not necessary for us)
    4. Install the Microsoft Visual Studio Compilers).  <--Done
       Visual Studio 2010 Express (Visual C++/C) installed.
       Windows SDK 7.1 installed (To build 64 bits). ==>WindowsSdkDir added.
       VS100COMNTOOLS is defined.
    5. Setup all environment variables for compilers (see compilers).   <--Done (64 bits)
        ...\Common7\Tools\vsvars32.bat not used because
            ...\VC\bin\amd64\vcvars64.bat is used for 64 bits.
       We set all manually for us)
        set CYGWIN=C:\ProgramFiles\cygwin64\bin
        set VSINSTALLDIR=C:\ProgramFiles(x86)\Microsoft_Visual_Studio10.0
        set WindowsSdkDir=C:\ProgramFiles\Microsoft_SDKs\Windows\v7.1
        set PATH=%VSINSTALLDIR%\vc\bin\amd64;%VSINSTALLDIR%\Common7\IDE;%WindowsSdkDir%\bin;%CYGWIN%;%PATH%
        set INCLUDE=%VSINSTALLDIR%\vc\include;%WindowsSdkDir%\include
        set LIB=%VSINSTALLDIR%\vc\lib\amd64;%WindowsSdkDir%\lib\x64
    6. Install Microsoft DirectX SDK.                         <--Done. (June 2010 version)
       (From: http://www.microsoft.com/en-ca/download/details.aspx?id=6812)
       set DXSDK_DIR=C:\ProgramFiles(x86)\MicrosoftDirectX_SDK(June2010)
       set INCLUDE=%INCLUDE%;%DXSDK_DIR%\Include;
       set LIB=%LIB%;%DXSDK_DIR%\Lib\x64;
    7. Install Ant 1.7.1 or newer, make sure it is in your PATH and set ANT_HOME. <--Done.
       (The version 1.9.1)
    And also)
      -So it's important that the Visual Studio paths in PATH preceed the CYGWIN path /usr/bin.
          (due to link.exe)        <--Done
      -And for the: MSVCR100.DLL   <--Done
       set ALT_MSVCRNN_DLL_PATH=%VSINSTALLDIR%\Common7\Packages\Debugger\X64 (This is the only place found)
       set LIB=%LIB%;%ALT_MSVCRNN_DLL_PATH%;
    +From OpenJFX)
    I follow all the instructions...
    But for antlr, I use the version from: http://www.antlr3.org/download/
    -Change inside build-src\genVSproperties.bat
    to include my zzz_batch1\c_settings1.bat
    c_settings1.bat)
    REM ------------------------------------------------------------------------
    REM PATCH ZZZ....Visual Studio 2010...
    Rem Must be called by master\build-src\genVSproperties.bat
    REM Result is inside vs.properties
    REM No .NET\Framework...
    REM These lines will be installation-dependent.
    set CYGWIN=C:\ProgramFiles\cygwin64\bin
    set VSINSTALLDIR=C:\ProgramFiles(x86)\Microsoft_Visual_Studio10.0
    set WindowsSdkDir=C:\ProgramFiles\Microsoft_SDKs\Windows\v7.1
    set DXSDK=C:\ProgramFiles(x86)\MicrosoftDirectX_SDK(June2010)
    set ALT_MSVCRNN_DLL_PATH=%VSINSTALLDIR%\Common7\Packages\Debugger\X64
    REM The following should be largely installation-independent.
    set VCINSTALLDIR=%VSINSTALLDIR%\VC
    REM
    set INCLUDE=%VCINSTALLDIR%\include;%WindowsSdkDir%\include;%DXSDK%\Include;%INCLUDE%
    set LIB=%VCINSTALLDIR%\lib\amd64;%WindowsSdkDir%\lib\x64;%DXSDK%\Lib\x64;%ALT_MSVCRNN_DLL_PATH%;%LIB%
    set LIBPATH=%VCINSTALLDIR%\lib;%LIBPATH%
    REM
    set DEVENVDIR=%VSINSTALLDIR%\Common7\IDE
    set DEVENVCMD=%DEVENVDIR%\VCExpress.exe
    REM
    set PATH=%VCINSTALLDIR%\bin\amd64;%VSINSTALLDIR%\Common7\IDE;%WindowsSdkDir%\bin;%CYGWIN%;%PATH%
    REM echo "%DEVENVDIR%" %DEVENVDIR%
    REM ------------------------------------------------------------------------
    genVSproperties.bat)
    if not exist "%DEVENVCMD%" set DEVENVCMD=%DEVENVDIR%\VCExpress.exe
    REM ZZZ Patch...
    call ..\zzz_batch1\c_settings1.bat
    REM Echo out a properties file
    Now I receive a lot of errors at the compilation:
    jar:
        [mkdir] Created dir: C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\javafx-ui-quantum\build\classes
        [javac] Compiling 43 source files to C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\javafx-ui-quantum\build\classes
        [javac] C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\javafx-ui-quantum\src\com\sun\javafx\tk\quantum\SceneState.java:49: error: constructor PresentableState in class PresentableState cannot be applied to given types;
        [javac]         super();
        [javac]         ^
        [javac]   required: View
    etc ...
    After search, I found that the compilation process, use the file:
       C:\ProgramFiles\Java\jdk1.8.0\jre\lib\ext\jfxrt.jar
       I rename it: jfxrt.jarXXX
       (I don't know how this jar is included after some searchs).
       After the C:\zgroup1\userbase1\javafx1\open-jfx\master\artifacts\sdk\rt\lib\ext\jfxrt.jar
       causes the same errors. I create an empty jar named jfxrt.jar.
       Now I can recompile all, (After a clean)
       I clean all, I recompile but I have the another errors.
    I change the rt\build.xml:
           <condition property="include.ogl">
              <istrue value="${isWindows}"/>
            </condition>
         <!--
            Build targets...
          -->
        <target name="jar" depends="init">
            <ant antfile="${rt.root.dir}/javafx-accessible/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-common/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-logging/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/glass/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-beans/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-util-converter/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-anim/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-geom/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/pisces/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/decora-compiler/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/decora-runtime/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-sg-common/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-ui-common/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-concurrent/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/prism-util/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/prism-common/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-ui-quantum/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-sg-prism/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-embed-swing/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-ui-controls/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-ui-charts/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/decora-prism/build.xml" target="jar" inheritAll="false"/>
            <antcall target="jar-decora-d3d"/>
            <antcall target="jar-decora-es2"/>
            <ant antfile="${rt.root.dir}/decora-jsw/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/decora-prism-sw/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/decora-prism-ps/build.xml" target="jar" inheritAll="false"/>
            <antcall target="jar-decora-sse"/>
            <ant antfile="${rt.root.dir}/prism-util/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/prism-common/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/prism-j2d/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/prism-ps/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/prism-null/build.xml" target="jar" inheritAll="false"/>
            <antcall target="jar-prism-sw"/>
            <antcall target="jar-prism-d3d"/>
            <antcall target="jar-prism-es2-all"/>
            <ant antfile="${rt.root.dir}/javafx-beans-dt/build.xml" target="jar" inheritAll="false"/>
            <ant antfile="${rt.root.dir}/javafx-fxml/build.xml" target="jar" inheritAll="false"/>
            <antcall target="jar-javafx-android"/>
            <antcall target="jar-javafx-embed-swt"/>
            <ant antfile="${rt.root.dir}/javafx-builders/build.xml" target="jar" inheritAll="false"/>
        </target>
    I recompile and now:
    jar:
        [mkdir] Created dir: C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\javafx-ui-common\build\classes
        [javac] Compiling 471 source files to C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\javafx-ui-common\build\classes
        [javac] C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\javafx-ui-common\src\com\sun\webkit\dom\JSObject.java:30: error: cannot find symbol
        [javac] import netscape.javascript.JSException;
        [javac]                           ^
        [javac]   symbol:   class JSException
    --->Compile webview (and webview needs another packages, circular problems)...
    Recompile all is not really possible due to intersecting packages...
    I change rt\glass\glass\build.xml because missing)
        <property name="jfx.accessible.dir" value="${rt.dist.root.dir}/javafx-accessible"/>
        <property name="jfx.accessible.jar" value="${jfx.accessible.dir}/dist/javafx-accessible.jar"/>
    Now I recompile, I have errors but now I understand something.
    When master\artifacts\sdk\rt\lib\ext\jfxrt.jar is the empty version, I compile at a certain point.
    I copy the C:\ProgramFiles\Java\jdk1.8.0\jre\lib\ext\jfxrt.jar to master\artifacts\sdk\rt\lib\ext
    and I able to go to another point. When errors, I take the empty version and alternatively I pass
    from the empty to full version.
    Finally I compile all and:
    dist:
         [echo] Creating merged openjfxrt.jar file
        [mkdir] Created dir: C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\dist\lib
          [jar] Building jar: C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\dist\lib\openjfxrt.jar
         [echo] Copying binaries
        [mkdir] Created dir: C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\dist\bin
         [copy] Copying 1 file to C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\dist\bin
    BUILD SUCCESSFUL
    I have my ES2 (Decora,Prism) part compiled with prism-es2.dll inside prism-es2-native.jar
    Now I will test all !!!

  • Trying to install Acrobate 8 Standard on PC with Windows 7, 64 bit. During the installation I was asked to provide "File Adobe PDF.dll for Windows Vista. How can I obtain the required file?

    Trying to install Acrobate 8 Standard on PC with Windows 7, 64 bit. During the installation I was asked to provide "File Adobe PDF.dll for Windows Vista. How can I obtain the required file?

    Nothing in the Acrobat 8.x product family is compatible with Windows 7 (or any contemporary OS).
    The Acrobat 8.x product family passed into End of Support way back -- (November 2011).
    The current release of Acrobat (XI) is compatible in Windows 7.
    Be well...

  • How to compile a java file in J9 for windows mobile 5.0

    I have downloaded J9 for windows mobile 5.0 and need help on how to compile a java file.

    You can compile your source code using J2SE ;)
    may be this is important for you:
    http://awareness.ics.uci.edu/~rsilvafi/pocketPC/index.
    html
    Regards!!!Actually i am using some eSWT related classes also.. so is there any way to compile from the J9 environment using J9 console..

  • How to compile a form built in forms 10g on windows platform?

    Hi All,
    I have built a 10g form on my local desktop on windows 7 and compiled/deployed it in apps on linux server.
    I need to deploy the same form fmb on oracle apps hosted on windows platform. Please let me know if fmb works fine or not. And also provide how to compile form in windows platform..like frmcmp_batch command
    Thanks,
    Veena

    The fmb, mmb, and pll files are portable to any platform where Forms can be installed. Every installation that supports running Forms comes with the necessary components to generate the executible files (fmx, mmx, plx). On your Windows machine, if you have the Builder installed, you can generate an FMX using the Builder. If not, you can directly use the compiler. The compiler has a gui option and a command line option. If you do not pass any arguments into the executible (frmcmp.exe) the GUI will start. Alternatively you can generate from the command line (DOS). You may need to set PATH, ORACLE_HOME, TNS_ADMIN, and possibily some others in the DOS shell in order for it to work.
    If you have access to MyOracleSupport, refer to the following note:
    <blockquote>Moving Forms Applications From One Platform Or Machine To Another (Doc ID 299938.1)</blockquote>
    Example:
    <blockquote>frmcmp.exe module=myForm module_type=form userid=scott/tiger@orcl compile_all=yes</blockquote>
    More options are discussed in the Builder Online help and the compiler help.

  • How To Compile Forms 10g Devloped in Windows For Deployment In RHEL

    can any budy give me script file for compiling forms 10g ,which i developed in windows and need to be deployed in RHEL 5
    How To Compile Forms 10g Devloped in Windows For Deployment In RHEL 5
    any budy plzzz help

    You could try something like this:
    for i in `ls *.pll`
    do
    echo Compiling Library $i ....
    frmcmp.sh userid=me/me@medb batch=no module=$i module_type=library compile_all=yes window_state=minimize
    done
    for i in `ls *.mmb`
    do
    echo Compiling Library $i ....
    frmcmp.sh userid=me/me@medb batch=no module=$i module_type=menu compile_all=yes window_state=minimize
    done
    for i in `ls *.fmb`
    do
    echo Compiling Library $i ....
    frmcmp.sh userid=me/me@medb batch=no module=$i module_type=form compile_all=yes window_state=minimize
    done

  • How To Compile Forms 10g Devloped in Windows For Deployment In RHEL 5

    can any budy give me script file for compiling forms 10g ,which i developed in windows and need to be deployed in RHEL 5
    How To Compile Forms 10g Devloped in Windows For Deployment In RHEL 5
    any budy plzzz help

    Why not ask over at the Forms forum?
    Forms
    This is the Oracle Designer forum

  • How do i solve the following problem. By starting up the message appears: could not found CoreFoundation.dll. Windows error 7

    By starting up the following message appaers: could not found CoreFoundation.dll.
    Windows Error 7
    How can I solve this problem?

    With Windows Explorer, navigate to your C:\Program Files\Common Files\Apple\Apple Application Support folder.
    Copy the SQLite3.dll that you should find there, navigate to the nearby Mobile Device Support folder, and Paste it in there also.
    Restart the programme all should be well
    In case that your OS is (64 bit)
    1. Open windows explorer, go to location C:\Program Files (x86)\Common Files\Apple\Apple Application Support
    2. Copy file "SQLite3.dll"
    3. Now paste it in the folder  C:\Program Files (x86)\Common Files\Apple\Mobile Device Support
    4. Restart the programme, it should not display that message, it should be clear.
    Good Luck

  • How to read compiler msgs in DOS window?

    Hi,
    I'm just starting java programming and I'm doing the compilation in a DOS window. However it doesn't scroll. What do you guys do when the error messages go off the top of the screen?
    Steve

    Hello Steve,
    You didn't say which operating system you are running, But I suspect that you are running either Windows/95 or Windows/98. Normally the output from a command run in a DOS window goes to standard output. So when you list the files in a directory with the 'dir' command the output can be redirect with the greater than sign. As in:
    C:\>dir > dirlist.txt
    The trouble that you may encounter (if you are running Windows/95 or Windows/98) is: The error messages from javac are NOT sent to standard output (stdout), but are sent to standard error (stderr) instead. On some Windows operating systems, notably Windows/95 and Windows/98 there is no support for redirecting output from standard error. Windows/NT does provide support for redirecting output from standard error.
    Redirecting the standard error output is more difficult; COMMAND.COM doesn't give you any way to do it, but you can either get an add-on utility to do it or use a more powerful shell like 4DOS at:
    http://www.jpsoft.com/
    that does allow this as a standard feature.
    Another solution is to use an IDE such as Forte for Java. See:
    http://www.skylit.com/javamethods/faqs/scrollout.html
    for another solution.
    -Merwyn,
    Developer Technical Support,
    http://www.sun.com/developers/support.

  • Can't build "hprof.dll" on Windows [JDK5.0]

    Hello everyone!
    Now,I am trying to build "hprof.dll" on windows, because I want to customize "Hprof".The "hprof" source code is included in "JDK DEMO(see %JAVA_HOME%\demo\jvmti\hprof\src)".
    I have not changed the source code at all.
    However,Building doesn't go well.
    My environment
    windows Xp sp1
    J2SE5.0 [<-JAVA_HOME=C:\Program Files\Java\jdk1.5.0_05]
    VC++6.0
    I made a simple batch file to build it referring to "sample.makefile.txt".
    I executed this batch file in "%JAVA_HOME%\demo\jvmti\hprof\src".
    ---build batch----------------------------------------
    set JDK_INC=C:\Program Files\Java\jdk1.5.0_05\include
    set CFLAGS= -Ox -Op -Zi -Gy -W0 -WX -DHPROF_LOGGING -DNDEBUG -I. -I..\..\java_crw_demo\src -I"%JDK_INC%" -I"%JDK_INC%\win32"
    del /F *.obj *.exp *.lib
    del /F hprof_md.c
    copy .\windows\hprof_md.c hprof_md.c
    cl %CFLAGS% /c *.c
    link -dll -out:MyHprof.dll *.obj wsock32.lib winmm.lib
    pause
    -----Result-------------------------------------------
    debug_malloc.c
    hprof_blocks.c
    hprof_class.c
    hprof_cpu.c
    hprof_error.c
    hprof_event.c
    hprof_frame.c
    hprof_init.c
    hprof_io.c
    hprof_ioname.c
    hprof_listener.c
    hprof_loader.c
    hprof_md.c
    C:\Program Files\Microsoft Visual Studio\VC98\include\winsock2.h(99) : error C2011: 'fd_set' : 'struct' type redefinition
    C:\Program Files\Microsoft Visual Studio\VC98\include\winsock2.h(134) : note C6311: C:\Program Files\Microsoft Visual Studio\VC98\include\winsock.h(83) :see previous definition of 'FD_SET'.
    C:\Program Files\Microsoft Visual Studio\VC98\include\winsock2.h(143) : error C2011: 'timeval' : 'struct' type redefinition
    C:\Program Files\Microsoft Visual Studio\VC98\include\winsock2.h(199) : error C2011: 'hostent' : 'struct' type redefinition
    C:\Program Files\Microsoft Visual Studio\VC98\include\winsock2.h(212) : error C2011: 'netent' : 'struct' type redefinition
    C:\Program Files\Microsoft Visual Studio\VC98\include\winsock2.h(219) : error C2011: 'servent' : 'struct' type redefinition
    C:\Program Files\Microsoft Visual Studio\VC98\include\winsock2.h(226) : error C2011: 'protoent' : 'struct' type redefinition
    C:\Program Files\Microsoft Visual Studio\VC98\include\winsock2.h(310) : error C2011: 'in_addr' : 'struct' type redefinition
    [continues]
    C:\Program Files\Microsoft Visual Studio\VC98\include\winsock2.h(2258) : error C2375: 'WSAAsyncGetProtoByNumber' : redefinition; different linkage
    C:\Program Files\Microsoft Visual Studio\VC98\include\winsock.h(810) : see declaration of 'WSAAsyncGetProtoByNumber'
    C:\Program Files\Microsoft Visual Studio\VC98\include\winsock2.h(2283) : error C2375: 'WSAAsyncGetHostByName' : redefinition; different linkage
    C:\Program Files\Microsoft Visual Studio\VC98\include\winsock.h(814) : see declaration of 'WSAAsyncGetHostByName'
    C:\Program Files\Microsoft Visual Studio\VC98\include\winsock2.h(2310) : error C2375: 'WSAAsyncGetHostByAddr' : redefinition; different linkage
    C:\Program Files\Microsoft Visual Studio\VC98\include\winsock.h(818) : see declaration of 'WSAAsyncGetHostByAddr'type redefinition
    C:\Program Files\Microsoft Visual Studio\VC98\include\winsock2.h(2333) : error C2375: 'WSACancelAsyncRequest' : redefinition; different linkage
    C:\Program Files\Microsoft Visual Studio\VC98\include\winsock.h(822) : see declaration of 'WSACancelAsyncRequest'type redefinition
    C:\Program Files\Microsoft Visual Studio\VC98\include\winsock2.h(2353) : error C2375: 'WSAAsyncSelect' : redefinition; different linkage
    C:\Program Files\Microsoft Visual Studio\VC98\include\winsock.h(824) : see declaration of 'WSAAsyncSelect'type redefinition
    hprof_monitor.c
    hprof_object.c
    hprof_reference.c
    hprof_site.c
    hprof_stack.c
    hprof_string.c
    hprof_table.c
    hprof_tag.c
    hprof_tls.c
    hprof_trace.c
    hprof_tracker.c
    hprof_util.c
    C:\Program Files\Java\jdk1.5.0_05\demo\jvmti\hprof\src>link -dll -out:MyHprof.dll *.obj wsock32.lib winmm.lib
    Microsoft (R) Incremental Linker Version 6.00.8447
    Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
    Linking...
    hprof_init.obj : error LNK2001: unresolved external symbol "_md_get_milliticks
    hprof_io.obj : error LNK2001: unresolved external symbol "_md_get_milliticks
    hprof_init.obj : error LNK2001: unresolved external symbol "_md_init
    hprof_util.obj : error LNK2001: unresolved external symbol"_md_snprintf
    [continues]
    hprof_listener.obj : error LNK2001: unresolved external symbol "_md_ntohs
    hprof_listener.obj : error LNK2001: unresolved external symbol "_md_ntohl
    hprof_listener.obj : error LNK2001: unresolved external symbol "_md_shutdown
    hprof_tls.obj : error LNK2001: unresolved external symbol "_md_get_thread_cpu_timemillis
    MyHprof.dll : fatal error LNK1120: 29 unresolved externals
    The problem is the compile error of "hprof_md.c". (VC compile Error No : C2011, C2375)
    I think that the link error in the end part is solved with this compile error.
    Because "sample.makefile.txt" is for GNU make, I tyied to build using Cygwin and GNU make.
    but the same compile error went out.
    My Knowledge is insufficient concerning C/C++ development....
    I have no idea how to deal with this error.
    Who can help me about this problem ? please give me some answers!
    Thank you for reading .
    Sorry my poor English...
    Masahiro Kouda

    Do you have the specific name of the C++ compiler you are using?
    The actual name on the box and the specific version string?
    I'll look into this, sorry I didn't see this earlier.
    -kto

  • How to compile a single file in a project

    I have placed my java connector file called "xxxTargetconnector .class" in the below mentioned path
    D:\FSCM9DMO\webserv\FSCMDMO9\applications\peoplesoft\PSIGW\WEB-INF\classes\com\peoplesoft\pt\integrationgateway\targetconnector
    I have converted the above class file in to a java file using a decompiler.Now i would like to recompile the java file to get the byte code.This class file imports many class files from jar files which is placed in the below mentioned path.
    D:\FSCM9DMO\webserv\Cybersource.
    Before compiling i set the path to include the jar files
    for ex , set path = D:\FSCM9DMO\webserv\Cybersource
    For compilation i went to the below path using command prompt and compiled the particular file.
    D:\FSCM9DMO\webserv\FSCMDMO9\applications\peoplesoft\PSIGW\WEB-INF\classes\com\peoplesoft\pt\integrationgateway\targetconnector>javac xxxTargetConnector.java
    Unfortunately i got around 99 errors saying
    xxxTargetConnector.java:187: cannot find symbol
    symbol : variable Logger
    location: class com.peoplesoft.pt.integrationgateway.targetconnector.xxxTargetConnector
    How to compile a single file in a project ?

    According to [http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html], "As a special convenience, a class path element containing a basename of * is considered equivalent to specifying a list of all the files in the directory with the extension .jar or .JAR. I have never tried using this feature.
    So if all of your dependent classes are in in jar files that are in D:\FSCM9DMO\webserv\Cybersource, a command like the following should work.
    javac -cp D:\FSCM9DMO\webserv\Cybersource\* xxxTargetConnector.java
    Note that setting your operating system path variable has no impact on where Javac looks for dependent classes.

Maybe you are looking for