Getting Started seriously

Hello

I have downloaded and burnt a cd of 0.28 Jnode.

I have two questions.

1. After i boot from the CD, I see that Jnode mounts the partitions with NTFS filesystems on my hard disk containing windows XP automatically.
Are these partitions mounted readonly or read/write?

2. I wrote a small program HelloWorld from windows and save it on to C:\HelloWorld.java.
After i booted into Jnode and then cd /devices/hda0,
I used the command javac HelloWorld.java to compile the program.
It gave me and error.
So i compiled the program from windows and then again i tried to run the program java /devices/hda0/HelloWorld
It said class not fount.
Then i did cd /devices/hda0 and then java HelloWorld
It said exception in command.

How do i compile or run this simple HelloWorld program from Jnode?

P.S.

If the processor does not support built in hardware virtualization will Jnode run as fast in kvm ?

without CPU support ...

KVM will default to software emulation (so it's exactly like running qemu AFAIK).
So, JNode will be slower in that case.

Fabien

my blog : en français, in english or both

One Final Question in Getting Started

Is is possible to install Jnode directly on harddisk just like any other OS or it need to be run under VMWARE/KVM etc.

If not possible to install on harddisk then why doesnt the build process produce only the ISO file instead of the different files like for use under GRUB .. for use under VMWARE 3.0 ... and surprisingly optional ISO.

No Installer

We don't have a (working) installer for JNode. But the bootimages (as needed by grub) are build!
Basically you need two things: The kernel image (jnode32.gz) and one initial jar (e.g. full.jgz). You will find these files in ./all/build/x86/..
Copy these to a empty partition and modify your grub's menu.lst to boot jnode32.gz and use (e.g.) full.jgz as initrd.

RE no installer

Please don't tear your hair off ... but how do i go to all/build/x86 .....
via http in browser or there is a ftp access ?

sagar

Speaking of the build

Ah sorry, I was speaking about the build.
I don't think we have the files online somewhere but at some point you need to build JNode yourself anyway Smiling
If you checked out the sources to jnode/ and ran "build.sh cd-x86-lite" you'll get the files I was speaking about.
(If you still want just the files without building, drop me a private mail and I'll upload it somewhere)

ITS DONE BOYS AND I AM UP AND RUNNING

Hey Stephen and Leventhe

Attaching screenshot of HW application written for Jnode and compiled and executed both on JNODE.
Thx for all the help .... moving ahead towards setting up a sandbox on my laptop with ubuntu linux ...
dont know if Celeron M processor is good enough ....

BUT WHAT A FEELING TO SEE THE MOST FAMOUS OUTPUT FROM ANY PROGRAM EVER WRITTEN IN COMPUTER SOFTWARE !!!

One more problem ...
classpath command gives message Exception in Command.
If i turn debug on, most of the exception lines scroll off ....
How do i set a clas path to a file say foo.jar in the /jnode directory?
i used
classpath --add file:/jnode/foo.jar

sagar

AttachmentSize
10072009008.jpg369.94 KB

More answers, then ...

1) You can scroll the jnode console using the mouse wheel, or SHIFT-UPARROW / SHIFT-DOWNARROW.

2) "classpath --add file:/jnode/foo.jar" should work, assuming that you put the JAR file there. It works for me. In fact, I was able to create a Java hello world program (using 'leed'), compile it, put the bytecode file into a JAR file, put the JAR file on the classpath and run it using 'java'. If it doesn't work for you, perhaps you are running into more old bugs that has been fixed in the past 6 months.

At this point, you need to set up a JNode development sandbox, checkout the latest JNode sources from SVN and build yourself a new ISO.

Go to the Getting Started page and read up on how to checkout sources and build. Also, I recommend that you read the material on using Eclipse and VMWare.

RE classpath

Hey Stephen

Thanx for 2 thing ...
one letting me know that u can scroll the plain old console using the mouse ... dunmno if thats possible on linux ... never tried in the last 9 years since i first installed linux ... Smiling

two letting me know that leed is an editor with which you can edit a file ... i was looking for familiar names like vi edit in the commands documentation

the exception thrown when running classpath is java.security.AccessControlException Permission not granted due to org.jnode.shell.CommandRunner

Eclipse and VMWare should not be a problem lets it requires some fine grained settings .... would go through the material in detail though ...

Was thinking which of SVN/GIT/tar.bzip2 is better?

Regards
Sagar

SVN vs GIT vs tar

SVN vs GIT is a matter of personal taste. But I wouldn't use a source TAR bundle because you want the latest sources, and the ability to incrementally update as changes are committed.

I think the AccessControlException is an old bug. Certainly I don't see it in JNode built from the SVN HEAD revision.

NTFS is read-only

According to this http://jnode.svn.sourceforge.net/viewvc/jnode/trunk/fs/src/fs/org/jnode/... and this http://jnode.svn.sourceforge.net/viewvc/jnode/trunk/fs/src/fs/org/jnode/... there is no write support in NTFS.
If you copy the java program from the ntfs partition to the /jnode/ directory (for instance) then you should be able to compile and run it.
Please post the exceptions too if you encounter any (stakctrace, screenshot, photo whatever).

Screenshots

Hello

I am posting the screenshots of the exception after turning on debug. Thx to stephen for letting me know how to do it.

Also i would like to know if there is a log file generated when we run Jnode from the CD. If so then tell me where it is so that i can copy it onto a hard drive partition and attach it also.

Sagar

AttachmentSize
HelloWorldApp.java147 bytes
10072009007.jpg569.2 KB

Declare the class "public"

This is actually a known bug in the JNode "java" command that was fixed months ago in SVN. The workaround is to declare the class as "public".

NTFS

Sorry ... I got that wrong.

RE NTFS is read-only

Hey Isantha

Ok will try this ... but one thing i wanna know ...
/jnode directory would be in the RAMFS i believe if i am booting from the CDROM.
On VMWARE how can I mount a write support partition since when i run jnode using vmware it does not detect my hard disk but it does so when i run jnode using a cd.

regards

sagar

vmware disks

You can download the vmware disks here: http://www.jnode.org/download_latest (click 4. vmdk-jnode-0.2.8.tar.gz) Unpack it and attache the fat32 disk to vmware.

Re vmware disks

Thanks Isantha !!!

Answers

If you are going to get serious about JNode, you'll need to set up a JNode build sandbox. (The latest release is about 6 months old now, and we've made a lot of progress since then.) I recommend that you set up your build sandbox on Linux rather than Windows (Linux is much faster!), and that you use VMWare to run JNode rather than burning CDs.

Here are the answers to your question

1) I believe hard disc partitions will be mounted read-write. Be very careful if you have valuable files on your hard disc drive. There is always a risk that JNode might trash your filesystem.

2) I think your compilation problem may be that you booted using "JNode (default)". Try using "JNode (all plugins)" instead to enable the plugin for the Java compiler. You also need to use the JNode classpath command to tell JNode where to look for bytecode files.

RE Answers

Hey Stephen

Thank you for the support.
I needed someone to give me a real hard kick on my A** full of inertia ... now i am up and running ... Smiling

1. I used Jnode All plugins. Also javac HelloWorld.java did not work. I believe the documentation states that java HelloWorld will look for the default classpath and then the current directory. I am invoking the command from the directory where the class file is located. So it should not be a problem if I do not run the classpath command. Correct me if i am wrong

2. Jnode is very slow with VMware on windows. In the last 6 months from the version 0.2.6/7/8, i still havent managed to get the GUI loaded even once on a Core DUO CPU with 2 GB of RAM. I don't know why is that so.

3. I read somewhere in the documentation that to run java programs they need to be installed as plugins. Is it so?
I mean i write a program on windows machine called AddressBook and then run the AddressBook.class file using the java AddressBook command and it should run. Is it that way or Jnode is designed to run all java programs only as plugins.
I mean as I see it Jnode should recognize .class as its executables similar to how Microsoft recognizes .exe files as executables.
In fact i feel that only the name of the class file should be typed and it should run.

thanks a million ....

sagar

More answers

1. I'm rather rusty on compiling / running Java on JNode. Based on what you and Levente have said ... it should work. As Levente said, please include error messages and screenshots of exceptions. (To get exceptions on command failure, run "propset -s jnode.debug true" first. Correction: that's for the JNode HEAD: if you are using a downloaded ISO, run "set jnode.debug true".)

2. The GUI is slow to start on VMWare, but it does work. However, there is not much you can do with it at the moment (only a couple of games and a 'console'), so I wouldn't worry about it.

3. You don't need to install Java as plugins to make them run. However, that is the way they are handled when they are included in the bootable ISO, etc. Only Java classes with a recognizable entry point (e.g. main(String[]) ...) can be run from the command line. You can run such a Java class by entering an 'alias' name, or a fully qualified class name. Aliases are typically defined in plugin descriptors, but (IIRC) you can also create them using the 'alias' command.

The JNode class loader will look for a command class in the JARs for the loaded plugins, on the classpath and in the current directory. In the latter two cases (I think) JNode maps package names onto directory names in the same way that the "java" command does on Windows or Linux. This is different to how Windows executes a ".exe" file, but analogous to how a java bytecode file is executed using "java" on Windows.

RE More Answers

Hey Stephen

Thanks for all the info.

What i meant to say was that in furture and java program on Jnode must run by typing just its name rather than making entries in the plugin descriptor files and aliases. So if i write a program AddressBook then it should run by typing AddressBook only rather than java AddressBook or by double-clicking the AddressBook file from the GUI.
This is a feature request only ...

Sagar

I hear what you are saying ...

... but I think that would just cause trouble and confusion. Sure, it works for throw away "hello world" type applications. But most serious Java apps consist of multiple files and make use of Java packages. For them, the conventional "classpath" approach, or the JNode plugin approach is much better.