Failure to use javac j2sdk1.4.2_04

My laptop has installed on it Windows XP SP2. J2sdk1.4.2_04 ikons some shows instability. Jdb DOS command is stable and I am able to use it. Javac and appletviewer DOS command prompts are
unstable and as soon as I click their ikons their DOS command is seen momentarily and then
closes spontaneously. The Windows System Environment variables relating to j2sdk have all been set including JavaHome, path, javac options etc.
I wonder if there is a step that I have not done that is necessary for proper function of javac and appletviewer?

From your description it sounds like you've opened an Explorer window to C:\j2sdk1.4.2_04\bin\ and are clicking on the javac.exe and appletviewer.exe listings. If so, that's not correct - the expected result of that action is as you describe.
Open a Command Prompt window - usually done by clicking on the Start Menu > Programs > Accessories > Command Prompt shortcut. In that, type the commands with their arguments.
Java is a commandline environment, not a Graphical User Environment (GUI).
As jsalonen suggested, the tutorial has detailed instructions for beginners.

Similar Messages

  • OC4J 10G on Windows2000 with J2SDK1.4.2_04

    C:\oc4j\j2ee\home>java -jar oc4j.jar
    04/05/14 19:01:01 Auto-deploying ../../home/applications/admin_ejb.jar (New serv
    er version detected)... Error in application default: Error loading package at f
    ile:/C:/oc4j/j2ee/home/applications/admin_ejb.jar, javac.exe not found under C:\
    Program Files\Java\j2re1.4.2_04, please use a valid jdk or specify the location
    of your java compiler in server.xml using the <java-compiler .../> tag
    Error initializing server: Error initializing ejb-module, Exception: javac.exe n
    ot found under C:\Program Files\Java\j2re1.4.2_04, please use a valid jdk or spe
    cify the location of your java compiler in server.xml using the <java-compiler .
    ../> tag
    Fatal error: Cannot instantiate ApplicationServerThread AND not in embedded mode
    - forcing exit
    Why is OC4J looking in C:\Program Files\Java\j2re1.4.2_04 instead of c:\j2sdk1.4.2_04?

    Thanks, Avi. I feel silly for overlooking this simple step. I added "c:\j2sdk1.4.2_04\bin" at the end of the PATH variable but that didn't work. When I moved it to the beginning, I finally got it to work.

  • Does easyIO.* package come with j2sdk1.4.2_04, Win32?

    ...My first post.
    -Hello everyone.
    I have installed and compiled and executed some small *.java files with great success. I'd be very happy if someone knew how to install this package, or got some clues where to look. Thanks in advance and thanks alot.
    [Klokker.java]
    import easyIO.*;
    class Klokker {...}
    [javac says:]
    c:\tools\......\j2sdk1.4.2_04\bin\javac Klokker.java
    Klokker.java:1: package easyIO does not exist
    import easyIO.*;
    ^

    No, easyIO is not a part of the standard J2SDK. Where did you get it from? Software development libraries usually come with documentation that explains how to install and use them (e.g. a text file called "README" or "INSTALL")
    If you happen to speak Norwegian you can find some instructions here:
    http://www.universitetsforlaget.no/java/easyIO.php

  • Help classpath problem j2sdk1.4.2_04

    help classpath problem j2sdk1.4.2_04
    how can i run the java program with specify the file location
    such as :
    -----this one is fine ok and return HelloWorld.class-----
    [root@localhost root]javac /serverData/studentAC/s001/HelloWorld.java
    -----but this one cause exception-----
    [root@localhost root]java /serverData/studentAC/s001/HelloWorld
    -----result-----
    Exception in thred "main" java.lang.NoClassDefFoundError: /serverData/studentAC/s001/HelloWorld
    [root@localhost root]
    I have tried a lot of classpath setting:
    I just want to compile and run the java program without specify the classpath only !! please help !!! and give suggest !! if you have this exp!!
    # ---1
    #PATH=/usr/java/j2sdk1.4.2_04/bin:$PATH:$HOME/bin:./
    #export PATH
    #export JAVA_HOME=/usr/java/j2sdk1.4.2_04/
    #export #CLASSPATH=/usr/java/j2sdk1.4.2_04/lib/tools.jar:/usr/java/j2sdk1.4.2_04/jre/lib/rt.jar:./
    # ---2
    #set java environment
    # Java Setup Section START
    export JAVA_HOME="/usr/java/j2sdk1.4.2_04"
    export JRE="$JAVA_HOME/jre"
    export CLASSPATH="$JAVA_HOME/lib:$JRE/lib:$JAVA_HOME/lib/tools.jar:."
    export PATH="$PATH:$JAVA_HOME/bin"
    # Java Setup Section END
    # ---3
    #PATH=$PATH:/usr/java/j2sdk1.4.2_04/bin
    #JAVA_HOME=/usr/java/j2sdk1.4.2_04/
    #export PATH
    # ---4
    # Java Setup Section START
    #JAVA_HOME=/usr/java/j2sdk1.4.2_04
    #export JAVA_HOME
    #CLASSPATH=$CLASSPATH:/usr/java/j2sdk1.4.2_04/lib:/usr/java/j2sdk1.4.2_04/jre/lib:./
    #export CLASSPATH
    #PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin
    #export PATH
    # Java Setup Section END
    # ---5
    #export PATH=$PATH:/usr/java/j2sdk1.4.2_04/bin
    #export JAVA_HOME=/usr/java/j2sdk1.4.2_04
    #export CLASSPATH=/usr/java/j2sdk1.4.2_04/lib:$CLASSPATH:.
    # ---6
    #====================================================
    #export JAVA_HOME=/usr/java/j2sdk1.4.2_04
    #export PATH=$JAVA_HOME/bin:$PATH
    #export CLASSPATH=/usr/java/j2sdk1.4.2_04/lib:$CLASSPATH
    #====================================================

    I think this will work. java -classpath /serverData/studentAC/s001 HelloWorld

  • Class not found with j2sdk1.4.2_04 but no problem with MS VM

    Hi.
    there is an application on my company's intranet hat has some applets. I installed the j2sdk1.4.2_04 and whenever I start the aplication it says "java.lang.ClassNotFoundException", but if i turn of the j2se for applets (on IE 6.0 sp1: tools>internet options>advances>uncheck use java 2 for ...) and use the microsoft VM the application works just fine.
    can someone help me???

    It seems your application uses classes from Microsoft, not only common classes (JDK 1.1.4). What the name of class in ClassNotFoundException?
    Michael

  • Using javac and XP

    Hello,
    I am using Windows XP Home Edition and j2sdk1.4.1_01.
    I am getting the following error message upon trying to use javac from the command prompt:
    'javac' is not recognized as an internal or external command,
    operable program or batch file.
    Below is my output upon trying to use javac. I have also provided my current path. Also, as you can see javac.exe is present in the bin directory.
    How do I enable javac from any directory? The instruction Sun provides doesn't seem to work for XP!
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings>path
    PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\j2sdk1.4.1_01\bin
    C:\Documents and Settings\>javac
    'javac' is not recognized as an internal or external command,
    operable program or batch file.
    C:\Documents and Settings\>java
    Usage: java [-options] class [args...]
    (to execute a class)
    or java -jar [-options] jarfile [args...]
    (to execute a jar file)
    where options include:
    -cp -classpath <directories and zip/jar files separated by ;>
    set search path for application classes and resources
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version and exit
    -showversion print product version and continue
    -? -help print this help message
    -X print help on non-standard options
    Here is my <C:\j2sdk1.4.1_01\bin> directory below. As you can see javac.exe is present in the bin directory:
    C:\Documents and Settings>cd ../j2sdk1.4.1_01\bin
    C:\j2sdk1.4.1_01\bin>dir
    Volume in drive C is IBM_PRELOAD
    Volume Serial Number is 6C67-7C74
    Directory of C:\j2sdk1.4.1_01\bin
    01/16/2003 03:21 PM <DIR> .
    01/16/2003 03:21 PM <DIR> ..
    09/30/2002 02:08 AM 28,794 appletviewer.exe
    09/30/2002 02:08 AM 28,792 extcheck.exe
    09/30/2002 02:08 AM 16,384 HtmlConverter.exe
    09/30/2002 02:08 AM 28,794 idlj.exe
    09/30/2002 02:08 AM 28,775 jar.exe
    09/30/2002 02:08 AM 28,796 jarsigner.exe
    01/16/2003 03:21 PM <DIR> java
    09/30/2002 02:08 AM 24,672 java.exe
    09/30/2002 02:08 AM 28,789 javac.exe
    09/30/2002 02:08 AM 28,795 javadoc.exe
    09/30/2002 02:08 AM 28,789 javah.exe
    09/30/2002 02:08 AM 28,785 javap.exe
    09/30/2002 02:08 AM 24,674 javaw.exe
    09/30/2002 02:08 AM 28,798 jdb.exe
    09/30/2002 02:08 AM 28,792 keytool.exe
    09/30/2002 02:08 AM 28,788 kinit.exe
    09/30/2002 02:08 AM 28,788 klist.exe
    09/30/2002 02:08 AM 28,786 ktab.exe
    09/30/2002 02:08 AM 28,806 native2ascii.exe
    09/30/2002 02:08 AM 28,811 orbd.exe
    09/30/2002 02:08 AM 28,798 policytool.exe
    09/30/2002 02:08 AM 28,780 rmic.exe
    09/30/2002 02:08 AM 28,786 rmid.exe
    09/30/2002 02:08 AM 28,798 rmiregistry.exe
    09/30/2002 02:08 AM 28,797 serialver.exe
    09/30/2002 02:08 AM 28,823 servertool.exe
    09/30/2002 02:08 AM 28,813 tnameserv.exe
    26 File(s) 728,003 bytes
    3 Dir(s) 21,616,312,320 bytes free
    C:\j2sdk1.4.1_01\bin>
    As you can see javac.exe is present in the bin directory. How do I enable javac from any directory? The instruction Sun provides doesn't seem to work for XP!
    Thanks, Harvey

    These 2 tests have different errors, and therefore have different solutions.
    I either get:
    C:\Documents and Settings\SHEILA.IBM-IDIYAYPGDZV>cd
    ../../j2sdk1.4.1_01\bin\java
    c hello.java
    The system cannot find the path specified., The error message indicates that MSDOS can not find ../../j2sdk1.4.1_01\bin\javac. Perhaps this is just a typo in your post, but ../../ won't work in MSDOS, at least on my machine. It has to be ..\..\ but when I try the same command adapted for my system and correct the /, it works. (By 'works' I mean the javac.exe is found.)
    C:\Documents and Settings\Walt>..\..\j2sdk1.4.0\bin\javac
    or
    C:\j2sdk1.4.1_01\bin>javac hello.java
    error: cannot read: hello.java
    1 error
    when everything is C:\j2sdk1.4.1_01\bin.In this case, MSDOS found the javac.exe file and executed it. The error message is from the javac compiler and it means the compiler looked in C:\j2sdk1.4.1_01\bin and could not find a file named hello.java. Use the command "dir" and make sure that the file hello.java exists in this directory - especially make sure that the file is not named hello.java.txt
    Going back over your posts, it appears that you have set your Path correctly, so perhaps the "cannot read:" error was the main problem.

  • JDev 10.1.3 and JDK1.2.2 use javac problem

    I have an old application that I need to compile in 1.2.2, and have tried the "use javac" checkbox on the project properties compile page. The compiler seems to run, but there is an intential error in the code. I put it there, because the class file didn't seem to get generated. I tried this on command line, and apparently '-source' is an invalid option in 1.2.2.
    E:\jdk1.2.2\bin\javac.exe -J-mx512m -verbose -source 1.2 -target 1.2 -encoding Cp1252 -g -classpath E:\jdk1.2.2\jre\lib\rt.jar;E:\jdk1.2.2\jre\lib\i18n.jar;E:\jdk1.2.2\jre\classes;E:\app\codebase;E:\oracle\jdev1013\j2ee\home\lib\ojsp.jar;E:\oracle\jdev1013\j2ee\home\jsp\lib\taglib\ojsputil.jar;E:\oracle\jdev1013\j2ee\home\oc4j.jar;E:\oracle\jdev1013\j2ee\home\lib\oc4j-internal.jar;E:\oracle\jdev1013\j2ee\home\lib\servlet.jar;E:\oracle\jdev1013\jdev\lib\ojc.jar -sourcepath E:\app\src -d E:\PTC\Windchill\codebase @C:\DOCUME~1\gteft\LOCALS~1\Temp\javac30279.tmp
    [1:53:55 PM] Successful compilation: 0 errors, 0 warnings.
    Has anyone else run into this?
    Any help or thoughts on how to adjust this behavior for 1.2.2's javac would be appreciated.

    Thank you for responding. I am aware of (and frustrated by) issues and limitations due to this application's dependancies on an aging platform, and would upgrade if it were my choice. The dependancy is in the vendor's API, and not in code that I can change.
    As the invalid option was not captured as a message or counted as an error, I thought that perhaps this could be a potential issue for using javac with any version.
    I was hoping to see if there were additional settings controlling the command line options that I couldn't find.
    Thanks,
    Greg

  • HI, Im using Iphone 4 and i recently got my IOS updated to IOS7 and  now im getting the error message as "PDP authentication failure" Im using Aircel carrier.

    HI, Im using Iphone 4 and i recently got my IOS updated to IOS7 and  now im getting the error message as "PDP authentication failure" Im using Aircel carrier.
    Please let me know how to fix this issue

    update...
    I am not one to give up. So I called AT&T today. Now they are telling me they canceled my order because they were unable to fulfill my order. Basically, AT&T told me they sold out so they canceled my order so I can proceed to reorder again. It took them 4 days to realize this. I will be lucky if I get a new phone by Christmas. I am sure they will find a way to cancel my order again.
    Again, I argued, how is this my fault. I placed my order at the store around 11 a.m. Pacific time. My friend ordered his phone online sometime after me. He got his but my order was canceled. AT&T tried to explain to me that they sold over 600,000 phones, almost 500 per minute during there peak. Again, I asked, how this was my fault.
    I can understand over selling the phone. It is a great product. There is no reason to cancel my order. You adjust my order and tell me you will let me know when my phone will be in. I would have been mad that my phone was going to be late but I would have survived. At least I would be getting one.
    At this point, I have no order and AT&T or Apple website will allow me to order one. I just want to get in the QUEUE for one.
    Frustrated.

  • How to solve the error message "Could not activate cellular data network: PDP authentication failure"when using 3g or gPRS on safari with an iphone 4 and latest software updates

    Please can someone help me to solve the error message "Could not activate cellular data network: PDP authentication failure"when using 3G or GPRS on safari with an iphone 4GS and latest software updates. I have tried resetting the network and phone settings. I have restored the factory settings on itunes and still the problem persists.

    All iPhones sold in Japan are sold carrier locked and cannot be officially unlocked by the carrier. If you unlocked it, it was by unauthorized means (hacked), and support cannot be given to you in this forum.
    Hacked iPhones are subject to countermeasures by Apple, particularly when updating the firmware. It is likely permanently re-locked or permanently disabled.
    Message was edited by: modular747

  • Unable to use javac or jar commands

    Hi all,
    I've been using my IDE to compile and run my programs. However, when I want to use -javac or -jar commands in my command prompt, it doesnt work.
    The error is :
    'javac' is not recognised as an internal or external command,
    operable program or batch file
    Same goes for jar
    -java works for me. Why is that so? I hope anyone can give me solution.
    Note : I'm on windows vista
    Another question :
    I've been using JMF (Java Media Framework) to develop a simple audio player. However it can be run on my pc. What happens if I try to run the program at another pc, will it still work? The other pc will not have JMF installed, but will have JRE to run java apps. If it cannot be run on the other pc, is there any solution?
    Thank you for your kind assistance.
    Edited by: TrAnScEnD3nT on Sep 30, 2007 10:18 PM
    Reason : Sorry I have mixed up java and javac, I've corrected it.

    Mainta? That's my favourite!This time...
    In very general terms the PATH is a system variable that is maintained and used by your operating system or shell (not Java) to locate executable files. So, for instance, if you type the command:
    >writeit will be the PATH that Windows uses to locate the write.exe word processor.
    The directory containing the Java tools - java.exe, javaw.exe, jar.exe, appletviewer.exe etc - very commonly goes into the PATH variable.
    The classpath is a list of locations that Java uses to locate classes (as you said). It is used by Java and not your operating system. It is commonly (but not always) set each time you use one of the Java tools. There is a -cp switch that lets you do this. For instance a common command to compile a file would be
    >javac -cp . HelloWorld.javaThe "-cp ." bit means "the classpath shall be the current directory".
    Setting a particular classpath does not, in general, affect the "built in" classes of Java, so you don't have to worry about this. If you search the documentation that came with your distribution you will find the exact rules for "how classes are found": but to begin with the important thing is that any classes you write must be included in the classpath which can be specified as part of the commands to compile or run your code.

  • Why I can't use javac? and why my program doesn't pop up cmd window?

    I have 2 questions here:
    1) I try to compile my HelloWorld.java using command prompt,
    javac HelloWorld.java
    But it won't work; by right it should create a HelloWorld.class. When I go to Configure/Options/JDK Profile, it is already showing JDK version 1.6.0_07. My environment variables show User variables and System variables with C:\Program Files\Java\jdk1.6.0_07\bin. This is where my JDK is stored, but I don't know why I can't use javac. It keep saying
    'javac' is not recognized as an internal or external command, operable program or batch file
    2) Why is it when I run my java script using JCreator, the print out appear in the box below in JCreator and not in command prompt? How can I make it pop up on command prompt window?

    Things tend to move fasterYep... until something goes wrong... then you're completely stuffed, because you have no idea what's actually happening, because the idjit IDE is hiding all the gory details... it doesn't even tell you what it's doing, let alone how it's doing it, or what to do when it fails.
    Another argument for the command line is that it's simple. There are 16 distinct dialogues involved in adding a new jar to a library in jBuilder... There may well be less than 16 characters in the equivalent edition to the equivalent build command line. That's an extreme case, I admit, but it goes to disprove the notion that IDE's are simpler for noobs.
    Also, it's easier to get help on command line usage... because it's all text based you can just copy & paste the problematic command and it's output, and the eggspurts (tm) can do likewise with a response... and there are limited number of command lines out there... and *nix, windows, and mac cover maybe 99.5% of java users... and the eggspurts are likely to know all three (colectively if not as individuals) fairly well, because they deal with them all day every day.
    My belief is that noob's are better off at the command line until such time as they need (not just want to play with) a visual debugger... at which time its time to download netbeans and eclipse, and see which one suits you better... if you have money to splurge I'd also evaluate intelliJ... But avoid jBuilder, 2008 is total carp! The FREE eclipse is (IMHO) "nicer to use", and it has a LOT less bugs.
    Cheers. Keith.

  • How to use javac to replace deprecated wsgen or apt in JDK 7?

    I am using jax-ws RI for web service and generating web service artifacts using wsgen.
    When I use wsgen or apt to generate web service artifacts in JDK 7 with following command.
    wsgen -s src -cp CLASS_PATH -d OUTPUT_DIRECTORY  com.sun.WebServiceSEI
    displays following warning message
    The apt tool and its associated API contained in the package com.sun.mirror have been deprecated since JDK 7 and are planned to be removed in the next major JDK release. Use the options available in the javac tool and the APIs contained in the packages javax.annotation.processing and javax.lang.model to process annotations.
    How can I generate web service artifacts using javac instead of wsgen or apt ?
    Edited by: user11128702 on Feb 6, 2012 1:54 AM
    Edited by: user11128702 on Feb 6, 2012 1:57 AM

    Hi Frank
    >After correcting one error in the given source (could never run that way), I get the JCO marked as deprecated as well. So this source code there seems to be a left over from NW 2004?
    Not exactly. The deprecation means that the JCo API version is 2.X while JCo 3.0 is already available. However, this does not mean that you cannot use the "com.sap.mw.jco.JCO". I know lots of projects running even on 7.11 and 7.20 that still use the JCo 2.X.
    >Is the destination service itself also depricated?
    No, no, no.
    >So I found out JCO is now depricated and I should use SAP Java Resource Adapter instead. Can I combine it with destination service or is there something similar as in web dynpro? For Ehp 1 I found this adaptive RFC package, but seems not to be available in 7.10?
    Java Resource Adapter is just a new JEE container for JCo API. Still it's also has some problems. So I'd not recommend you to use it.
    >What I clearly want to avoid is to give any user, password or system parameters in the source code as I'm used from Web Dynpro. Can I use the web dynpro mechanism maybe somehow?
    Use JCo 2.X + Destination Service. Ignore the API deprecation.
    BR, Siarhei

  • Use javac in JDeveloper

    Hi!
    I have developed an Applet based tool using the VisualCafe as my IDE. Now, I want to change my IDE to JDeveloper . But, I am not able to compile the same code in JDeveloper. It does not create Inner classes and giving compilation error.
    I want to use the standard Sun Java Compiler. Can any one of you direct me, how I can configure, such that when I buid it should use which compiler I have poited out/configured?
    Thanks,
    Ashok

    There is currently, no way to change the internal compiler. If you want to use javac in JDev 9.0.3, create an ANT build file in your project and use javac from within the ANT file.

  • SocketChannel.write() on J2SDK1.4.2_04/Windows 2000

    Hello,
    I have a question regarding SocketChannel.write() (as I mentioned before, I am using J2SDK 1.4.2_04 on Win 2000 pro).
    I prepared a ByteBuffer with some binary data. When I invoke SocketChannel.write(), the other application receives the data only until the first null (byte = 0) character is found??? What am I doing wrong??
    Thanks.

    On the other side, I get the message
    Read: ZYKT
    (only the first 4 bytes of the message)
    I experimented adding more non-null characters and the
    result was
    Read: ZYKT08@AYes, but (again) what does the CODE look like? Maybe it's written incorrectly to stop when it gets a null byte. Or maybe it stuffs it into a C-style char array (which is null-terminated by convention) and just happens to print up to the null (as C-style char array functions are designed to do). Or, who knows? You're not showing what that client process looks like.

  • Compiling web dynpro using javac

    I am writing an ant script to build ear file for my web dynpro application. We can not want to use Netweaver studio because our build process is automated using ant. In my web dynpro application there are 45 java files including my own java classes & the java classes generated by netweaver studio. But in my app.jar file there are 80 java classes. if I can locate all the java files then I can use javac to compile these classes & create ear file independent of netweaver studio.
    Has anyone tried using ant to build ear file for a webdynpro app? How are these extra classes created without corresponding java files?

    Hi Sam,
            Webdynpro is a framework within the Studio.The meta model of it requires all the jar files for compilation.You can see all jar files in the plugin folder of the same.If you can export all these jar files
    then I think you can compile and run your script outside studio but surely it is a tedious process.Moreover when you want to run any webdynpro application it is designed to open an IE with the framework.Lot of work around has to be done for opening external browser for running it other than studio.
              Hope my points briefs your query.
           Can you tell me the reason why you don't want to compile it within the studio?
    Regards,
    Guru

Maybe you are looking for

  • PDF to

    Hello everyone, I've been using Adobe Acrobat Pro 9 to convert PDF files to PDF/a and recently added a batch process to take care of the task. Anytime the process is executed, a copy of the original file (the file being converted) with "_A1b" tagged

  • Change Document Printed Status

    Hi All Is ther a way to change the status of a sales order to back to" Open" after it has been printed and the status of "Open - Printed" The reason is that sometimes the wrong customer is entered and only realised after the order is printed and then

  • Is anyone else dealing with a second profile from mobileme switchover

    I was a MobileMe user as a lot of people here were. When the switch to iCloud occurred, I was unable to access music between my devices, iMac, Macbook, iPhone, iPad. After a lot of support assitance and research, it was discovered that I have two pro

  • Calling Flex function from javascripty for window.close

    Using a set up in my ActionScript of: ExternalInterface.addCallback("tagWithClosed",windowClosed); How can I write a JavaScript function that calls 'tagWithClosed' to Flex when the user closes the window (window.close() )?

  • New Ovi Suite 2.2.0.241 problems

    I though that it was going to be different to the older version when I downloaded it and tried it again this week. It doesn't seem to be improved at all; - Backup - the SD card is included and can't be left out of the backup cycle! This takes a treme