LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-17-2007, 09:45 PM   #1
asterik123
LQ Newbie
 
Registered: Apr 2007
Posts: 2

Rep: Reputation: 0
how to use gij for my java program


I just want to compile a simple java program in fedora 6 virtual machine but do not know the command for compiling and executing the program for ex( we use javac filename.java and then java filename in the windows environment). Also in which directory can i find this gij interpreter and should i save my java program in the same place as the gij.... (i do not want to use classpath). please help..

Last edited by asterik123; 04-17-2007 at 09:47 PM.
 
Old 04-17-2007, 10:00 PM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
you compile and run them the same way as on windows, however youll need to install the Java JDK (just like you have to on windows).

go here and download the first item, 'JDK 6u1'
since your on fedora, you can download the RPM, which is under the heading 'Linux Platform - Java(TM) SE Development Kit 6 Update 1', and filename 'jdk-6u1-linux-i586-rpm.bin'

to isntall the RPM read the instructions.

to then compile and run programs with simply 'javac file.java' and 'java file', respectively, you have to have the path to the 'javac' and 'java' binaries in your PATH variable. search here or elsewhere for how to do this, as it is very common.

to find out where these files are located so you know what path to add, use a find utility (either command line based or from your GUI) to search for files of name 'java' or 'javac'. they should both be in the same directory.

regarding gij ive never heard of it.
 
Old 04-17-2007, 11:03 PM   #3
asterik123
LQ Newbie
 
Registered: Apr 2007
Posts: 2

Original Poster
Rep: Reputation: 0
thanks for your post, i did try this option already but the problem is that i am running fedora on windows xp. So when i save the rpm file from the website you mentioned, I can only save it on windows , then how do i import it in fedora? is there any way i can just download the file straight into fedora. ?? If i am able to do that then i can just install it reading the instructions ..pls let me know...thanks in advance..
ps. Mozilla firefox on fedora says "cannot find server"...

Last edited by asterik123; 04-17-2007 at 11:21 PM.
 
Old 04-18-2007, 12:35 AM   #4
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
so your not booting the computer into fedora? your running some sort of virtualization software? and your network card/internet connection doesnt work in fedora?

from windows you could make a fat32 partition, save the file to there, then (once mounted) you could read the file from fedora. search around for mounting, it would be something similar to (as root):
Code:
mkdir /mnt/shared
mount  -t vfat -o rw /dev/hda2 /mnt/shared
you would have to find out what your new partition would be (in place of /dev/hda2, which is just an example). to do this check 'fdisk -l' once the partition is created and formatted from windows, and match up the size of your new partition with one from the output, and remember the device name (most likely /dev/hdaX). an alternative route would be to burn to a cd or floppy.. in both cases again you would have to mount! quickest solution is to make another (fat32) partition from windows.

however, the best solution would be to, of course, get your network connection working in fedora! go on over to the hardware forum and create a thread. supply information such as the output of commands: 'lsmod' 'ifconfig eth0 up' 'lspci | grep -i net' and im sure youll have that connection running in no time. this way you can actually boot to fedora.

Last edited by nadroj; 04-18-2007 at 12:39 AM.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
java program as daemon dsubbarao Linux - Newbie 9 03-01-2007 11:17 PM
Problem running Eclipse with gij lvella Linux - Software 2 05-11-2005 03:30 PM
Please help with my Java program filsed Programming 1 05-02-2005 03:58 AM
Stop java program(threaded program..should end cleanly) rmanocha Programming 4 11-09-2004 09:36 AM
Java Program merlin371 Linux - Software 11 01-18-2004 04:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration