I am using jedit 4.1 as a java editor on linux.
The following piece of code compiles well using the JCompiler plugin to give a class file.
import java.io.*;
class HelloWorld { public static void main(String args[]) { try { BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
String s=" ",s1=" "; System.out.print("Enter your string : "); s1=buf.readLine(); s+=s1; buf.close(); System.out.println("Your string is : "+s); } catch(Exception e){}
} }
However when i try to run this program thru java command of Console plugin of Jedit ,it hangs out and i do not get any o/p.
whn i try to run the same proram by java command line option of the generated class file it works well.
So in shrt can someone suggest how do i tweak jedit to run my program within jedit and not going to the command line.
Rohit wrote:
The following piece of code compiles well using the JCompiler plugin to
Ok... here's my chance to nitpick ;)
import java.io.*;
import java.io.BufferedReader; import java.io.InputStreamReader; /* import specific classes */
class HelloWorld { public static void main(String args[]) { try { BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
String s=" ",s1=" "; System.out.print("Enter your string : "); s1=buf.readLine(); s+=s1;
/* could well have been... */ System.out.print("Enter your string : "); String s = buf.readLine(); /* why s, s1? and why initialise to " " ? */
buf.close(); System.out.println("Your string is : "+s); } catch(Exception e){}
You never want to do that in production code. An exception has occured, deal with it. Even in this test case, you probably want to e.printStackTrace() it. At least it might help debug/solve your problem.
} }
However when i try to run this program thru java command of Console plugin of Jedit ,it hangs out and i do not get any o/p.
What do you mean it hangs out? Does it prompt you for input? What happens when you hit [enter] after entering the string?
You'll be lucky if there are any jedit users here. Otherwise it might be worth to just use the command line instead.
-Manish
I am now using an IBM ThinkPad A31p, with a partitioned hdd, with XP professional 'up front' on 20 GB, and 40GB saved for Linux.
Mandrake 9.0 cannot handle the display which is 1600x1200 32bit ATI Mobility FireGL 7800, nor the Agere Systems AC'97 Modem.
What about Mandrake 9.1 or a different distro (SuSE? Debian?] ? I don't really want to spend money on those that don't work.
I also tried RedHat 8.00., but the dual boot didn't work, then XP changed the boot record so that instead a dual boot menu, the system goes directly into XP again!. Thanks in advance Sheetal
--------------------------------- Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wednesday 02 April 2003 22:15, Sheetal Chopra used the keyboard to enter the following:
I am now using an IBM ThinkPad A31p, with a partitioned hdd, with XP professional 'up front' on 20 GB, and 40GB saved for Linux.
Please use a little more descriptive subject, thanks. Access to control panel -> Administrative tools -> computer management -> disk management and give us detailed description of your HDD partitions. Which are the primary/secondary/logical size of each partition.
What about Mandrake 9.1 or a different distro (SuSE? Debian?] ? I don't really want to spend money on those that don't work.
If you are using GNU/Linux (Linux is the wrong name use GNU/Linux instead). My sincer sugesstion to you is to stick with RedHat Linux 8.0 which is good a stable and maximum number of people will be able to help you, later you may shift to a distribution like Debian.
I also tried RedHat 8.00., but the dual boot didn't work, then XP
Be prepared to spend time with GNU/LInux, it is great to learn things yourself, sooner or later you will enjoy the hacking GNU/Linux youself. We can only help you in learning to hack and not help you hack specific things. Just trust any one distribution and install it. Suggestion again is to stick to RedHat Linux 8.0.
- -- Amish K. Munshi God helps those who help themselves. Visit http://munshi.dyndns.org/imp for my public key.
I also tried RedHat 8.00., but the dual boot didn't work, then XP
This is because XP has been installed with NTFS File System, and lilo,grub (the boot managers are not able to write on the NTFS Paritition) try doing this
use your install cd in rescue mode mount the / and /boot partitions.
modify the first statement boot = /dev/hda --> boot = /dev/hda3 (this is the partition number of your /boot parition, you can get this details from /etc/fstab file )
now run lilo -v This shall write the boot information on the start sectors of /dev/hda?? partition.
now get that boot information in a file using
dd if=/dev/hda?? of=/boot-linux.img bs=512 count=1 get this file /boot-linux.img file on a floppy (its size should be not more then 512 bytes.)
reboot to xp, copy the file in C:\ edit boot.ini and append this line @ the end
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version 4.00" multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version 4.00 [VGA mode]" /basevideo /sos C:\boot-linux.img="GNU/Linux version watever.watever" (<--add this line) now you can boot into your linux HTH,
see inline
--- Mitul Limbani mitul@mitul.com wrote:
I also tried RedHat 8.00., but the dual boot
didn't work, then XP
This is because XP has been installed with NTFS File System, and lilo,grub (the boot managers are not able to write on the NTFS Paritition) try doing this
--Tapesh
I don;t think it matters whether XP is installed with NTFS or anything...... lilo and grub they write in the MBR and they have nothing to do with NTFS...... or FAT filesystems... Correct me if i am wrong......
use your install cd in rescue mode mount the / and /boot partitions.
modify the first statement boot = /dev/hda --> boot = /dev/hda3 (this is the partition number of your /boot parition, you can get this details from /etc/fstab file )
now run lilo -v This shall write the boot information on the start sectors of /dev/hda?? partition.
now get that boot information in a file using
dd if=/dev/hda?? of=/boot-linux.img bs=512 count=1 get this file /boot-linux.img file on a floppy (its size should be not more then 512 bytes.)
reboot to xp, copy the file in C:\ edit boot.ini and append this line @ the end
multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version 4.00" multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version 4.00 [VGA mode]" /basevideo /sos C:\boot-linux.img="GNU/Linux version watever.watever" (<--add this line) now you can boot into your linux HTH,
-- Best Regards, Mitul Limbani CTO, Enterux Solutions The Enterprise Linux Company (http://www.enterux.com/) (mitul@enterux.com)
--
===== ********************************************* It doesn't make a difference what temperature a room is, it's always room temperature.
--Steven Wright *********************************************
__________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com
Hey Tapesh,
--Tapesh
I don;t think it matters whether XP is installed
with NTFS or anything...... lilo and grub they write in the MBR and they have nothing to do with NTFS...... or FAT filesystems... Correct me if i am wrong......
Well somehow i wasnt able to write to MBR when it was NTFS, and it was quite smooth when the FS was FAT32.
Best Regards, Mitul Limbani CTO, Enterux Solutions The Enterprise Linux Company (http://www.enterux.com/) (mitul@enterux.com)
On 03 Apr 2003, Mitul Limbani spake thusly:
Well somehow i wasnt able to write to MBR when it was NTFS, and it was quite smooth when the FS was FAT32.
I have installed grub & lilo on IBM R32 with XP on NTFS with no problems
Boot loaders use MBR.
On Wed, 2 Apr 2003, Tapeshwar Nath wrote:
--- Mitul Limbani mitul@mitul.com wrote:
I also tried RedHat 8.00., but the dual boot
didn't work, then XP
This is because XP has been installed with NTFS File System, and lilo,grub (the boot managers are not able to write on the NTFS Paritition) try doing this
I don;t think it matters whether XP is installed
with NTFS or anything...... lilo and grub they write in the MBR and they have nothing to do with NTFS...... or FAT filesystems... Correct me if i am wrong......
Quite true, it doesn't matter what filesystem is present, filesystem abstraction comes into play when the kernel has booted. Boot records or for that matter anything on HDD is plain old binary data.
-Rajesh
This is because XP has been installed with NTFS File System, and lilo,grub (the boot managers are not able to write on the NTFS Paritition) try doing this
this applies only if u dont install the bootloader into partition table/mbr.
partition table does not depend on the filesystem used..
Kiran Ghag Software Engineer @ Patni Computers, India Work Phone: +91 (22) 2829 1454 Extension 5236 Web Page: http://kiran7.freeservers.com _____
Cloning is the sincerest form of flattery.
On 03 Apr 2003 09:27:24 +0530 Mitul Limbani wrote:
modify the first statement boot = /dev/hda --> boot = /dev/hda3 (this is the partition number of your /boot parition, you can get this details from /etc/fstab file )
now run lilo -v This shall write the boot information on the start sectors of /dev/hda?? partition.
It's fine this far. However, trying to get NT Loader to multi-boot is major suckage. It's easier to set the partition containing /boot as active instead of the C: drive. NT Loader stays in the MBR, the system uses Grub/Lilo to boot and experimentation with Linux doesn't remain as painful.
On Thu, 3 Apr 2003, Amish K. Munshi wrote:
On Wednesday 02 April 2003 22:15, Sheetal Chopra [snip]....
I am now using an IBM ThinkPad A31p, with a partitioned hdd, with XP professional 'up front' on 20 GB, and 40GB saved for Linux.
Please use a little more descriptive subject, thanks. Access to control panel -> Administrative tools -> computer management -> disk management and give us detailed description of your HDD partitions. Which are the primary/secondary/logical size of each partition.
I don't think Sheetal was asking for how to check harddisk partitions. I wish people take time to see what is asked.
[snip]
I also tried RedHat 8.00., but the dual boot didn't work, then XP
Be prepared to spend time with GNU/LInux, it is great to learn things yourself, sooner or later you will enjoy the hacking GNU/Linux youself. We can only help you in learning to hack and not help you hack specific things. Just trust any one distribution and install it. Suggestion again is to stick to RedHat Linux 8.0.
People please try to answer genuine questions, The person has mentioned that dual boot configuration of WinXP and RedHat 8.0 didn't work and that XP replaced the boot block back.
Sheetal, this may happen if you perform Windows Update or if you have any Anti-Virus software watching for changes to disk. XP's system restore functionality may also do this if you initiated a restore operation. In dual-boot systems, the normal course of action is to install Windows first and then install Linux and install a boot loader like GRUB or LILO. Alternatively you can also edit boot.ini in WinXP to load Linux from XP's boot menu. Look for boot loader howtos on www.tldp.org, on what is possible. I would like to mention in passing for others that setting up a dual-boot system is no-where close to 'hacking'. Amish's suggestion of using RHL 8.0 is a good one, as it is a nice and stable distro. However RHL 9.0 is out, (well for public on 7th April), and there have been some good reviews of it on net, specially the one from Guru Labs. If you get your hands on it, it might solve many of your problems, else you can always post here with right subject lines.
A quick check on www.linux-laptops.com, reveals many links for Thinkpad A31p, e.g. see this page http://www.linux-on-laptops.com/ibm.html Seems like this laptop works with RedHat/Debian/SuSe.
Best regards, Rajesh
In your JEdit console, be sure that you are in the directory which contains the class file when you try to run your Java class, or alternatively set your CLASSPATH to point to that directory .
regards Parag
Rohit wrote:
I am using jedit 4.1 as a java editor on linux.
The following piece of code compiles well using the JCompiler plugin to give a class file.