nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

How to set my own java compiler in linux

This is a discussion on How to set my own java compiler in linux within the Linux software forums, part of the Linux Getting Started category; Essentially, I have several servers at my disposal. My data files are almost 1 GB per file and I am ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-14-2008, 04:08 AM
Junior Member
User
 
Join Date: Jul 2008
My distro: Red hat
Posts: 2
Rep Power: 0
saras is on a distinguished road
Default How to set my own java compiler in linux

Essentially, I have several servers at my disposal. My data files are almost 1 GB per file and I am trying out several machine learning algorithms from weka package. I have two jar files weka.jar and weka-src.jar and one more libsvm.jar.

I wanted to use these jar files on several linux machines and was able to run it on one of the severs by using the java sdk version. But the other servers ( one of them a cluster of 8 computer are having their own java version called gij and it is not letting me set my path to my own compiler or taking up my class path. I am not able to run with the gij java either. so, is it a security issue ( I dont have rights to set path ?) .. How to run my programs using the jar files.... ( either with my java compiler or gij )? appreciate your response. thanks..

+++++++++++++++++++++++++++++++++++++++++++++++++
successful path setting in one linux server: since it gives version number of the new java home

JAVA_HOME=/home/guest/SDK/jdk
export JAVA_HOME
export PATH=$JAVA_HOME/bin:$PATH
java -version
java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode)

WEKA_HOME=/home/guest/Weka-3-5
export WEKA_HOME

export CLASSPATH=$WEKA_HOME/weka.jar:$CLASSPATH
export CLASSPATH=$WEKA_HOME/weka-src.jar:$CLASSPATH

+++++++++++++++++++++++++++++++++++++++++++++++++
unsuccessful : when done on another cluster and another linux.
it insists on using gij and is not letting me use java command.

all the above commands have no use. The verison shows the gij info.

gij --mx = 1024 -jar /home/saras/weka-3-5/weka.jar /home/saras/weka-3-5/weka-src.jar weka.classifiers.functions.SMO -t /home/saras/wind11-cls4-FullSet.arff

Exception in thread "main" java.lang.NoClassDefFoundError: 1024
at gnu.gcj.runtime.FirstThread.run() (/usr/lib64/libgcj.so.5.0.0)
at _Jv_ThreadRun(java.lang.Thread) (/usr/lib64/libgcj.so.5.0.0)
at _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib64/libgcj.so.5.0.0)
at __libc_start_main (/lib64/tls/libc-2.3.4.so)
[saras@head1 ~]$

and I get a noclass found.

+++++++++++++++++++++++++++++++++++
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-14-2008, 11:02 PM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 557
Rep Power: 6
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

Hello,

You are allowed to set your path under any Linux distribution using following syntax:
Code:
export PATH=$PATH:/path/to/new/location
echo $PATH
You need to add export command to .bashrc or .bash_profile
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
  #3 (permalink)  
Old 07-15-2008, 04:31 AM
Junior Member
User
 
Join Date: Jul 2008
My distro: Red hat
Posts: 2
Rep Power: 0
saras is on a distinguished road
Default

Thanks Rocky, I will try this.

I like y our quote too...!!

saras
Reply With Quote
Reply

Bookmarks

Tags
export command , java , jdk , linux


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Centos Linux 5 C / C++ compiler installation raj Getting started tutorials 0 07-12-2007 11:57 PM
Linux java apps: printing mike herdman Linux software 7 01-15-2007 01:06 PM
Looking Glass: Sun open source java desktop Ashish Pathak The Hangout 1 01-05-2006 06:46 PM


All times are GMT +5.5. The time now is 12:09 PM.


Powered by vBulletin® Version 3.7.2 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36