How to set class path for mysql

hai, I have been trying to make a java program read from mysql database. but i don't know how to set the class path for mysql-connector-java-5_1_.0.6-bin. i set the class path in system variable as C:\Program Files\Java\jdk1.5.0_08\jre\lib\ext\mysql-connector-java-5_1_.0.6-bin.
in the command prompt, i compile C:\javac abc.java and run java abc.
when run it come out error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
i am using Window xp. can anybody help me??? TQ.

hai, I have been trying to make a java program read
from mysql database. but i don't know how to set the
class path for mysql-connector-java-5_1_.0.6-bin. i
set the class path in system variable as C:\Program
Files\Java\jdk1.5.0_08\jre\lib\ext\mysql-connector-jav
a-5_1_.0.6-bin.
in the command prompt, i compile C:\javac abc.java
and run java abc.
when run it come out error
java.lang.ClassNotFoundException:
com.mysql.jdbc.Driver
i am using Window xp. can anybody help me??? TQ.Right click on my computer icon,
Goto properties->advanced->environment variables.
Look for 'classpath' under system variable.
Select it and click edit.
put ';' and path of the mysql connector jar at the end
suppose if u have jar file under d:/driver/mysqlconnector.jar
thn put this value in variable value text box
;d:/driver/mysqlconnector.jar
or simply put ur driver jar file in jre/lib/ext folder
D:\j2sdk1.4.2_03\jre\lib\ext
[Servlet tutorial|http://www.jsptube.com]

Similar Messages

  • How to set (class)paths for a Managed server?

    How does one configure the PATH and CLASSPATH and pass definitions (like "-Djava.library.path=c:\p\bea\wlserver6.1\bin")
    to a remotely-started managed server?
    The section in the WLS 6.1 AdminGuide.pdf that talks about configuring a managed
    server's Remote Start tab says on pages 3-9 to 3-10 that, "If you don't specify
    values for these fields and attempt to start the target server from the Administration
    Console, the Node Manager will attempt to start the target server with the values
    for these attributes that were used when starting the Node Manager. The Node Manager
    will be able to start the Managed Server in that case if you specified the required
    values on the command line when starting the Node Manager."
    So it sounds as if I can get the java.library.path definition and CLASSPATH sent
    to the server via the Node Manager startup command.
    Does that work when using the Node Manager as an NT Service? Here is my Win2K
    command file for setting up the Node Manager as an NT Service. Note that I'm trying
    to tell it where to find the Windows native libraries (wlserver6.1\bin for wlntio.dll)
    and the JDBC drivers (C:\SHADOW\jdbc\... and C:\Orant\jdbc\... ) :
    ========== BEGIN installNMNtService.cmd ================ @echo off
    SETLOCAL
    cd C:\p\bea\wlserver6.1\
    rem *** Set Classpath to load Weblogic Classes
    set CLASSPATH=.;C:\p\bea\wlserver6.1\lib\weblogic_sp.jar;C:\p\bea\wlserver6.1\lib\weblogic.jar;C:\SHADOW\JDBC\scjd12.jar;C:\orant\jdbc\lib\classes111.zip
    rem *** Set Command Line for service to execute
    rem *** %JAVA_HOME%\java will automatically be prepended.
    set CMDLINE=" -ms16m -mx16m -classpath \"%CLASSPATH%\" \"-Dbea.home=C:\p\bea\"
    \"-Djava.security.policy==C:\p\bea\wlserver6.1/lib/weblogic.policy\" \"-Dweblogic.nodemanager.weblogicHome=C:\p\bea\wlserver6.1\"
    \"-Dweblogic.nodemanager.reverseDNSenabled=true\" \"-Djava.library.path=c:\p\bea\wlserver6.1\bin\"
    \"-Dweblogic.nodemanager.listenAddress=111.111.111.123\" \"-Dweblogic.nodemanager.trustedHosts=./config/nodemanager.hosts\"
    weblogic.nodemanager.NodeManager"
    rem *** Install the service
    "C:\p\bea\wlserver6.1\bin\beasvc" -install -svcname:EDANodeManager -javahome:"C:\p\bea\jdk131"
    -execdir:"C:\p\bea\wlserver6.1" -extrapath:"C:\p\bea\wlserver6.1\bin" -cmdline:%CMDLINE%
    ENDLOCAL
    ================= END installNMNtService.cmd ==================
    But when I start a server remotely, it can't find the native libraries and it
    can't find the JDBC libraries in the CLASSPATH. Otherwise, it can serve up HTML
    pages at the correct port number so I know it's running.
    When starting a managed server remotely via the WLS 6.1 console, how do I tell
    the managed server where the native libraries and JDBC libraries are?
    Thanks!

    Hi,
    The memory setting on the WC_Spaces managed servers can be seen as mentioned below.
    ps -eaf | grep Spaces
    Above command shows something like this at the top of the output:
    /a01/app/oraweb/middle/jrrt-3.1.2-1.6.0/bin/java -jrockit -Xms512m -Xmx1024m -Dweblogic.Name=WC_Spaces1 ...
    Regards
    Sreedhar

  • How to set local path for load library

    Hi,
    How do i set local path for native dll as i dont want to set the path in the environment variable.
    can i do like this
    System.loadLibrary("c:\abc");
    Thanks

    I believe that System.load() does exactly the same thing, but accepts fully qualified filenames. So give that a try.
    Failing that.... maybe you can add -Djava.library.path=
    to your command line to explicitely override the path set ?
    regards,
    Owen

  • How do I set class path for 3rd-party classes?

    Hello, I need to know how to set the classpath so that I can use the apache's third-party lang classes. I downloaded commons.apache.org/lang/download_lang.cgi. And I need to know next steps. Move the unzipped files to which location? And type what commands?
    Thanks, Melissa

    Hi, it's not the server that I am running. My instructor told me to download an apache class file for the Apache Lang library and then set my class path to point to the executable. Her instructions are for Windows users, however. I need to do something in the terminal shell but I don't know precisely what.
    mg

  • How to set default path for file open in SQL Developer

    Hi,
    I am new to Oracle SQL Developer. Everytime when I open a file, it will default to the install directory. It is hurtingmy hand because I have to click back to the folder where I put my sql statements.
    Is there any way to set the Home or Work button to point to the location I like? or add anther button to point to my folder? I just don't want to click 5 to 10 times to open a file.

    There are a few things. One is that you can set a working directory for any files you run in the SQL Worksheet i.e. @myfile.sql will pick up this directory.
    You can also set a preference for exporting files.
    Also if you use File -> Open, it should remember where you were the last time, so you hunt the first time, then it remembers for the next time. There is a bug for ctrl-O that always goes back to the original directory, but that has been fixed for the next patch release, so ctrl -O will also remember where you were last.
    The differences here are because we are dependent on the IDE from JDeveloper, and so we don't have full control over the Save and Open dialogs. We are aware of this frustration and are planning to change this for a future release.
    Regards
    Sue

  • How to set the path for new version of  jdk 1.5.0

    hi
    i downloaded jdk 1.5.0 from sun website . i gave path like this C:\jdk1.5.0\bin; but showing error internal command doent reconiged.give me some instructions aboth this one with details.

    Read item #5 in the Installation Instructions for the file you downloaded.

  • How can i set a path for my deployment files in weblogic server 10.3

    Hi
    How can i set the path for my WAR ,JAR files while deploying.i am using the wls10.3 version.
    is there any scripts for this ,please provide me.
    my Application is ADF 11g application.

    By "path", I assume you mean "classpath".
    The simplest way is simply to include the jars you need inside the web application or web module's WEB-INF/lib directory, EJB module's META-INF/lib directory, or EAR lib directory.
    If that's not practical, if you use NodeManager to start your servers, you can go to the "Server Start" tab in the server definition in the WebLogic console and edit the "Classpath" field, which defaults to no value. You can specify a classpath value there. Note that if you specify a value there, it REPLACES the default classpath for the server, it doesn't add to it. If you need to just add to it (a much more likely scenario), if the value references the value "$CLASSPATH" in it, that will reference the original classpath value that the server would have had.
    So, for instance, if you wanted to include the MQ jars in the server classpath, you could set a value like this:
    /usr/java/mq/lib/mq.jar:/usr/java/mq/lib/mqstuff.jar:$CLASSPATH

  • How can i set class path in ubuntu JAVA_HOME ?

    how can i set class path in ubuntu <JAVA_HOME>?

    Note that on *nix
    environment variable names are case sensitive.
    Also, you are again being vague; is it [this it|http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.html] or [that it|http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/java.html]

  • How to set a   background for jFrame?

    Hai.i have a code for background image.i.e
    * TextOver.java
    * Created on June 23, 2008, 1:53 PM
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.image.BufferedImage;
    import java.io.IOException;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javax.imageio.ImageIO;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTextArea;
    public class TextOver
    private static final String IMAGE_PATH =
    "http://upload.wikimedia.org/wikipedia/commons/b/b5/HMS_Cardiff_%28D108%29_1.jpg";
    private BufferedImage image;
    private JTextArea textarea = new JTextArea(20, 40);
    private JPanel mainPanel = new JPanel()
    @Override
    protected void paintComponent(Graphics g)
    super.paintComponent(g);
    if (image != null)
    g.drawImage(image, 0, 0, this);
    public TextOver()
    URL imageUrl;
    try
    imageUrl = new URL(IMAGE_PATH);
    image = ImageIO.read(imageUrl);
    Dimension imageSize = new Dimension(image.getWidth(), image.getHeight());
    mainPanel.setPreferredSize(imageSize);
    JScrollPane scrollpane = new JScrollPane(textarea);
    textarea.setOpaque(false);
    scrollpane.setOpaque(false);
    scrollpane.getViewport().setOpaque(false);
    mainPanel.add(scrollpane);
    catch (MalformedURLException e)
    e.printStackTrace();
    catch (IOException e)
    e.printStackTrace();
    public JPanel getPanel()
    return mainPanel;
    private static void createAndShowGUI()
    admin_login_code a=new admin_login_code();
    a.setVisible(false);
    JFrame frame = new JFrame("TextAreaOverImage Application");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new TextOver().getPanel());
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(false);
    public static void main(String[] args)
    javax.swing.SwingUtilities.invokeLater(new Runnable()
    public void run()
    createAndShowGUI();
    i want to give this backgground to my existing jFrame something like
    import java.sql.*;
    import java.io.*;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class admin_login_code extends javax.swing.JFrame {
    String admin_name;
    String password;
    Connection con;
    Statement stmt;
    ResultSet rs;
    public admin_login_code() {
    initComponents();
    jPasswordField1.addKeyListener(new KeyAdapter() {
    public void keyTyped(KeyEvent e) {
    char c = e.getKeyChar();
    if (!(Character.isDigit(c) ||
    (c == KeyEvent.VK_BACK_SPACE) ||
    (c == KeyEvent.VK_DELETE))) {
    getToolkit().beep();
    e.consume();
    jFormattedTextField1.addKeyListener(new KeyAdapter() {
    public void keyTyped(KeyEvent e) {
    char c = e.getKeyChar();
    if (!(Character.isLetter(c) ||
    (c == KeyEvent.VK_BACK_SPACE) ||
    (c == KeyEvent.VK_DELETE))) {
    getToolkit().beep();
    e.consume();
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
    private void initComponents() {
    jLabel1 = new javax.swing.JLabel();
    jPanel1 = new javax.swing.JPanel();
    jLabel2 = new javax.swing.JLabel();
    jFormattedTextField1 = new javax.swing.JFormattedTextField();
    jLabel4 = new javax.swing.JLabel();
    jPasswordField1 = new javax.swing.JPasswordField();
    jPanel2 = new javax.swing.JPanel();
    jButton1 = new javax.swing.JButton();
    jButton3 = new javax.swing.JButton();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jLabel1.setFont(new java.awt.Font("Tahoma", 1, 36));
    jLabel1.setForeground(new java.awt.Color(255, 0, 0));
    jLabel1.setText("ADMIN LOGIN");
    jLabel2.setFont(new java.awt.Font("Tahoma", 1, 24));
    jLabel2.setText("Admin Name");
    jFormattedTextField1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jFormattedTextField1ActionPerformed(evt);
    jLabel4.setFont(new java.awt.Font("Tahoma", 1, 24));
    jLabel4.setText("Password");
    jPasswordField1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jPasswordField1ActionPerformed(evt);
    org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
    jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel1Layout.createSequentialGroup()
    .add(39, 39, 39)
    .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jLabel4)
    .add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 161, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
    .add(43, 43, 43)
    .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPasswordField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE)
    .add(jFormattedTextField1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 190, Short.MAX_VALUE))
    .addContainerGap())
    jPanel1Layout.setVerticalGroup(
    jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel1Layout.createSequentialGroup()
    .add(47, 47, 47)
    .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
    .add(jLabel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 34, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(jFormattedTextField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
    .add(60, 60, 60)
    .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jLabel4)
    .add(jPasswordField1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
    .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
    jButton1.setText("Login");
    jButton1.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton1ActionPerformed(evt);
    jButton3.setText("Exit");
    jButton3.addActionListener(new java.awt.event.ActionListener() {
    public void actionPerformed(java.awt.event.ActionEvent evt) {
    jButton3ActionPerformed(evt);
    org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
    jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel2Layout.createSequentialGroup()
    .add(38, 38, 38)
    .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 93, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 110, Short.MAX_VALUE)
    .add(jButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 93, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(55, 55, 55))
    jPanel2Layout.setVerticalGroup(
    jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jPanel2Layout.createSequentialGroup()
    .add(38, 38, 38)
    .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
    .add(jButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 32, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 32, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
    .addContainerGap(30, Short.MAX_VALUE))
    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(layout.createSequentialGroup()
    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(layout.createSequentialGroup()
    .add(574, 574, 574)
    .add(jLabel1))
    .add(layout.createSequentialGroup()
    .add(459, 459, 459)
    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
    .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
    .addContainerGap(521, Short.MAX_VALUE))
    layout.setVerticalGroup(
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(layout.createSequentialGroup()
    .add(149, 149, 149)
    .add(jLabel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(43, 43, 43)
    .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(42, 42, 42)
    .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .addContainerGap(250, Short.MAX_VALUE))
    pack();
    }// </editor-fold>
    private void jPasswordField1ActionPerformed(java.awt.event.ActionEvent evt) {
    private void jFormattedTextField1ActionPerformed(java.awt.event.ActionEvent evt) {                                                    
    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {                                        
    Object src=evt.getSource();
    if(src==jButton3)
    dispose();
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
    Object src=evt.getSource();
    if(src==jButton1)
    admin_name=jFormattedTextField1.getText();
    password=jPasswordField1.getText();
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcle","scott","root");
    stmt=con.createStatement();
    rs=stmt.executeQuery("select admin_name,password from admin_registration where admin_name='chandana' and password='8989' ");
    while(rs.next())
    if(admin_name.equals(rs.getString(1))&&password.equals(rs.getString(2)))
    admin_registration a=new admin_registration();
    a.setVisible(true);
    dispose();
    else
    JOptionPane.showMessageDialog(null,"Please enter admin name & password ");
    catch(ClassNotFoundException e)
    e.printStackTrace();
    catch(SQLException e)
    e.printStackTrace();
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    admin_login_code a=new admin_login_code();
    a.setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton3;
    private javax.swing.JFormattedTextField jFormattedTextField1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPasswordField jPasswordField1;
    // End of variables declaration
    Can any one can help me how to set a background for jFrame?
    Thank you in advance.
    Edited by: forums.com on Jul 14, 2008 1:40 AM

    90% of the code you posted is not relevant to your question.
    If you want further help post a Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the problem.
    And don't forget to use code tags when posting code.

  • How to create a Platinum,Gold and Silver Customer and how to set different price for a single material based on customer?

    Hi All,
    How to create a Platinum,Gold and Silver Customer and how to set different price for a single material based on customer?
    Assume Material is Pen.
    While creating Sales Order in VA01 how to bring different price for the same material for Platinum,Gold and Silver Customers.
    Kindly help me out.
    Thanks,
    Renjith Jose

    A good place to start is http://www.javaworld.com/javaworld/javatips/jw-javatip34.html
    Also, do a search in this forum on HttpURLConnection. That class allows you to use POST method to send form data to a web server.
    "Hidden" variables are only hidden in HTML. The HTTP that gets POSTed to the web server doesn't distinguish between hidden and not hidden. That is, the content you would write to the HttpURLConnection.getOutputStream() would be something like:
    hidden=1&submit=ok(Of course, the variable names would depend on what the web server was expecting from the form.)
    Also, be sure to set the Content-Type request parameter to "application/x-www-form-urlencoded"

  • How to set the PATH in Terminal?

    As a newbie to Bash and the Terminal, in connection with installing a new version of Ruby and various add-ons, I have been messing around with changing the PATH via various methods I've found on the internet, and trying to add a new directory to my PATH. Unfortunately, I cannot figure out how to set the PATH correctly. Here is what I understand so far:
    1. Bash first looks to ".bash_profile" in the home directory for PATH settings.
    2. If none, Bash then looks to ".bash_login" for PATH settings.
    3. If none, Bash then looks to ".profile".
    4. If none, Bash then looks to a system file in "/etc/profile" for default PATH settings.
    5. For a new shell after login, Bash looks for a ".bashrc" file.
    I cannot find any of the above files (I have Finder set to show hidden files already). Somehow, following some instructions from the internet without really knowing what I was doing over the past week I have set my PATH as follows:
    /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/*****/src:/usr/X11/bin
    but I cannot find the file that is setting this PATH. I have tried creating a new ".bash_profile" shell file and putting it in various places such as "/bin" and "/usr/bin" but the file is not being read.
    * As a temporary workaround I tried using the command "source .bash_profile" upon login to set the PATH using the .bash_profile file that I created, but it does not work.
    * I am able to temporarily alter the path using the command "PATH=/usr/local/bin:$PATH" but this only lasts for an active shell; when I close out and reopen a new shell, it reverts to the default.
    So my questions are:
    Is it correct that there is a "/etc/profile" somewhere that is setting the default PATH? If so where is it? Should I alter it, or create a new ".bash_profile" somewhere to set the PATH? If not, where is my PATH being set? If I should create a new ".bash_profile", what exactly should go in it?
    Thanks in advance for any assistance.

    ... I created a new ".bash_profile" file directly under my home directory and it worked like a charm. Below is the content of the file:
    "PATH=/usr/local/bin:/bin/:/sbin/:/usr/bin/:/usr/sbin/:/Users/******/Ruby:/Users/*******/src:/Users/******/Java Programs/"
    What are the "..."'s? Is that just you, or is the contents of the file actually inside of double quotes?
    is there an 'export PATH' also in the file? As in
    PATH=/usr/local/bin:/bin/:/sbin/:/usr/bin/:/usr/sbin/:/Users/******/Ruby:/Users/*******/src:/Users/******/Java Programs/
    export PATH
    And did you either restart your Terminal session so your .bash_profile was read, or issue a 'source .bash_profile' command to execute the .bash_profile after your change?
    The only remaining problem is that from the home directory, I'm unable to directly run programs in the above-designated subdirectories (without first navigating to the subdirectory containing the file. Is there something wrong with the syntax or order of the directories I put in the path?
    For example: there is a file called "newprogram.rb" in the "Ruby" directory listed above. I should be able to execute it from the home directory using "ruby newprogram.rb" but it does not work. The same command works fine from within the "Ruby" directory.
    Does the 'ruby' command search PATH to find its scripts?
    Have you read the "man ruby" man page to see if it talks about PATH?
    A common Unix feature is that programs and scripts with the executable bit set, and are located in a PATH directory, will be run if you just type their names.
    For example, if the first line of newprogram.rb script starts with
    #!/usr/bin/ruby
    and if the script is executable
    chmod +x newprogram.rb
    And if it is in a directory in PATH, then just typing
    newprogram.rb
    should run your perl script using /usr/bin/ruby. If you want to use a different version of Ruby, then change the #! line so it point to your version of Ruby. Or if your version of Ruby is found earlier in PATH then the /usr/bin/ruby, you can use
    #!/usr/bin/env ruby
    as your script's first line which will search PATH for 'ruby' and use the first one it finds.
    Message was edited by: BobHarris

  • How to set the path variable on Windows ME?

    I want to get a friend of mine to start using java the only problem is that we both dont know how to set the path variable in Windows ME. I cant seem to find any instructions on it for ME. So if someone could please tell me how or give me a llnk to directions for Windows ME. Thanks.

    Refer to the Installation Instructions for the package that you installed - I believe #5 if the instructions has the information. A link to the instructions is at the page you installed from.

  • How to set Compatibility Mode for a single site in ie10

    This question was originally posted on the Answers forum -
    http://answers.microsoft.com/en-us/ie/forum/ie10-windows_7/how-to-set-compatibility-mode-for-a-single-site-in/187152e3-142a-4d96-8d1b-af82ef571eec
    I am having problem with getting ie10 to set ie9 compatibility for a single site (sharepoint.contoso.com).
    When I add this website in Compatibility View Settings (Alt > Tools > Compatibility View Settings > 'Add this Website') it adds the domain 'contoso.com' and not the individual website (sharepoint.contoso.com).
    This cause other sites (www.contoso.com) to be configured to use compatibility mode. Because this is a separate site (different web server) to the site sharepoint.contoso.com (sharepoint 2010 server) we need different compatibility settings.
    Using a different example to explain the issue -
    Microsoft has three websites that are different websites created by different developers written in different programming languages and they only work with certain browsers.
    microsoft.com (Website1 created by Developer1) - compatible with ie8/ie9/ie10
    msdn.microsoft.com (Website2 created by Developer2) - compatible with ie8/ie9
    technet.microsoft.com (Website3 website created by Developer3) - compatible only with ie10
    The only thing the three website share is the URL contains 'microsoft.com'.
    Marking 'msdn.microsoft.com' to run in compatibility mode affects the other 2 websites - mainly technet.microsoft.com which will not work now since it only runs in pure ie10 mode. 
    Should you be able to add an individual site to the compatibility list instead of all sites that have  .microsoft.com in the URL? Am I missing a simple setting in the ie10?
    As a workaround I am using the F12 Developer Tools to set the Browser Mode which temporary sets the compatibility mode. However this is not a nice solution to the end users at our organisation. 

    problem is not solved for non corporate environments...
    You could start your own thread.  Then if you got that answer and it was marked Answered you would have the ability to unmark it.  The OP of this one seems satisfied.  Also note that this is TechNet.  Consumers can get help on Answers
    forums.
    Robert Aldwinckle
    Oh! I wrote it wrong: I should have said: This is not solved for NON-AD environments. No demands what so ever to use Window 7/8 professional in a small corporation or on a big corporation with Island of smaller departments for example offshore.
    The problem is that the thread is not "Answered" by the OP, its is marked answered by a moderator (and same moderator that did the answer) so no way of telling if the OP is satisfied.
    But you are right in the fact that I am almost kidnapping the thread. But a complete answer would benefit all in this case I would presume.
    Regards
    /Aldus

  • How to set default values for boolean columns

    I'm trying to deploy some content types and columns into a site with a feature. All it's ok, except that I'm trying to set a default value for boolean columns with no success.
    I've tried to set default value at column level:
    <Field ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DisplayName="Se publican noticias en español"
    Type="Boolean" Hidden="FALSE" Group="Columnas ShaCon" >
    <Default>TRUE</Default>
    </Field>
    and at content type level:
    <FieldRef ID="{EFE23A1D-494E-45cf-832E-45E41B17F0CF}" Name="ScopeSpanish" DefaultValue="TRUE" Required="TRUE" />
    But in any case, when i create a new item with this content type, default value is applied.
    Can anyone tell how to set default values for boolean columns?
    Thanks in advance,
    Regards,
    Sergio

    In the field definition you can set
    <Default>1</Default>
    or
    <Default>0</Default>
    How to set the default value Null?

  • How to set background color for selected days in DateChooser

    How to set background color for selected days. I created
    checkbox for each day [Son,Mon,Tue,Wed,Thu,Fri,Sat] and a
    DateChooser, I want to change the background color for the selected
    day when i click on a button after selecting the desired checkboxs
    [ monthly wise/yearly wise]
    Thanks in advance

    There is no button involved in the following code, but it may
    be of use to you:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="init()">
    <mx:Script>
    <![CDATA[
    private var origColor:uint;
    private function init():void {
    origColor = dc.getStyle("selectionColor");
    public function setBackGrdColors(newColor:uint):void {
    dc.setStyle("selectionColor", origColor);
    if(dc.selectedDate){
    var dayOfWeek:Number = dc.selectedDate.day;
    else{
    return;
    switch(dayOfWeek) {
    case 0:
    if(sun.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 1:
    if(mon.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 2:
    if(tue.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 3:
    if(wed.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 4:
    if(thu.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 5:
    if(fri.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    case 6:
    if(sat.selected)
    dc.setStyle("selectionColor", newColor);
    break;
    default:
    break;
    ]]>
    </mx:Script>
    <mx:VBox horizontalAlign="center" verticalGap="20">
    <mx:DateChooser id="dc" textAlign="left"
    change="setBackGrdColors(cellColor.selectedColor)"/>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="sun" label="Sun"/>
    <mx:CheckBox id="mon" label="Mon"/>
    <mx:CheckBox id="tue" label="Tue"/>
    <mx:CheckBox id="wed" label="Wed"/>
    </mx:HBox>
    <mx:HBox width="100%" horizontalAlign="center">
    <mx:CheckBox id="thu" label="Thu"/>
    <mx:CheckBox id="fri" label="Fri"/>
    <mx:CheckBox id="sat" label="Sat"/>
    </mx:HBox>
    <mx:HBox width="300" horizontalAlign="center">
    <mx:Label text="Background Color" />
    <mx:ColorPicker id="cellColor"
    selectedColor="#FF00FF"/>
    </mx:HBox>
    </mx:VBox>
    </mx:Application>

Maybe you are looking for

  • 10.6.2 combined update seems to have no effect

    Hello all, I recently upgraded to Snow Leopard (10.6.0) from Leopard (10.5.8) and everything looked pretty good. However, I've tried to install the "10.6.2 combined update" through Software Update two times now and it doesn't seem to have worked eith

  • Jsf compnent rendering

    I have the below code that displays the image before my table tags. Why does this render this way? table width="100%" border="0" cellpadding="0" cellspacing="0">                     <tr>                             <td width="20%"> <h:graphicImage va

  • I can't remember my icloud id !! how can i get it back ?

    I can't remember my icloud id !! how can i get it back ?

  • Path Finder in a 2D Grid Map With Different Terrain Types

         I have been thinking for a while on path finding game algoritms and I can up with one idea witch I want to publish. The goal of my project is when I have a 2 dimensional grid map where squares can have different movement cost, like in Civilizati

  • Error while importing Business Package

    I am getting an error while uploading the business package Error Details  Import failed. Deletion not possible: object has child objects. Object ID: pcd:portal_content/com.sap.pct/specialist/com.sap.pct.ivs.pcp Transport File: E:\usr\sap\J2EE\j2ee\j2