Akanimo Udoh

Ranch Hand
+ Follow
since Jun 11, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Akanimo Udoh

Shankar
i would be able to give some kind of help if you could give me description of why you'd really want to pause for a while before allowing the thread to kick in? Are you sure this is the best way to achieve your end? The truth is that this approach might not really be the best approach to solve your 'actual' problem. For example was there any reason for not using the Thread.sleep(...) method instead?
Akanimo.
Hi,
I'm trying to locate the applets by Jaworski for practicing for the Architect certification. It used to be located at http://www.jaworski.com/java/certification/ but now the site seems to be missing the applets (I wonder why???). I used to have a 'cached' copy from my browser but I wiped my cache history recently and have lost it.
Does anyone know where I can still find these applets or have it cached locally as well? If I can't get these are there any other exam preparation applets that I could use instead?
Thanx in advance
Akanimo
Thanx for the info. I'm new to JRun and didnt know that I could use it directly as the web server. This suits my purposes very well.
Thanx again.
Akanimo.
18 years ago
Hi
I'm trying to locate a light jsp compliant web server that I can use while I'm not in the office to test my jsp/servlet apps. Does anyone have a link to where I can download one?
I'm using JRun as my j2ee server, though i'd be willing to switch to another if required. Have tried to install PWS (which i have) on my win 2000 but there seems to be a problem doing so.
Can anyone bail me out?
Akanimo
[This message has been edited by Akanimo Udoh (edited July 18, 2001).]
18 years ago
Marcus,
Your analysis is pretty much on the dot, and I have to agree with you completely. I'm a 'native' windows applications / systems developer and have been programming with VC++/VB for about 7 years now (even got my MCSD before getting the SCDJ). I looked at the trends in industry 2 years ago with the shift from core applications to web-based/web-centric systems and decided that I had to diversify career tracks before I fell into a rut.
When you look at the massive support for the Java platform on all fronts ( development tools, operating systems, applications support, enterprise systems integration, application server support, training and certification, etc ) you cannot but see where the whole industry is going (imagine there's even a joint certification effort called jCert!!! supported by several vendors ...). I've never seen such a level of collaboration in our industry before. How many MS technologies can work on other operating systems integrated with other products and supported by other companies??? (need I say more?)
Microsoft decided it was '..my way or the highway' when it decided to go it solo and stick to its guns. It would have been better for them to get 'a small (but significant) piece of a big pie' instead of the 'big piece of a small pie' its eventually going to end up with. The situation is very reminiscent of what IBM tried to do in the '80s and we all know how that ended.
Because of all these coupled with the lack of direction which MS is exhibiting by throwing all kinds of divergent visions at its windows developers (yours truly inclusive) e.g ActiveX, COM, COM+, Microsoft.Net, C#, even the controversial VB.Net have made me decide to start hedging my bets and give MS some time to make up their minds before making any future MS investments. My company has also deciding to move some of its code base to Java.
I must confess that though we're still doing over 70% stuff in VC++ we're more or less expecting this to change dramatically as time goes on and are very ready for it.
Just my 2 cents worth.
Akanimo.
18 years ago

TheStud,

Your problem is pretty direct. On your local machine your text file is probably located in the same location as you applet (or has default policy file set to AllPermissions) so you won't have any problem.

When you try it from another machine its another case altogether. We all know how Java prides itself on being a secure platform such that malicious code cannot take advantage of the system running the Java app. As such the applet is not given the permissions to run amok and go thru the files on your machine or your network.

To resolve this you have to explicitly set permissions giving permission to the VM under which the applet is running OR alternatively you can sign the applet, in which case the browser should allow the applet to access the file.

But I think the best solution would be to use ONLY the file name ('mydata.txt') without the extension when trying to open/access the file. That way if the file is in the same directory as the applet the applet will be able to open/access the file without any need for the above security details. I think this would preferred.

Let me know it this helps.

Akanimo.

P.S. - Better change your username to your own name (or alias) before the bartenders/sheriff get on your case
death pac,
Congratulations!!! I've been waiting to see this posting on this site for a while. I'm glad you're finally thru. Whats next for you? I'm strongly considering doing the Architect cert to beef up my knowledge of the server-side technologies. I've found that my knowledge is usually limited and lop-sided when I learn only 'on-the-job) as is the case with my server-side experience. Lemme know whatz next for you.
Congratulations again.
Akanimo
Emmanuel,

I tried to find out where you could get the info you wanted and could only come up with this site:
http://www.borland.com/techpubs/jbuilder/print4sku.html

Though its just a list of printed books that have what you want. Here's a quick intro on how to use JBuilder 4 (have you had any experience programming in any other IDE ... eg Visual Studio? Visual Basic? have you downloaded JBuilder 4 yet?)

1. Create a new project
(a) Click File > New Project... on the menu
(b) Enter a name for the project ... eg 'Test' , accept defaults for other fields.
(c) Select 'Finish'

2. Adding classes to the project (Here's where you begin to add the classes/code that actually make up the project)
(a) Click File > New Class... on the menu
(b) Enter the package for the new class eg. 'myPackage.myServer' [jbuilder will take care of creating the directory structure and placing the file appropriately]
(c) Enter the name on the new class eg. 'MyNewClass'
(d) Enter the name of the Class which this class inherits from. The default is java.lang.Object, though you can make it an Applet, Frame, JFrame, JApplet ... as you like, though it must be the FULL CLASSNAME.
(e)I usually select all the options.
(f) Click 'OK' to have the java class file create for you.
(g) Repeat this procedure to add other classes as you want.

3. By now you should be able to navigate the files thru the tree in the 'Project' pane and the methods in the 'Structure' listing too [Play around with the menu's under 'View' to modify how the IDE looks like]. Go ahead to add/modify code as you like.

4. To compile your code
(a)Click Project > Make Project 'Test' from the menu.

5. To run the code
The very first time you want to run the code you have to specify the Class that has the main method where the application should start. You specify this by:
(a) Click Project > Project properties...
(b) Select the 'Run' tab, on which you'll see two more tabs (Application and Applet)
(c) Select the 'Application' tab and click on the button with '...' to specify the class.
(d)Type the FULL class in the 'Class Name' textbox or select from the tree.
(e) There are also boxes for VM Parameters (eg. -Djava.rmi.policy) and also for 'Command Line parameters' eg 'db.db' that you might need for later) For now just leave them blank.
(f) Click OK.

6. Finally to run the application. You can do this in 'Debug mode' or in 'Run' mode. Debug mode allows you to set breakpoints and step thru code while monitoring the values, 'Run' doesn't.
(a) Under the 'Run' menu click 'Run Project' or 'Debug Project' for which ever you require.

These are the basic instructions for using the IDE. Once you get comfortable with this I'll show you how to use the more advanced features especially for debugging. I had to learn most of this stuff the hard way!

Hope this helps.

Akanimo.

P.S. There's also online help that comes with JBuilder that also includes Tutorials that you might also be interested in looking into.
Seems I learn something new from javaranch everyday!!!
My thanx too guys for the enlightenment!
Akanimo.
18 years ago
sumanta,
You should use the <PARAM> tags nested within the <APPLET> tags on your HTML page returned to pass the parameters (i'm assuming that you're using a JSP/Servlet to return HTML to the client with the APPLET embedded on the page??). To use the PARAM tags you just specify a parameter NAME and VALUE.
From your applet you can get access to the parameter values using the java.applet.Applet.getParameter(String) method to retrieve the string VALUE's by NAME.
Akanimo.
18 years ago
Bhaskar,
Its not possible to write code to do this in java natively (i am open to contrary opinion). The available avenue for you to do this is to do the following:
1. Write a DLL using platform specific compiler that carries out the opening of the file (use VB, VC++, etc) using a simple function name.
2. Create a java class within your application that defines the 'simple function name' defined above as a 'static native' method, and call java.lang.System.loadLibrary(String) ( probably from within a static initializer block) specifying the DLL filepath/name above to cause the DLL to be loaded into the java process space.
This in effect will link up you java application to call the system specific DLL to render the service you desire. This is the way most developers do it.
Akanimo.
[This message has been edited by Akanimo Udoh (edited July 12, 2001).]
18 years ago
Mario,
java.lang.System has a method 'setSecurityManager(SecurityManager)' that allows you to set the security manager from code. I think this should suit your needs.
Akanimo.
18 years ago
Narayan,
Here are a few checkpoints to pinpoint possible sources of error:
1.) Ensure that the java.rmi.server.codebase property is set in the command line for the SERVER (not needed in the CLIENT). On a windows machine it must take the following form:
-Djava.rmi.server.codebase=file:///c:/ahkhan/myapp/server.jar
(note the tripple '/' after file ) In the example above i used executable jar files if you're using the raw files in directories then you SHOULDN'T just put the directory in which the file is located. Rather specify the directory off which it can be found using the full class specifier (e.g. if suncertify.server.RemoteServer is in directory c:/scdj/src/suncertify/server then specify c:/scdj/src as the codebase)
2.) Generatae stubs and ensure that the stub classes are in the same directory as the UnicastRemoteObject class when you run the server.
3.) Make sure the class files above are within the CLASSPATH of the server and not in the class path of the client.( You can save yourself a lot of problems with CLASSPATH's if you stick to using executable jar files)
If the only error you're getting is what you've mentioned then these will correct that error. If you haven't properly defined the policy file then you'll probably get some new security exceptions.
Hope this will help.
Akanimo.
[This message has been edited by Akanimo Udoh (edited July 12, 2001).]
Emmanuel,
Here's a link to a site that gives free IDE's for Java. Its a borland product called JBuilder.
ftp://ftpd.inprise.com/download/jbuilder/jb4foundation/jb4fndwin.zip
you'll still have to go to the site and register to get a key to use the IDE but its free.
Hope this helps.
Akanimo.
I used a wrox title called "Beginning XML" and was up to speed in no time. It treats the XML basics very well and does a good job of demonstrating SAX with java.
Akanimo.