Software :: Set Class Path For Java In Ubuntu 9.10
May 24, 2010I 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 RepliesI 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 RepliesI 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 ?
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 RelatedI installed jdk1.6.0_18 version. Please see below for the version.
[Code].....
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 RelatedI 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 RelatedI 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 RelatedI 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?
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
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.
I need to know that how to convert a java class file into java archive (jar)
View 1 Replies View Relatedworking 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 RelatedI 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 RelatedI 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!
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.
I installed an editor that works fine for root, but for user produces this error.
Code:
How does one set this thing?
I have installed jdk1.6_0_0 to kubuntu 8.10. But javac command doesn't work yet.
How do I set path?
Here are the outputs i got from typign some commands
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 RelatedI 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:
I want to know the procedure to set java path in open suse to get it into working state.
View 2 Replies View RelatedI 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?
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:
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]........
I accidentally messed my Java home path with this command:
export JAVA_HOME=
And now I don't know what the real path is.
I found the following function in /etc/profile file.
[Code]...
1. I dont undestand what "if ! echo $PATH | /bin/grep -qE "(^|:)$1($|:)"" this if statement actually comapres??
2. Also what is the difference between PATH=$PATH:$1 & PATH=$1:$PATH
I use this command:
Code:
find ./ -atime +360
to figure out the files that haven't been accessed since 360 days. The command above will return results like this:
Code:
/uploads/2010/02/some-file-name.ext
/uploads/2009/08/another-file-name.ext
... etc
I'm taking here about tins of directories, thousands of files. I'm looking to find a command that makes me able to move the results above to another path, and to create that path once it doesn't exist like below:
Code:
mv /uploads/2010/02/some-file-name.ext /old-files/uploads/2010/02/some-file-name.ext
But I want the executed command to create this path
Code:
/old-files/uploads/2010/02/
If it doesn't exist.
I have a program that takes a relative path as input appends it to a some path string to get the actual path.
Now all I can input is the relative path. So if I want to go one level above my input will be ../mypath.
If I know the depth of the path used internally, I can use .. as many times to go to the root directory and then give the absolute path. But suppose I do not know the depth of the directory, can I construct a relative path string such that it considers it as a relative path. One way could be to have enough .. in the path string so that I can force an absolute path for some maximum depth of path.
Is there some path string syntax that I am not aware of but can achieve this?
Experimenting with shell variables, accidentally deleted the path variable how could I return to the original path value. What kinds of problems will I have if I don't have a path variable.
View 3 Replies View RelatedI've just installed java (jre-6u21-linux-i586.bin) on Red Hat 4.4 AS and issued this command to check the java version: java -versionand got :bash :java: command not found
View 4 Replies View Relatedhow to add a path to PATH variable permanently so that it remains persisent even after closing shell and rebooting the system when i added a path, to variable it remained there as long as i didn't closed the shell. but when i reopened it ,changed were undone.
View 2 Replies View Related