ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm using F10 with the Java that came with it. And I'm stuck at something. I am devving an applet, served by a LAN server, the applet does a feedback tru the sys console
Quote:
System.out.println("some stuff");
It seems the IcedTea does'nt even have such a console where I can read the feedback, someone suggested getting rid of the IcedTea and installing the standard Sun JDK - what impact would that have on my machine?
I tried log4j, but it depresses me :-( , and I also tried Java's own logger, it makes a logfile, but the applet (ran from the browser) does'nt write to it - security, of course...
Tnx
Thor
(extra specs of my project available, just ask)
In fact, I was settled to the idea of having to read a file (using log4j?) or Java's own logger mech, but, as you aplty dotted out: applets cant do that.
Ok, I can see the security holes in windows if and when a System.out CAN actually be read on the console, but Linux just HAS to have some other mechanism...
As said, I'll have a close look at youe suggestions...thanks!
In fact, I was settled to the idea of having to read a file (using log4j?) or Java's own logger mech, but, as you aplty dotted out: applets cant do that.
Ok, I can see the security holes in windows if and when a System.out CAN actually be read on the console, but Linux just HAS to have some other mechanism...
As said, I'll have a close look at youe suggestions...thanks!
Thor
Well, if your applet can write to socket - it's trivial to set up socket listener (server) in Perl, but I do not know how simple is to set up socket writer in Java.
Hey, there is a thought! And I mean just that! The very idea, why not write a "thingie" in Perl, listening to the socket the applet sends to/tru/over?
Let me think "out loud" for a moment (it's 23:39 here, I just came out of the shower, just got back from work - so I'm not very lucid anymore ...)
I'd write a little "void" (a function that does'nt give a value back) in Java that accepts a string, that void would write to a socket (never even attempted this before) that has a listener - on the same machine - in the shape of a Perl script. So every time I get an error (try/catch construct for example) I'd send the error message to the void-to the socket- to the Perl script- to a console.
Can Perl do that (duh - my Perl knowledge is next-to-non-existend, so sorry about the question)???
Hey, there is a thought! And I mean just that! The very idea, why not write a "thingie" in Perl, listening to the socket the applet sends to/tru/over?
Let me think "out loud" for a moment (it's 23:39 here, I just came out of the shower, just got back from work - so I'm not very lucid anymore ...)
I'd write a little "void" (a function that does'nt give a value back) in Java that accepts a string, that void would write to a socket (never even attempted this before) that has a listener - on the same machine - in the shape of a Perl script. So every time I get an error (try/catch construct for example) I'd send the error message to the void-to the socket- to the Perl script- to a console.
Can Perl do that (duh - my Perl knowledge is next-to-non-existend, so sorry about the question)???
So, this really works...now I have to figure out how to let this work in a browser. I've tried it in the IDE (appletviewer) and there it works perfectly, in a browser, I get an "applet not initialized"...
Security? Dunnow-yet...
The tutorial helped. I'll send all the debug messages tru a socket, and read them in a nearby console...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.