Java-Based x86 Emulator 263
jaavaaguru writes "Researchers at Oxford University have produced a Java-based x86 emulator that they hope will be useful in testing applications and learning about viruses without damaging the host, utilizing the robust sandboxing that Java provides. They have an online demo available that boots DOS and has some games to play. Being purely Java, this emulator should be able to run on almost anything, including cell phones." The code is not yet available outside the Oxford community; the developers are said to be working on a suitable general license. In the meantime the code can be licensed on a case-by-case basis.
Interesting, but (Score:5, Funny)
Still, I'd love to tinker with this from a 'gee whiz' standpoint.
Re:Interesting, but (Score:5, Interesting)
If it's hard to get good emulation speed in C++, it's even harder in Java.
can you run java in the x86? (Score:5, Interesting)
Just like the old days when you ran windows real mode under a windows 386 mode windows.
Re: (Score:3, Informative)
Re: (Score:2)
Linux on emulated hardware can be faster than Linux on real hardware:
http://linux.slashdot.org/article.pl?sid=06/05/31
Re:can you run java in the x86? (Score:4, Funny)
Re:can you run java in the x86? (Score:5, Funny)
...written in XSLT.
Re: (Score:2)
Re:can you run java in the x86? (Score:5, Funny)
The next step is to get rid of hardware altogether.
Re: (Score:3, Funny)
It's turtles all the way down, I tell you!
Re: (Score:2)
Re: (Score:2, Informative)
Btw, here's a Gameboy emulator [pscode.com] written in Visual Basic!
It's quite fast... puzzling.
Re: (Score:3, Insightful)
Re:Interesting, but (Score:5, Funny)
And with them it can perform almost as fast as C in some fringe cases.
Re: (Score:3, Insightful)
Re: (Score:3, Interesting)
There is a world of difference between "theoretically capable" and "reliable does". Is there some practical demonstration that compute-intensive tasks like emulation can be reliably executed with Java without sucking?
Re:Interesting, but (Score:5, Insightful)
Re: (Score:3, Funny)
Re: (Score:2)
Re: (Score:2)
Compared to C++, yes, it typically is. But it's usually within 20-30%, sometimes a bit worse, sometiems a bit better. In some rare cases, Java can even beat machine-code compiled languages.
Absolutely not. But Perl culture encourages the kind of programming which leads to unreadable code. And Perl syntax certainly doesn't help either.
I would much, much rather work on Java code that someone else wrote. It's not that you can't write horrible Java code, it's just that the l
Re:Interesting, but (Score:4, Insightful)
Re: (Score:3, Insightful)
errm ... how about because the applet failed to load?
If you go to the site, you'll see their premise is stupid - that game companies will license this to sell old dos games on cell phones, rather than porting them. Of course what they overloook is once you have the emulator, you don't need the game companies - just go through any abandonware site, or your stacks of old floppies.
Re: (Score:2)
(At least, when running on an actual x86).
Seriously though, this is quite impressive (to have it written in Java). But what are the advantages of this versus QEMU? (Besides a wider range of platforms). I mean... QEMU already offers total sandboxing doesn't it?
Did you try it? (Score:2)
Re: (Score:2)
Re: (Score:2)
So... (Score:5, Funny)
Molasses - 35mph! (Score:3, Interesting)
Re: (Score:2)
You know what would really be kewl? If you could make an integrated circuit that runs java real fast then you would have a chip that runs x86 assembly.
Re: (Score:2)
Why wouldn't you just grab a Pentium 266 and have a chip that runs x86 assembly at twice the speed this thing will on my dual core athlon?
How's the efficiency? (Score:2, Interesting)
On, say, a mobile phone (which is mentioned by the site as a possible use) would there be enough processing grunt to do anything useful? I know Java's not as slow as some people wou
Well for one (Score:5, Interesting)
I'd like you to point me to the support page for VMWare on SPARC... oh wait that's cause there isn't one. QEMU can't even run most applications on a SPARC.
And forget about ARM.
I think this is great. Java is not as slow as people seem to think it is. One thing Java 5 (and 6) have that actually benefits virtualization is dynamic recompilation... the JVM knows the instruction sdequences better than the original author, and in theory can optimize the code paths in ways writing a virtualizer in assembly or C++ can not.
Re: (Score:3, Interesting)
It's fine for all sorts of things while running, but the two apps I use it for aren't exactly impressive.
If I leave Azureus up for a while, it's eating 400 megs of memory. It also takes 10+ seconds to show
its window. The other thing I regularly use Java for is my bank, which insists on using a friggin'
control in its window. It takes about a minute to show up, even with other Java apps running. It seems
the s
Re:Well for one (Score:5, Informative)
Under the Java control applet, under the General tab, click "Settings..." under "Temporary Internet Files". Then click "View Applets...". It will take a moment to load (or in my case, 2-3 minutes). Then UNcheck "Enable Caching". Firefox now starts my applets almost instantly. This doesn't affect downloaded Java applications such as Azureus or Eclipse (both of which I use extensively).
Hope this helps.
Re: (Score:2, Interesting)
It could play tic-tac-toe, Very slowly.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Anyway, in Java, each process runs in a different JVM, so there is absolutely no sharing between processes. This is a long-standing issue and Sun is cl
Re: (Score:2)
You'd think that Eclipse would be faster due to SWT interfacing with the native widget set, but I guess this shows that GUI speed isn't everything. As a side note, Azureus also uses SWT.
Re: (Score:2)
Still, though, your point is taken. This emulator could run x86 software anywhere the JVM is. Of course the primary purpose of it seem to be for research purposes (debugging rootkits, etc). Whether it will metamorphose into something practical remains
Re: (Score:2)
Re: (Score:3, Insightful)
And this wouldn't be just limited to a virus program either. Suppose we had this a
Re:How's the efficiency? (Score:5, Insightful)
Well, that's great, but you can already do that with VMware, Parallels, QEMU, or other virtualization tools. Sure, virtualization requires the same host and guest architecture, but we all have plenty of x86 machines sitting around, and near-native speeds are necessary to actually boot Windows Vista before the sun goes supernova. So while this is neat software, it's not as suitable for malware researchers as what they are already using. The JPC project needs to find a different niche.
Re: (Score:2)
near-native? You'd better not only have a native system but a rather fast one to boot Vista in a timely manner. But its all worth it, because you can windows+tab and see a cool 3d cascade of windows. I don't even mind so much that they arbitrarily rearranged all the menus and control panel functions (without adding anything of use) for no apparent reason. All is good just so long as I can see window contents m
Re:How's the efficiency? (Score:4, Informative)
Re: (Score:2)
I'll try again - by the time you boot Vista under this emulation, the Sun will have become a red giant, Earth's seas will have boiled away, and its atmosphere will have escaped into space, or at least you'll feel that way... If you were play back a time-lapse of the boot process so that Vista appeared at normal speed, you would look like the villain in Indiana Jones and the Last Crusade after he drank from a false chalice.
Re: (Score:2, Interesting)
Incidently when I first heard about this today, I thought it would be the
Re: (Score:2)
Java x86 emulator speed (Score:5, Funny)
Java+DOS: Snail with ball and chain
Java+DOS on non x86: Snail nailed to the table
Java isn't really slow... (Score:2)
So it runs DOS eh? (Score:5, Funny)
Why did they use Java? It would have been faster in C++.
I for one welcome our new old x86 overlords.
Did I miss any?
Re:So it runs DOS eh? (Score:4, Funny)
Re: (Score:2)
In Soviet Russia, Java runs x86!
java me is not java se (Score:2)
But still cool though.
Re: (Score:2)
What do you do when it crashes? (Score:3, Insightful)
Re: (Score:2)
Re: (Score:2, Funny)
It isn't dead! For crying out loud, it's java! It's still processing the instruction... Come back in September for the result.
Re: (Score:2)
on a good Java runtime... (Score:2, Insightful)
Other projects doing the same/faster thing.. (Score:3, Informative)
http://binarytranslator.org/ [binarytranslator.org]
There are attempts to integrate this into the JNode open source Java OS to make a JNode/GNU stack.
There is also the VEELS/JXEmu system:
http://nil.ics.uci.edu/~gal/?page=VEELS [uci.edu]
which appears not to be publicly available.
My intepretation (Score:5, Funny)
For an encore, perhaps they can write a JVM in BASIC.
WARNING: Performance implosion imminent due to recursive interpretation.
Re: (Score:2)
Virtual Machine Advantages (Score:2)
I can also think of a lot of applications that are *not* appropriate for virtual machines because of CPU performance demands. The right tool for the job and all
Re: (Score:2)
Also, your point of "It's to illustrate that Java and JVMs were a step back technologically, just like
license (Score:2)
Re: (Score:2, Insightful)
Why not Simics? (Score:2, Informative)
Can someone explain the advantages of the Java based x86-emu in TFA over something like Simics?
I tried the demo, but it didn't work (Score:2)
The demo started up okay, booting and getting to an A: prompt. But it wouldn't accept keyboard focus so I couldn't enter any instructions to run any of the games.
I contacted the project to let them know. They responded that I probably need to upgrade to Java 1.6 to insure keyboard focus. It's also possible that one of my Firefox extensions might have interfered. They said they have tested JPC with Firefox and Linux but not with Kubuntu specifically.
I was s
Re: (Score:2)
Re: (Score:2)
It did that to me at first to (I'm running Firefox under Ubuntu), but after reloading the page a couple of times, and making sure that the applet was the first thing I clicked, it worked fine
A bigger problem for me is that I use a non-US keyboard which means that it I couldn't do anything because I couldn't change the locale so when I typed ":" it entered ">". Meaning I couldn't do anything since I couldn't change the drive to c :) Anyone got a fix for this?
Re: (Score:2)
Java is fine for emulation (Score:2)
Just give this project time. Everybody is queuing up to knock it down, but it should be fine. They're not planning to put Vista on it, just emulate some DOS data entry applications.
Re: (Score:2)
What is the point? (Score:2)
Viruses also need OS system calls to do the job. Unless there's also a full Windows emulation in Java (including the Windows bugs and vulnerabilities viruses depend on), how could this be used to analyze how viruses are working? And even if it was the case, what would be the point over QEmu?
If you need to understand what some piece of code is doing, there are tools called debuggers.
Re: (Score:2)
Re: (Score:2)
Having proven that it can be done and having proven that it can be done properly, they effectively prove you and other nay sayers wrong. They are claiming that it works and that it works with acceptable performance (for an emulator). A little out of the box thinking sometimes produces nice results. Why bother with C based emulators if you can do the job in the much more developer friendly Java? As I said, they're academics and probably have better th
Wait for the lawsuits... (Score:2)
You probably wouldn't see the likes of Intel suing x86 emulators running on x86 (e.g. virtual machines), but it might be a different story if people start using x86 emulators on other CPU architectures through a Java VM because that cuts into their business.
Re: (Score:2)
Re: (Score:2)
Slow (Score:2)
Also, for something that's is apparently non-FOSS, they seem to be using both the BOCHS BIOS and the VGA ROM BIOS.... Now the VGA code is AFAIK LGPLd, so they should be okay unless they modified it (a possibility) but I'm pretty sure they had to modify the stock Bochs BIOS, unless they emulated Bochs. In either case, the Bochs BIOS is GPLd.
Won't accept all keystrokes (Score:2)
The next step (Score:2)
(This is cynicism - I'm not being too serious.)
Quite interesting (Score:2)
I understand that until they are able to fully emulate certain hardware than this could be limited to just DOS programs. I think they at least out to be able to emulate a S3 Virge video card, Sound Blaster 16, Intel Chipset network card, and maybe serial ports with a Hayes compatible
Re: (Score:2)
Re: (Score:3, Insightful)
Re: (Score:3, Funny)
That's the huge advantage of java. Just port the 100 meg or so of JVM, throw in a faster processor and a few more gigs of memory, and it'll run on anything.
Re: (Score:2)
Flamebait?? (Score:3, Insightful)
Hey mod, I'm serious and I'm making a serious point.
Porting the JVM somewhere is about as much effort as porting a word processor, or any other 100 meg application. But if you port the JVM, all the applications you have in Java are ported by proxy. It's a one-time task.
So if your 100 meg word processor is in Java, once you port the JVM you get the word processor for free. And all of your other Java applications. You don't have to port them seperately. It's one porting task and then you're done.
An
Re: (Score:2)
Re: (Score:2, Informative)
Although I would smile if they installed W
Why Java ? (Score:2)
I don't. What does Java has to offer that some standard C emulator doesn't ?
Some of the current emulators provides special hooks so the emulated code can ask the emulator to perform some task for acceleration (like some emulators provide special graphic and network drivers for the emulated Windows).
But if you cut them, there are no differences between the emulator and a real machine from the virus' point of view.
If the emulator is well done enough there won
Re: (Score:2)
Can you compile C apps to run on your phone? I know I can't.
Re: (Score:2)
Re: (Score:3, Insightful)
If this webapp. survives a lot of geeks messing and hacking about in that virtual machine I'd be very tempted to label this as a very interesting experience when it comes to the Java robustness factor.
There's no danger to the virtual machine. The emulator and disc images are all run within the browser. So each browser receives its own emulated memory space and fresh disc images. No processing occurs on the server (except for serving the application code and disc images to the browser).
Compared to what? (Score:3, Insightful)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
actually, i think this emulator is far more suited to alleycat and sopwith2, maybe impact would be playable
Lemmings and Prince seem like odd choices, arent these cracked versions of commercial titles, i know no one cares thesedays but still.
Re: (Score:2)