Re: set path for jdk.3
Hello Liuchao: You need to set /etc/profile in order to run ( javac and java) from anywhere in your filesystem. In order to accomplish this, go to the directory /etc. Then look for the file pprofile. Also, use a text editor such as emacs or vi the edit this file. In this file you are going to see a line that looks like: PATH="$PATH:/usr/X11R6/bin" NOTE: your path might look different from this. Anyway, you should put /usr/java/jdk1.3 in your path. Your new PATH should look like this PATH="$PATH:/usr/X11R6/bin:/usr/java/jdk1.3/bin" save this file and reboot your system. If you need more help you can email me. Good luck Ezra Shop online without a credit card http://www.rocketcash.com RocketCash, a NetZero subsidiary -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: ask for path
You can either set the path in the system boot up script or better still if you set it in your profile file. In linux your profile files will be in your home directory for instane if your login userid is liuchao, then your home directory will be /home/liuchao. look for profiles by typing ls -a at command prompt. this will give you a list all files including the hidden ones. edit either one of the files depending on what shell are you in. set the environment variable and path there. This way each time you login all the commands from /usr/java/jdk1.3/bin/ will be available for you automatically. Hope this helps. "Liuchao" <[EMAIL PROTECTED]To: <[EMAIL PROTECTED]> ac.cn> cc: Subject: ask for path 09/04/2001 09:36 AM I have installed JDK1.3.0 in directory /usr/java/jdk1.3. and I use echo $PATH, the $JAVA_HOME have not been set. I set $PATH=/usr/java/jdk1.3/bin every time when I login in my computer. How can I do to let $PATH have been set automatic everytime when I login in my linux. Thank you, Chao Liu [EMAIL PROTECTED] 2001.4.9 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: set path for jdk.3
>save this file and reboot your system. Why would you reboot your system just because you change your shell configuration file..? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: set path for jdk.3
On Mon, 9 Apr 2001, Ezra Taylor wrote: > Hello Liuchao: > You need to set /etc/profile in order to run ( > javac and java) from anywhere in your > filesystem. Change /etc/profile if you want java available by default for all users of the system. Otherwise, you should change only the personal profile of specific user accounts. The name varies with the user's shell, common locations are .bash_profile and .profile. > Your new PATH should look like this > > PATH="$PATH:/usr/X11R6/bin:/usr/java/jdk1.3/bin" > > save this file and reboot your system. A reboot is not necessary. One need only logout and login, or simply source the profile. -- Joi EllisSoftware Engineer Aravox Technologies [EMAIL PROTECTED], [EMAIL PROTECTED] No matter what we think of Linux versus FreeBSD, etc., the one thing I really like about Linux is that it has Microsoft worried. Anything that kicks a monopoly in the pants has got to be good for something. - Chris Johnson -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: ask for path
Since you're using linux, I'll give my examples assuming you're using bash as your primary shell. I've usually had the best luck setting environment variables in my .bashrc file and deleting my .bash_profile and then setting .bash_profile as a symlink to my .bashrc. To see what I'm talking about, check out the contents of your .bashrc and .bash_profile. $ cd $ cat .bashrc $ cat .bash_profile Be sure to copy anything important out of .bash_profile into .bashrc. Of course, if you just append the contents, it will save some time. $ cat .bash_profile >> .bashrc $ rm .bash_profile $ ln -s .bashrc .bash_profile Now, to actually set your environment, add the following lines to your .bashrc in your favorite editor. export JAVA_HOME=/usr/java/jdk1.3 export PATH=$PATH:$JAVA_HOME/bin Don't forget the 'export' in your script or the environment variable will not be set in child processes (such as scripts or programs you launch.) On Mon, Apr 09, 2001 at 09:36:25AM +0800, Liuchao wrote: > I have installed JDK1.3.0 in directory /usr/java/jdk1.3. and I use echo $PATH, the >$JAVA_HOME have not been set. > I set $PATH=/usr/java/jdk1.3/bin every time when I login in my computer. How can I >do to let $PATH have been set > automatic everytime when I login in my linux. > > Thank you, > Chao Liu > [EMAIL PROTECTED] > 2001.4.9 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
call c function in java
Hi, In my java application, I need to call my existing c functions. There are some struct data types in my C function, how to handle these ? Thanks in advance. Zhihong Pan Chek, Inc -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: ask for path
On Mon, 9 Apr 2001, Aaron Brashears wrote: > Be sure to copy anything important out of .bash_profile into > .bashrc. Of course, if you just append the contents, it will save some > time. Uh. This is NOT a good idea. .bashrc is run whenever a child shell is launched. IE every time a command you issue happens to be a shell script. .bashrc should be kept to the bare minimum, because the child is going to inherit most, if not all of its settings from the parent shell process anyway. > > $ cat .bash_profile >> .bashrc > $ rm .bash_profile > $ ln -s .bashrc .bash_profile No, no no. Don't DO this! Now you're running everything multiple times! -- Joi EllisSoftware Engineer Aravox Technologies [EMAIL PROTECTED], [EMAIL PROTECTED] No matter what we think of Linux versus FreeBSD, etc., the one thing I really like about Linux is that it has Microsoft worried. Anything that kicks a monopoly in the pants has got to be good for something. - Chris Johnson -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: ask for path
On Mon, Apr 09, 2001 at 12:49:56PM -0500, Joi Ellis wrote: > On Mon, 9 Apr 2001, Aaron Brashears wrote: > > > > $ cat .bash_profile >> .bashrc > > $ rm .bash_profile > > $ ln -s .bashrc .bash_profile > > No, no no. Don't DO this! Now you're running everything multiple times! Hm, interesting. It's the only way I've found to keep things straight when using ssh. I don't actually run any scripts in my .bashrc - the contents are: . ~/.env And .env sets the environment. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: ask for path
On Mon, 9 Apr 2001, Aaron Brashears wrote: > Hm, interesting. It's the only way I've found to keep things straight > when using ssh. I don't actually run any scripts in my .bashrc - the > contents are: > > . ~/.env > > And .env sets the environment. I use ssh daily and don't have any problems betweeh .bashrc and .bash_profile. What problems are you seeing? Note that there are a number of system- and user-level configuration options which affect shell initialization. man sshd for details. -- Joi EllisSoftware Engineer Aravox Technologies [EMAIL PROTECTED], [EMAIL PROTECTED] No matter what we think of Linux versus FreeBSD, etc., the one thing I really like about Linux is that it has Microsoft worried. Anything that kicks a monopoly in the pants has got to be good for something. - Chris Johnson -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
error on calling c function in java
When I call c function in my java application, I got the following error message: # # HotSpot Virtual Machine Error, Unexpected Signal 11 # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Error ID: 4F533F4C494E55580E43505005BC # # Problematic Thread: prio=1 tid=0x804e500 nid=0x7062 runnable # 18Aborted Could anybody help me? Thanks, Zhihong Pan Chek, Inc -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: error on calling c function in java
On 9 Apr 2001, Zhihong Pan wrote: > When I call c function in my java application, I got the following error message: > # > # HotSpot Virtual Machine Error, Unexpected Signal 11 > # Please report this error at > # http://java.sun.com/cgi-bin/bugreport.cgi > # > # Error ID: 4F533F4C494E55580E43505005BC > # > # Problematic Thread: prio=1 tid=0x804e500 nid=0x7062 runnable > # > 18Aborted Stick that long number into Bug Parade's search engin. I remember looking for it a few weeks ago. Either I found a workaround or took a different road around it, I don't remember which. -- Joi EllisSoftware Engineer Aravox Technologies [EMAIL PROTECTED], [EMAIL PROTECTED] No matter what we think of Linux versus FreeBSD, etc., the one thing I really like about Linux is that it has Microsoft worried. Anything that kicks a monopoly in the pants has got to be good for something. - Chris Johnson -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: error on calling c function in java
If this is a JNI program you may get more verification that it was inside your own code or from the VM from running with -classic . The new 1.3.1 release will have better hotspot diagnostics than the cryptic message below. If you do 'man ascii' you can read off the file name below, (its in hex) the last 4 digits are the line number. ie os_linux.cpp 1468 There have been some bugs in relation to null arguments with JNI which I would guess can be coded around for now regards calvin Joi Ellis wrote: > > On 9 Apr 2001, Zhihong Pan wrote: > > > When I call c function in my java application, I got the following error message: > > # > > # HotSpot Virtual Machine Error, Unexpected Signal 11 > > # Please report this error at > > # http://java.sun.com/cgi-bin/bugreport.cgi > > # > > # Error ID: 4F533F4C494E55580E43505005BC > > # > > # Problematic Thread: prio=1 tid=0x804e500 nid=0x7062 runnable > > # > > 18Aborted > > Stick that long number into Bug Parade's search engin. > I remember looking for it a few weeks ago. Either I found > a workaround or took a different road around it, I don't remember > which. > > -- > Joi EllisSoftware Engineer > Aravox Technologies [EMAIL PROTECTED], [EMAIL PROTECTED] > > No matter what we think of Linux versus FreeBSD, etc., the one thing I > really like about Linux is that it has Microsoft worried. Anything > that kicks a monopoly in the pants has got to be good for something. >- Chris Johnson > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
JNI for linux
Hello,A problem was happened when I use JNI in linux to call my c programme. I used jdk1.3 and the following is my little test programm:--JavaCallC.java---import java.lang.*;public class JavaCallC{ public JavaCallC() { System.loadLibrary("javac"); } public native int StrInIntOut(String str); public native String IntInStrOut(int iIndex); public static void main(String[] args) { int tempint; String tempstr; JavaCallC obj = new JavaCallC(); tempint=obj.StrInIntOut( "Hello"); tempstr=obj.IntInStrOut(34); System.out.print(tempint); System.out.print(tempstr); }}---end---then javac JavaCallC.java, javah -jni JavaCallCJavaCallC.c---#include /* I have also try "include JavaCallC.h",error is stillJNIEXPORT jint JNICALL Java_JavaCallC_StrInIntOut(JNIEnv * jenv, jobject jobj, jstring jstr){ const char * thestr; thestr=(*jenv)->GetStringUTFChars(jenv,jstr,0); return 1234;}JNIEXPORT jstring JNICALL Java_JavaCallC_IntInStrOut(JNIEnv * jenv, jobject jobj, jint icount){ char cptext[]="Java callc test"; long getint=icount; return (*jenv)->NewStringUTF(jenv,cptext);}--end---then gcc -shared -o libjavac.so JavaCallC.cthen java JavaCallCerror was happened. Exception in thread "main" java.lang.UnsatisfiedLinkError: no javac in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312) at java.lang.Runtime.loadLibrary0(Runtime.java:749) at java.lang.System.loadLibrary(System.java:820) at JavaCallC.(JavaCallC.java:6) at JavaCallC.main(JavaCallC.java:17)
Re: JNI for linux
> Chao Liu wrote: > > A problem was happened when I use JNI in linux to call my c programme. > I used jdk1.3 and the following is my little test programm: > > [...] > System.loadLibrary("javac"); > [...] > > Exception in thread "main" java.lang.UnsatisfiedLinkError: no javac in > java.library.path > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312) > at java.lang.Runtime.loadLibrary0(Runtime.java:749) > at java.lang.System.loadLibrary(System.java:820) > at JavaCallC.(JavaCallC.java:6) > at JavaCallC.main(JavaCallC.java:17) Try javac -Djava.library.path=. JavaCallC -- Weiqi Gao [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]