Classpath for J2SDK 1.4.1

Hello,
I'm a beginner to Java and I'm using Mandrake Linux 9.0 and J2SDK 1.4.1. I would like to ask how to set the class path for the SDK? Meanwhile, I always get this error message when compilering a java file that uses class packages.(i.e. javax.swing.JOptionPane)
Some of the error:
===
$ javac DemoPaint.java
DemoPaint.java:4: error:Cannot find class "JApplet" [JLS 8]
$
===
$ javac Lab4_1.java
Lab4_1.java:1: error:Import of type "javax/swing/JOptionPane" from unamed package [JLS 7.6]
Lab4_1.java:1: error:Cannot find class "javax/swing/JOptionPane" [JLS 8]
$
===
Thank you!
Charles Cheng

If did you set correct CLASSPATH?
CLASSPATH="$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/too
s.jar:."Don't do that. In general, never put JDK jars into
your classpath. Let the Java VM find it by itself -
they all do.
Make sure that Mandrake is not shipping with Kaffe or
any such silly VM (RedHat used to do this -
/usr/bin/java was Kaffe!).
Check your $PATH, and make sure that
/usr/java/j2sdk1.4.1_01/bin is in your PATH before
/usr/bin, and that that is the Java that is picked
up:
$ java -version
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition
(build 1.4.1_01-b01)
Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed
mode)If you see this output, you should be OK.
Once again, do NOT put any standard Java jars into
your CLASSPATH!.A PROBLEM
After I removed JDK jars from CLASSPATH, my jikes cannot work. It tell me cannot find java.util.........

Similar Messages

  • Path in Classpath for file SapMetamodelWebdynproContent.zip not found.

    How to get rid of these warnings?
                   [Warning]: Path in Classpath for file SapMetamodelWebdynproContent.zip not found.          
    Warning               [Warning]: Version for file SapMetamodelWebdynproContent.zip not found.          
    Warning               [Warning]: Versions of 'SapDictionaryTypeServices.jar' have different prefix.          
    Warning               [Warning]: Versions of 'SapDictionaryTypesRuntime.jar' have different prefix.     
    thanks in advance.

    Hi,
    This is a common problem when you import projects to NWDS. Do like this.
    1.Change to Navigator tab in NWDS and delete gen_wdp folder.
    2.Switch to Web Dynpro Explorer. Select the Project -> Right click-> Select properties -> in the wizard select Java Build Path -> Select Libraries tab -> You will find jar files with warnings
    3.Remove the jar and add the jar file with same name to the project one by one.
    4.For each jar file repeat step 3.
    5.Save the project
    Or
    removed the read-only property from all folders / files of the project and it solved my problem.
    Hope this helps!!
    Thanks & Regards
    Vijay K

  • Can I set classpath for OAS 10g?

    Hi,<br>
    <br>
    I have OAS on my workstation. Here are the details.<br>
    Server : Oracle Application Server 10g Release 3 <br>
    Version : 10.1.3.1.0 SOA4<br>
    Build : 061008.0900.00025<br>
    Platform : Windows XP - SP2<br>
    <br>
    I want to set an explicit classpath for complete OAS 10g as such and not to an individual oc4j application. Will I be able to do it?<br>
    I saw the System Properties after my server started.<br>
    It has a name-value pair as "java.class.path oc4j.jar".<br>
    So, I assume all my classpath settings (done thru Environment Variables from My Computer) are lost.?<br> I want to set it explicitly during the server startup itself. Can I do that?<br>
    I tried setting below in the opmn.xml <br>
    <process-set id="ASG" numprocs="1"><br>
         <module-data>          <br>                         <category id="start-parameters">     <br>               <data id="start-executable" value="C:\Oracle\product\10.1.3.1\OracleAS_1\jdk\bin\java"/>     <br>               <data id="start-args" value="-classpath C:\abc\properties\"/><br>
    I appended my properties folder after all the jar files present in that tag.<br>
    But its not loading any of my properties files.<br>
    <br>
    Can someone please help me out.<br>
    <br>
    Regards,<br>
    <br>
    Prashanth Babu.

    No, the iPad does not support multiple user accounts or preferences.

  • Wildcards in Classpath for JNI-Calls

    Is it possible to use wildcards in the classpath for KNI-Calls?
    I would like to use wildcard for jni-calls like for normal java-calls (java -classpath *.jar ...), but it is not working.
    JDK version is JDK 1.5.0 on Win32

    I would like to use wildcard for jni-calls like for normal
    java-calls (java -classpath *.jar ...), but it is not working.It would be the Shell, not Java doing the wildcard magic.
    You would have to do the globbing manually (or use any OS APIs, or 3rd party APIs).

  • Problem in setting path and classpath for java in RedHat linux 9

    Hi ,
    i am not able to set the PATH and CLASSPATH for j2sdk1.4.2_06
    I have tried with export PATH=$PATH:/usr/j2sdk1.4.2_06/bin
    and export CLASSPATH=$CLASSPATH:/usr/j2sdk1.4.2_06/lib
    in terminal
    but i want to configure it as permenant way for the jre and jdk
    and we should only type java or javac according to the requirement
    regards mihir...

    type those in .bashrc ... save and exit
    then at prompt, type 'source .bashrc'
    this is the permanent solution ...
    bhalo thakun

  • How to set a classpath for referring classes

    I am using windows vista.....I had assigned classpath for Variable name and given address of class in variable type ..even then compiler does not recognize class path..........

    Thanks but it is not what I am really asking or I may didnt understand..
    The program is working ok through JCreator.. My problem is when I create an Installation file and then run it..
    the program is being created just fine but when it has to load the jdic then it blocks...
    This is something that must be done through variables right?
    If you ever used Install4J there are 2 columns where you declare variables..
    The first column is for Variable name and the second one is Variable Value..
    Sorry for buthering you with all this but this is the first time that I am dealing with jar files!
    Thanks again !

  • Starting tomcat server after setting classpath for java

    Sorry if this is nothing to do with java, it is more to do with starting tomcat server.
    Tomcat server has been working totally fine, but when I wanted to compile a java servlet I wrote for it, I needed to run a BAT file called gojava in MS-DOS that had the classpath for java to work properly. I then attempted to run Tomcat, but just got 'bad command'. As long as I don't start up java by setting the classpath, tomcat will work, but as I need java to write servlets and then to test them without restarting my PC each time, how do I get tomcat to work?
    Thanks
    Hannah

    Sounds like your batch file is changing your path, not your classpath. If you're getting "Bad command or filename" when attempting to run Tomcat, it can't find the executable. Check out the .bat file and see what it's doing (maybe even post it here for further clarity). If it's changing your path at all, make sure it includes a %path% to indicate that it simply wants to append items to the path, not overwrite it completely. Sorry if i'm way off base with my suggestions, but it sounds like that's where the problem's going to be, especially if rebooting resolves the problem.

  • Did u use jar files as classpath for appletviewer?

    as tested, jar files can not be used as classpath for appletviewer.
    java command is bellow
    appletviewer -J-classpath -Jc:\folder00\some.jar; -Jc:\folder01\any.jar; MyAppletClass
    the jar files (or classpaths) above do not work.
    I am not sure about my test, so i post my Q here for confirming it.
    thx

    appletviewer needs HTML code to run an Applet similar to how the Applet would be run from a browser. It does not have a Classpath option.
    http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/appletviewer.html

  • How to edit classpath for Domain Admin Server?

    Hi!
    Please, explain me how can I edit the classpath settings for Domain Admin Server of Sun java Application Server 8.2?
    I need to remove some classpath made by application installer in order to make the application work.
    It is said in documentation that I have to login to DAS first, but I can't see how can I make it through Server's web-interface :(

    Hi Rengasamy,
    If you want to set the CLASSPATH for all the managed Servers available in your Domain then "$DOMAIN_HOME/bin/setDomainEnv.sh" has an Environment variable with name "PRE_CLASSPATH" which is usually preferred for Patches or any JAR which we want to override from the WebLogic's existing classpath.
    But if you don;t want to override WebLogic's default CLASSPATH rather include your Jars in it then please add your JAR filenem including absolute path inside the "POST_CLASSPATH" variable inside "$DOMAIN_HOME/bin/setDomainEnv.sh"
    Apart from this another option will be putting your Jars inside the "$DOMAIN_HOME/lib" directory because The jars located in this directory will be picked up and added dynamically to the end of the server classpath at server startup. The jars will be ordered lexically in the classpath. The domain library directory is one mechanism that can be used for adding application libraries to the server classpath. It is possible to override the $DOMAIN_DIR/lib directory using the -Dweblogic.ext.dirs system property during startup. This property specifies a list of directories to pick up jars from and dynamically append to the end of the server classpath using java.io.File.pathSeparator as the delimiter between path entries.
    If you are starting your Managed Servers using NodeManager then please refer to the following Article.:
    Topic: Nodemanager Based ManagedServers setting MEM_ARGS
    http://middlewaremagic.com/weblogic/?p=780
    Regards
    Ravish Mody

  • Problem with NetWeaver 2004s EAR classpath for EJB

    I'm working with SAP NetWeaver Developer Studio Version: 7.0.09.
    I am trying to reference additional JARs from an EJB at runtime in the J2EE engine.  I have added the additional JARs to my EAR project (I have a separate EJB module project) through "Properties/Archive Build Info."  Then I have updated my EAR classpath by double-clicking on the application-j2ee-engine.xml and selecting Expert settings then specify a list of JAR's in the "Additional classpath" field as such: "log4j-1_2_8.jar, basis-test.jar,commons-beanutils-bean-collections.jar,commons-beanutils-core.jar,commons-beanutils.jar"  Then I build the Application Archive (the EAR) and deploy to the J2EE Engine.
    This is what my application-j2ee-engine.xml in my EAR looks like:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">
    <application-j2ee-engine>
         <classpath>log4j-1_2_8.jar, basis-test.jar,commons-beanutils-bean-collections.jar,commons-beanutils-core.jar,commons-beanutils.jar</classpath>
         <provider-name>sap.com</provider-name>
         <fail-over-enable
              mode="disable"/>
    </application-j2ee-engine>
    Then when I run my client code against the EJB (actually through a web service) I get an error in the log -- a "NoClassDefFoundError" on the log4j-1_2_8.jar file from a log4j call:
    EntryPoint: [/SalesOrderCalculation/Config1]. Implementation exception occurs. Please check implementation container(e.g. EJB) logs for additional information! com.sap.engine.services.ejb.exceptions.BaseEJBException: Exception in method calculateOrder.->java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
    Why is my EJB not finding the jar file even though I add it to the EAR and specify the additional classpath for the EAR?
    Edited by: Juan Reyes on Jul 30, 2008 9:08 AM

    Removed the word URGENT from your subject.
    Please read the "Rules of Engagement"

  • How to add to classpath for OAF extensions in 11.5.10

    In 11.5.10, how do I add jar files to the default EBS classpath for new custom classes that are used in OAF extensions? Is there a directory which I can drop them in where they will get automatically appended to the classpath? Or is there a configuration file which needs to get updated with the new jar/library dependencies?
    I tried dropping them in $JAVA_TOP, but that only seems to pick up new classes, not complete jar files. However, I need to add several jar files as well (such as log4j). Ideally I would like to be able to do this without manually changing any of the config files.
    Thanks,
    Ed

    Keeping your concern in mind, the standard way of putting customization in OAF which is patch safe is to
    1. create a custom top like xxx_top
    2. prefix the standard page package which you are extending with xxx to separate it from standard seeded ones.
    3. Keep all your custom files on the xxx_top which is registered with the system.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to set Classpath for MySQL

    Hi
    I want to connect to my mySQL db with a java program , but I don't know how to install the mySQL connector driver. Can anyone help me? or indicate somewhere where I might find the answer?
    And how to set Classpath for MySQL.
    my program gives an exception ClassNotFound.
    Exception :com.mysql.jdbc.Driver
    java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at Files.main(Files.java:352)
    Plz help me
    Thanx
    Lalit

    to make your life easy i tried to connect..
    what you have to do is.. you mysql database server should be running
    next you have to download one of the version of mysql driver.. i downloaded mysql-connector-java-5.0.5
    go to my computer right click - >advance tab -> click on environment variable -> put you path e.g. C:\Program Files\Java\jarFiles\mysql-connector-java-5.0.5\mysql-connector-java-5.0.5-bin.jar
    into your classpath in a user variable section..
    Try this code
    import java.sql.*;
    public class MySqlConnect{
         public static void main(String [] args){
              try{
                   Class.forName("com.mysql.jdbc.Driver");
                   String url ="jdbc:mysql://localhost:3306/test";
                   Connection con =DriverManager.getConnection(url,"root", "password");
                   System.out.println("Connection: " + con);
              }catch(ClassNotFoundException cnfe){
                   cnfe.printStackTrace();
              }catch(SQLException se){
                   se.printStackTrace();
    }have fun
    Gurnah

  • JAVA classpath: How to find classpath for a given java process

    I want to find the classpath for java process outside of the process.
    example:
    Lets say I execute the following command
    java -classpath foobar.jar;shoobar.jar javatest
    Is there a way to find the classpath from a different program given the process id that is created for the above command?
    Ami shukla

    Perhaps through an externally connected debugger? Beyond that, the only thing I can think of would be to modify the source to report that information for you.

  • Javax packages not found for J2SDK 1.5.0

    Hi,
    I am very new to Java SDK. I just installed J2SDK 1.5.0 beta 2 and installed it on my RedHat 9.0 box with root permission at /usr/local/(java-home)/
    I can compile simple applications which do not import extension packages. However, when I try to compile an application importing javax.swing.* , I get the below error message:
    Craps.java:9: Can't find default package `javax.swing'. Check the CLASSPATH environment variable and the access to the archives
    Craps.java:11: Superclass `JApplet' of class `Craps' not found.
    public class Craps extends JApplet implements ActionListener {
    The code of this application is correct, coz I can compile and execute it in Windows.
    Can anybody help me with this problem?
    Thanks!

    Hi Joni,
    Thank you for the reply!
    I've solved the problem with your inspiration of the ClASSPATH. This is for the reference of those who may encounter the same problem as me.
    I installed Redhat 9.0 with default settings and those bundled packages (could be normal to many Linux newbies like me :) There is a default java compiler installed, I guess, and it's bundled with gcc. So when I tried to compile my .java files, the javac comand from j2sdk was not involked. Instead, it's the default-installed java compiler that correspended to my command. I guess this is why no matter what I changed in the .bash_profile in my home directory, the j2sdk command javac had not executed.
    After I uninstalled this one, and add j2sdk/bin into my CLASSPATH, everything works fine now.
    Btw, I found out this problem by simply typing "javac" in the terminal and read the help suggestions that followed.

  • Problem with classpath for XP

    i've made a java applet with three classes, two of which are classes to construct variables needed for the main interface to work. but the interface class cannot recognise that the other two classes exist. it gives out the cannot resolve system error. i know that there is no problem with the program syntax (or which directory they are in) because it compiles on other computers and i can compile the individual classes on my sustem. i have made numerous one class programs before so the compiler definitely works in some situations. i'm thinking then that the problem must be with my jdk in some way. i've tried re-installing my jdk and installing a different jdk but stil no joy. someone mentioned to me it could be something to do with how the classpath is set up but this is something i'm a bit unsure about, i know though that XP is slightly different to the other windows o/s. any advice would be much appreciated.

    My Windows is not English so I'm not sure whether it's exactly the same:
    Start>Configuration>System>Environment variables
    If there is a variable with the name "CLASSPATH" (system variables) look if . is in your classpath. If not, add to the classpath ";." . And if there is no CLASSPATH variable, add it (and add the value . to it).
    I hope it helps.

Maybe you are looking for

  • Taxation problem in A/R Credit Memo

    Hi Guru's, I am creating standalone A/R Credit memo, in which I found an eratic behaviour of SAP B1 in the following sense - --- when I use copy to option from return for creating A/R credit memo, it hits Input VAT GL account but --- when I use copy

  • Why did Apple get rid of the DVD slot in the MacBook Pro

    Why did Apple get rid of the DVD slot in the MacBook Pro?

  • How do I find the to do list that seemed to have disappeared on the right side of my weekly iCal?

    I use the weekly page for my iCal as I am a nail tech. I remember a while ago there was a little part on the right side that had a to do list. I can't find it now. All the responses to inquiries about this were a couple of years ago and don't apply t

  • FM for add sales area to a BP from external lists

    Hi experts We are uploading BPs from an external list (on WEBGUI), and we want to add the sales area to this one. We tried to use FM CRM_BUPA_FRG0010_ADD but it doesn't work. Do you know any FM for solve this issue?? thanks in advance Best regards Ma

  • [SOLVED] fbsplash and grub2

    Hi, I wanted to give myself a splashscreen but the Fbsplash wiki only shows how to do this with grub legacy, and currently my computers booting is controlled by grub2 from Ubuntu, as it insisted on it. So I was wondering if theres a way to circumvent