Software :: Set Mail.jar - JavaMail - And Mysql-connector-java.jar In Class Path
Jan 18, 2010
I want to ask how i set Linux class path for mail.jar and mysql-connector.jar. I have set the class path for java with the command.
Code:
when i do java -version it's work fine.
Also if i want to know that what shell i am using how can i find it.Also what is the command for showing class path variables or how can i see my JAVA_HOME class path.Means after setting the class path for above two files how can i see that these files have added.
When i write echo $CLASSPATH or echo $JAVA_HOME it shows nothing no error but again shows the prompt.
One thing more i want to run a java program on Linux it is in a package (named asteriskproject). It consist of 10 java files. I have run this program on windows using netbeans IDE.For this program i need to set my Linux class path for the above mentioned files, and this is my first time that i am running any program on Linux. So i want to ask how can i run my program. Simply put this asteriskproject directory in any folder and run the main file using javac. Is it right way to run the program that consist of package ?
View 3 Replies
ADVERTISEMENT
Jun 12, 2011
I'm trying to use MySQL's JDBC connector for java but even though I set the CLASSPATH variable, java cannot find the com.mysql.jdbc.Driver class.
Code:
[jordan@Jordan-Laptop java-stuff]$ ls /usr/share/java
cal10n geronimo-jta.jar java_cup-runtime.jar
[code]...
View 14 Replies
View Related
May 24, 2010
I recently installed java in ubuntu (ver#java1.6.0.00)with many pains.Now I need a clear class path for this java in ubuntu 9.10.
View 2 Replies
View Related
Nov 30, 2010
Was told that I need to use Javamail for a project to send mail rather than using "mail" or "mailx". Has anyone here done this?Any pointers or sites you've used and can recommend?
View 1 Replies
View Related
Jun 20, 2011
I installed Tomcat (apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples) and it runs without problems.
I installed MySQL (apt-get install mysql-server) and it seems to run without problems too.
I changed the default JRE (update-java-alternatives -s java-6-sun).
The weird thing is - if I put the connector-jar into my web application (WEB-INF/lib), the connection works. If I put the connector-jar into usr/share/java, it does not work. If I write the jar location into the CLASSPATH and try "java com.mysql.jdbc.Driver", I get a NoSuchMethodError:Main, which means, that the jar is found?!
The datasource in the tomcat context.xml is:
<Resource name="jdbc/myresource" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="username" password="password" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/myschema" />
How can I make the database connection work without putting the jar into the WEB-INF/lib folder of the web application?
View 2 Replies
View Related
Apr 6, 2016
I got assigned to a project, where the installation is done over ansible. As I'm new in linux, python, django, ansible I wanted to try this out on a empty linux debian.
Code: Select alluname -a
Linux DebianABC 3.16.0-4 amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u4 (2016-02-29) x86 64 Gnu/Linux
When I now run my ansible playbook it tries to install mysql and suddenly I get an error:
Code: Select all:stderr: DEPRECATION: --allow-external has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.
DEPRECATION: --allow-unverified has been deprecated and will be removed in the future. Due to changes in the repository protocol, it no longer has any effect.
Could not find a version that satisfies the requirement mysql-connector-python==1.0.12 (from -r /home/abc/abcTest/requirements.pip (line 36)) (from versions: )
No matching distribution found for mysql-connector-python==1.0.12 (from -r /home/abc/abcTest/requirements.pip (line 36))
FATAL: all hosts have already failed -- aborting
So I checked the target machine and tried to run
pip install -vvv -r requirement.txt mysql-connector-python
As version 1.0.12 is an old version, I was searching and tried the following: [URL] ....
But also if I run the installation by direct download I have the same error message:
Code: Select allabc@DebianABC:/home/abc/abcTest$ pip install -r requirements.pip -vvv mysql-connector-python
Collecting http://cdn.mysql.com//Downloads/Connector-Python/mysql-connector-python-1.0.12.tar.gz (from -r requirements.pip (line 36))
 Starting new HTTP connection (1): cdn.mysql.com
 "GET //Downloads/Connector-Python/mysql-connector-python-1.0.12.tar.gz HTTP/1.1" 200 230923
[Code] ....
I was reading about the version requirements from PEP: [URL] .... but as the version looks ok, this should not be the problem.
View 0 Replies
View Related
Jul 17, 2009
Java applet not loading image with relative path(e.g. images/1.jpg) but loads image with absolute path(i.e. from /root/user/images/1.jpg) . This is a problem when i want to host the applet on web server
View 2 Replies
View Related
May 10, 2011
I've had to do some code in java, a language I'm very much unfamiliarly with so please excuse my incorrect use of terms. The basic outline of my problem is I create a class object as a local within a swing button function it works fine. If I create it as a global ( with I think I need to do ) within main, then prototype it with the other swing objects at the bottom of the file when it is called it causes a host of problems. I think the easiest way is to show it.
View 2 Replies
View Related
Sep 18, 2010
I am looking to write a function to return an MD5 hash in Java but I don't want to us the MessageDigest class as I am using the J2ME framework which doesn't include it.
View 3 Replies
View Related
Sep 14, 2010
I use ubuntu lucid lynx, LAMP (mysql 5.1 and last php) and tried to install the package from mysql web page (mysql-connector-odbc-5.1.7-linux-glibc2.3-x86-32bit.tar.gz) through alien. Terminal output is as follows:p { margin-bottom: 0.21cm; }
sudo alien -d -c -k -i mysql-connector-odbc-5.1.7-linux-glibc2.3-x86-32bit.tar
dpkg --no-force-overwrite -i mysql-connector-odbc_5.1.7-1_all.deb
(Lendo banco de dados ... 147517 arquivos e diretios atualmente instalados).
[code]....
View 1 Replies
View Related
Feb 4, 2011
I have a simple code like below. when I run this command javac callSMSClient.java I get this erros. Any solution to this please?
View 13 Replies
View Related
Mar 20, 2010
I installed jdk1.6.0_18 version. Please see below for the version.
[Code].....
View 1 Replies
View Related
Mar 10, 2011
I just want to know is it possible to extract a single mail from the mail path i.e. /var/mail/root.
for ex. i am having this mail in /var/mail/root.
From root@localhost.localdomain Thu Mar 10 21:47:47 2011
Return-Path: <root@localhost.localdomain>
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by localhost.localdomain (8.13.8/8.13.8) with ESMTP id p2AGHlx4004190
for <root@localhost.localdomain>; Thu, 10 Mar 2011 21:47:47 +0530
[Code]....
how to extract only this mail from /var/mail/root
View 2 Replies
View Related
Mar 7, 2010
I have Debian Testing, Kernel 2.6.32-trunk-686 and Java version:
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Server VM (build 14.2-b01, mixed mode)
If I open web page with Java application (in Opera, Iceweasel and Google Chrome), for example this page: [URL] I get error message (image in attachment). If I click in the Details, I get this text:
Java Plug-in 1.6.0_16
Using JRE version 1.6.0_16-b01 Java HotSpot(TM) Server VM
User home directory = /home/johnnycage
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
load: class AppletGui not found.
java.lang.ClassNotFoundException: AppletGui .....
Exception: java.lang.ClassNotFoundException: AppletGui
View 4 Replies
View Related
May 18, 2010
This is a bit of revision for the OU course M257
Code: Select all import java.util.*;
public class FindDupes {
public static void main(String[] args) {
  Set<String> orig = new HashSet<String>();
  Set<String> dupe = new HashSet<String>();
  for(String a: args)
  if(!orig.add(a))
    dupe.add(a);
  orig.removeAll(dupe);
  System.out.println("words " + orig);
  System.out.println("dudes " + dupe);
}
}
for some reason it will compile but not run on debian lenny complains it can't find the main class but it compiles and runs without problem on Fedora 12.
View 6 Replies
View Related
Jun 7, 2011
I need to know that how to convert a java class file into java archive (jar)
View 1 Replies
View Related
Apr 4, 2011
I browse with Firefox and I had been running a pretty vanilla install of Ubuntu 10.4 (with a few things like tomcat and mysql) I supposed the repos kept everything (like java) up to date.
Some time ago I replaced OpenJDK with SunJDK.
java -version is "1.6.0_24"
which java is /usr/bin/java
Yesterday, for the first time, I downloaded and ran an Avast! scan. It complains of "Malware-gen" in several class files in what I think is the java cache. Does anyone know how this could be?
View 2 Replies
View Related
Jul 21, 2010
working on a script to update .Jar file, I have tried jar xf to unpack and jar cf to repack it is giving me java.lang.NoClassDefFoundError exception at main class. I also tried jar uf, which is also not working for me Basically my jar file requires to update date, which i do from "winrar" Manual it works fine, but now to remove "Donkey work", i want to make an script which does this all automatically, and the last stage is to update jar file which is not happening.
View 1 Replies
View Related
Feb 7, 2011
I have installed CentOS 5.5 and included the java development package. When I typed java -version, I got java 1.6.0. The problem is with the javac command, which is not found. I tried the following:
Didn't work!
View 7 Replies
View Related
May 11, 2011
I'm fighting my way through JAVA. But have hit another wall. Basically I need to to set paths in java so it can set/read files/director for Linux,Mac and windows.
The tutorials I'm using says to do this through the FileSystems class eg
Code:
However this reports it is missing, so a look on line says I need the headers so I set them with
Code:
This gives the following error
This has me totally confused as the tutorial shows this and checking online shows this, do I need to link in libraries or something like that?
I'm using the latest Ubuntu 11.04 and netbeans.
View 4 Replies
View Related
Apr 24, 2011
I installed an editor that works fine for root, but for user produces this error.
Code:
How does one set this thing?
View 8 Replies
View Related
Jul 10, 2010
we have installed ubuntuserver10.04 and globus toolkit4.1.2 but when insatll gt4.1.2.using ./configure,we get an error to set java path.the error is JAVA_HOME is not set..to unresolve it we again install the server edition along with all packages.we have set the path for java /usr/bin/java still we get the error.help me out
View 2 Replies
View Related
Oct 1, 2010
I have downloaded java and installed it with chmod +x and then ./bin package.
Hereunder is an output from CLI (putty)
I understand that the system knows the java is in a wrong place but if I do java -version it finds it correctly. I don't know and I don't understand how do I need to tell the OS that the java is somewhere else, I just did that with export java home and java path but still dosen't work, it keep tells when I do whereis java "java: /usr/share/java"
Here is another output:
View 10 Replies
View Related
Mar 2, 2010
I want to know the procedure to set java path in open suse to get it into working state.
View 2 Replies
View Related
Sep 22, 2010
I have a program that has a GUI which I have placed in /usr/local/bin however when I invoke the program I receive the following error:
Unable to find a supported JDK or JRE version. Version 1.3.1 or higher is required. Check your installation and use +javahome to specify the JDK or JRE location
I have since installed Java into the usr/local/ directory however I am now just totally Lost! Additionally, I believe that i have tried to install Java several times with no luck.
Questions:
1) Where should java be installed to have system wide access to all programs?
2) How can I place the Java location in my $PATH? here I am going to need very easy and detailed instructions?
3) Is there a way to ensure that the location where I intall java gets updates?
View 1 Replies
View Related
Feb 1, 2011
I'm setting up a RHEL 4 VM and have installed Oracle Java 1.6 from a bin file to /opt. I've added it into the PATH but when I try to run a installer that needs Java to run it says that it can't find a Java installation in my PATH but when I execute a which java I get the following:
Quote:
View 13 Replies
View Related
Mar 12, 2010
I have a problem with compiling vdrift-2009-06-15 using scons. As the source that i obtained only supports scons i cannot use make. the error that i get when i try to compile it in GNOME Terminal is: scons: Reading SConscript files ... scons: warning: The Options class is deprecated; use the Variables class instead.
File "/home/mohit/Download/vdrift-2009-06-15/SConstruct", line 9, in <module>
scons: warning: The BoolOption() function is deprecated; use the BoolVariable() function instead.
File "/home/mohit/Download/vdrift-2009-06-15/SConstruct", line 13, in <module>
Checking for C++ header file asio.hpp... (cached) yes
Checking for C++ header file boost/bind.hpp... (cached) yes
Checking for C++ header file GL/gl.h... (cached) yes
Checking for C++ header file GL/glu.h... (cached) yes
Checking for C++ header file SDL/SDL.h... (cached) yes
[Code]........
View 4 Replies
View Related
Jan 27, 2010
I accidentally messed my Java home path with this command:
export JAVA_HOME=
And now I don't know what the real path is.
View 2 Replies
View Related
Jan 27, 2010
I am trying to set my java path so that it is in effect for all users including the root user. I set the path correctly in /etc/profile and that works for my personal user, but when i try to run the same commands using sudo, i get messages saying that it can't find the java path.
View 3 Replies
View Related
Feb 23, 2010
i was tring to create a php daemon using system_daemon class. As i am in Lampp environment i get the problem that , system_daemon is is connecting to default mysql which i have stopped before starting lampp. i would like to know , how i can change its socket path to /opt/lampp/var... ? where i can make this path change?
View 1 Replies
View Related