How to implement a java class
dear friends
i use forms6i server and oracle 9i server edition,under windows 2000 server
i try to implement a java class for a bean area. i do the following :
from the property palette i write the class name in implementaion class property . the class name is 'arc.class' and it is located in <oracle_home>/forms60/java
but the fellowing error appears
frm-13008 cannot find javabean with name 'arc.class'
would any one help please
Dear Grant Ronald
thank you very much for helping me . now i undersatand how to implement a class. but i have another question ,and i wish you ccould help me .
i try to import a java class, i do the following:
From the program menue i choose Import Java Class
but the following error appears
(pde-uji001 faild to create JVM)
by the way i use forms6i server and oracle 9i server under windows 2000 server
thanks in advance
tarek
Similar Messages
-
How to implement a java class in my form .
Hi All ,
I'm trying to create a Button or a Bean Area Item and Implement a class to it on the ( IMPLEMENTATION CLASS ) property such as ( oracle.forms.demos.RoundedButton ) class . but it doesn't work ... please tell me how to implement such a class to my button .
Thanx a lot for your help.
AIN
nullhi [email protected]
tell me my friend .. how can i extend
the standard Forms button in Java ? ... what is the tool for that ... can you explain more please .. or can you give me a full example ... i don't have any expereience on that .. i'm waiting for your reply .
Thanx a lot for your cooperation .
Ali
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by [email protected]:
Henrik, the Java importer lets you call Java classes on the app server side - I think what Ali is trying to do is integrate on the client side.
If you want to add your own button then if you extend the standard Forms button in Java and then use this class name in the implementation class property then the Java for your button will be used instead of the standard Forms button. And since it has extended the basic Forms button it has all the standard button functionality.
There is a white paper on OTN about this and we have created a new white paper which will be out in a couple of months (I think).
Regards
Grant Ronald<HR></BLOCKQUOTE>
null -
How to implement a java class in javafx?
public interface WarningEvent {
public void warningHandler ();
function test ():Void {
var warningEvent:WarningEvent = new WarningEvent() {
public void warnHandler(){
}I am trying to implement java method inside javafx, but without luck. I also tried override with javafx syntax, but still cannot get it. Any one could help on this?
Thanks.1) Get rid of the keyword new
2) Get rid of braces ()
3) For the function declaration, use the JavaFX syntax, not the Java syntax!
function test ():Void {
var warningEvent:WarningEvent = WarningEvent {
override public warnHandler():Void {
}Your class need to have a default constructor (the one without any argument) to be able to do this (and in this case it works because you have an interface instead). -
Than how can i get java class by using it's class file?
Hi
After compilation of a java program, it creates a class file.
After getting class file suppose class file has been deleted.
Than how can i get java class by using it's class file?
Thanks in advance.get a decompiler and run your class file through it--I'll assume you want the source code back and that you are not trying to recover a missing class file by attempting to use the class file that is missing--if it's missing, then I've not a clue on how to get it back by using what is already missing.
BTW: many of your compilers have source control--if it does, just restore your missing file. -
How to call a Java class from another java class ??
Hi ..... can somebody plz tell me
How to call a Java Class from another Java Class assuming both in the same Package??
I want to call the entire Java Class (not any specific method only........I want all the functionalities of that class)
Please provide me some slotuions!!
Waiting for some fast replies!!
Regards
Smita MohantyHi Smita,
you just need to create an object of that class,thats it. Then you will be able to execute each and every method.
e.g.
you have developed A.java and B.java, both are in same package.
in implementaion of B.java
class B
A obj = new A();
//to access A's methods
A.method();
// to access A's variable
//either
A.variable= value.
//or
A.setvariable() or A.getvariable() -
How to use a java class in difference project under a same workspace!
Hi, there:
I have a problem. I want to reuse a java class which is located in another project of the same workspace. I do not know how to set the two project setting or how to import the java class. I deeply appreciate.
Sheng-Heinclude it as a library
open project settings goto libraries and simply add your class -
Hi ,
I want to call a java class implemented as a service in felix . This should be called after succesfull activation of the page .
I want to use ExtJs implemented in /libs/cq/ui/widgets/source/widgets/wcm/SiteAdmin.Actions.js file CQ.wcm.SiteAdmin.activatePage method.
Please suggest something on this .Hi Sham ,
i tried this ,
var response = CQ.HTTP.post(
CQ.shared.HTTP.externalize("/bin/replicate.json"),
callback,
{ "_charset_":"utf-8", "path":paths, "cmd":"Activate" }
if (CQ.HTTP.isOk(response)) {
CQ.HTTP.post("/bin/sample.json",
null,
{"_charset_":"utf-8","path":paths});
It is giving an alert messege on siteadmin screen as "Unspecified Error" .
What can be the problem , am i missing something here? -
How to load a java class at server start-up
Hi,
I have one custome java class that is being referenced by all the applications deployed in OC4J container. How can I load that class automatically and be evailable in the path at server start-up time. Is there an option available to give the class name that also gets loaded automatically.
ThanksTo me, you have two mixed issues.
1. OC4J supports a startup/shutdown model where a named class will be invoked when the container is started (or stopped).
This is described in the doc here:
http://download-west.oracle.com/docs/cd/B32110_01/web.1013/b28952/startclas.htm#CIHECEIB
Note that this specifically calls the methods that are implemented from the respective OC4JShutdown and OC4JStartup interfaces -- the class that is instantiated and called here is not available to all other applications by default. This is more to suit the need where something needs to be done when the container is started/stopped.
2 The next option is where you just want to make a class available to all applications deployed to the container. For this we provide the shared-library mechanism. Using this you can either make use of the implicit global.libraries shared-lib in which you simply drop JAR files into the j2ee/home/applib directory whereupon the classes will become available by default to all applications. Or you can choose to install a shared-library that contains your specific classes (in a JAR file) and then import that into the default application whereupon the configuration will be inherited by all deployed applications.
cheers
-steve- -
How to implement custom Model Class in Oracle ADF?
I am using Oracle ADF for one of my project and i am using Query component of ADF. For given tables the query component creates view objects and maps the relations. ADF uses its own custom model class for this component and it should understand the DB tables. But for my project i have no access to database. All i can do is pass a string or object/query to the existing (custom) Java class/object, and this model class formulates query and queries the database and returns the value to my Java class. I have to display these results using ADF to the front end. Is There a way to achieve this? Can i replace/override the existing Model class of ADF. If so how?
Thanks in advance for your help.Hi, there:
Best thing to do is to start with the default login.html page, and then modify it. The login screen is fairly complex and it's easy to just miss a JS function you need to call. To get to default page, you would need to do one deploy (to simulator or whatever), and then look for login.html page in the temporary Xcode or Android project generated from the deployment. It should be under the "deploy" directory in your JDev workspace.
You can also see all the framework JS files and CSS files that way as well.
We have had customers implementing custom login screen so we know it can work, but they all had to start with the default login screen and then modify it.
Thanks,
Joe Huang -
Hi
I want to know how can i import some java classes to my application.
I'm trying to write a little class as:
package paco.view;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.convert.ConverterException;
import oracle.jbo.domain.ClobDomain;
public class ClobConverter implements Converter {
public ClobConverter() {
public Object getAsObject(FacesContext context,
UIComponent component,
String value) {
if (context == null || component == null) {
throw new NullPointerException("FacesContext and UIComponent can not be null");
if (value == null) {
return null;
try {
return new ClobDomain(value);
} catch (Exception ex) {
final String message =
String.format("Unable to convert boolean value \"%s\" into a oracle.jbo.domain.Number",
value);
throw new ConverterException(message, ex);
public String getAsString(FacesContext context,
UIComponent component,
Object value) {
if (context == null || component == null) {
throw new NullPointerException("FacesContext and UIComponent can not be null");
return value.toString();
but I'got this message:
Error(3,8): class javax.faces.component.UIComponent not found
Error(4,8): class javax.faces.context.FacesContext not found
Error(5,8): class javax.faces.convert.Converter not found
Error(6,8): class javax.faces.convert.ConverterException not found
What should I do?
Thanks in advance
FRANCISCOYou need to add the faces library to you project. To do this, select the project properties, go to libraries and class path and select the faces library.
Using JDev you can also choose one or more project technologies (project properties->technology scope) which will add the needed libraries to the project.
Timo -
How to read the java class file to convert it in java.
hello all,
i m developing the java application which generated the java code from the java 'class file' .
Can anybody please help me, Is any java support for reading the class file? or how to know the class file format?
I know the application javad, jad, javap which is doing the same thing.
thanks for reply,
- Jayddo you mean decompiling? there are tons of java decompilers available out there, what exactly are you trying to do here?
-
How to load a java class when application is at first time browsed.
Hi
How can i load a simple java class on application startup.
For servlet it could be done using "load on startup" tag in web.xml
but how could the same be achieved for a simple java class.
ThanksHi
Code is given below....
package com;
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class Test {
Test()
HttpServletRequest request=null;
HttpServletResponse response=null;
RequestDispatcher requestDispatcher = request.getRequestDispatcher("a.jsp");
try {
requestDispatcher.forward(request,response);
} catch (ServletException e) {
System.out.println("success");
e.printStackTrace();
} catch (IOException e) {
System.out.println("success 1");
e.printStackTrace();
finally
System.out.println("success 2");
System.out.println("success 3");
}Web.xml :
<servlet>
<servlet-name>simple</servlet-name>
<servlet-class>com.Test</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>simple</servlet-name>
<url-pattern>/init.do</url-pattern>
</servlet-mapping>Error Trace :
org.apache.catalina.core.StandardContext loadOnStartup
SEVERE: Servlet /DispatcherTest threw load() exception
java.lang.IllegalAccessException: Class org.apache.catalina.core.StandardWrapper can not access a member of class com.Test with modifiers ""
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
at java.lang.Class.newInstance0(Class.java:344)
at java.lang.Class.newInstance(Class.java:303)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)
at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1069)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1162)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1304)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1568)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1577)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1557)
at java.lang.Thread.run(Thread.java:595) -
How to import a java class in a JSP
Hi All,
I have a java class file called myTest.class (i made after compilation of myTest.java). I have a JSP page that uses this java class file.
These 2 files are in same folder called c:/test
and iam importing this java class file into my jsp file and that too at the start of this jsp file:
<%@page import="myTest" %>
BUt iam getting an error ..............when iam running this JSP page:
/opt/bea81sp2/user_projects/domains/wliDomain/./Managed2/.wlnotdelete/extract/Managed2_myTest_myTest/jsp_servlet/__test.java:20: '.' expected
probably occurred due to an error in /test.jsp line 5:
<%@page import="myTest" %>
Please advise how to solve this problem
-sangitaDon't bother with the import
when iam not importing this class file into my JSP, then on my JSP, the class file is not found.
Here is my code: and these 2 class file are in c:/test
import org.apache.tools.ant.taskdefs.Ant;
import org.apache.tools.ant.taskdefs.Property;
import org.apache.tools.ant.types.*;
import org.apache.tools.ant.*;
import org.apache.tools.ant.taskdefs.ExecTask;
import org.apache.tools.ant.types.Commandline;
import java.io.File;
* Creates an Ant project to run an Ant build
* @author myself
* @version 1.0
public class RunTest extends Ant {
String applicationName;
String buttonClicked;
String boxName;
String targetName;
public void applicationName(String applicationName){
this.applicationName = applicationName;
public void boxName(String boxName){
this.boxName = boxName;
public void buttonClicked(String buttonClicked){
this.buttonClicked = buttonClicked;
public RunTest() {
public void goTest() {
if(this.buttonClicked.equalsIgnoreCase("deploy") && this.applicationName.equalsIgnoreCase("scsmail") && this.boxName.equalsIgnoreCase("testnet")){
this.targetName = "deploy-scsmail-testnet";
if(this.buttonClicked.equalsIgnoreCase("undeploy") && this.applicationName.equalsIgnoreCase("scsmail") && this.boxName.equalsIgnoreCase("testnet")){
this.targetName = "undeploy-scsmail-testnet";
Project project = new Project();
project.init();
System.out.println("printing 1 ....");
ExecTask exec = new ExecTask();
exec.setProject(project);
exec.setExecutable("/opt/bea/weblogic81/server/bin/ant.bat");
exec.setDir(new java.io.File("/export/home/beamon/bin"));
Commandline.Argument arg = exec.createArg();
// arg.setLine("-f scsmail.xml test -listener org.apache.tools.ant.XmlLogger -logfile D:/antProject/src/log.xml");
arg.setLine("-f build.xml "+ targetName + " -listener org.apache.tools.ant.XmlLogger -logfile /export/home/beamon/bin/log.xml");
System.out.println("printing 2....");
//exec.setOutput(new File("D:/antProject/logs/prob.txt"));
exec.execute();
System.out.println("printing 3....");
-----------------------the JSP page is called as test.jsp
<%@page contentType="text/html" %>
<%@page import="java.io.*" %>
<%@page import="java.util.*" %>
<%@page import="java.net.*" %>
<%@page import="RunTest" %>
<HTML>
<TITLE>TESTING ANT GUI</TITLE>
<HEAD>
<META HTTP-EQUIV="Refresh" CONTENT="3000" >
<meta http-equiv="Cache-Control" content="no-cache">
</HEAD>
<BODY BGCOLOR="silver" TEXT="333333">
<table border=0>
<tr align="left"><td align="left"><FONT SIZE="-1"><B> Test Page <FONT SIZE="-1"><B></td></tr>
</table>
<hr></center>
<form action="./test.jsp" method="POST" name="testForm">
<table>
<tr>
<td>
<select name="appName" size=1>
<option value="">Select Application Name
<option value="scsmail">scsMail
<option value="clientmanager">ClientManager
</select>
</td>
<td>
<select name="boxName" size=1>
<option value="">Select Box Name
<option value="testnet">TestNet
<option value="production">Production
</select>
</td>
</table>
<table>
<input type="submit" name="deploy" value="deploy">
<input type="submit" name="undeploy" value="undeploy">
</table>
<%
RunTest rt = new RunTest();
rt.applicationName(request.getParameter("appName"));
String deployButton = "";
deployButton=request.getParameter("deploy");
String undeployButton = "";
undeployButton=request.getParameter("undeploy");
if(!deployButton.equalsIgnoreCase("")){
rt.buttonClicked(request.getParameter("deployButton"));
if(!undeployButton.equalsIgnoreCase("")){
rt.buttonClicked(request.getParameter("undeployButton"));
rt.boxName(request.getParameter("boxName"));
rt.goTest();
%>
</form>
</table>
</BODY>
</HTML> -
How to call a java class in a bat file
Hi
I need to call a Test.java class in a bat files .It refer .DOM.jar
in C:/url; How do i call the java class i need the syntax
Thanks lotassuming lanch.bat, Test.class and DOM.jar are in c:\url
assuming %JAVA_HOME% is defined (else substitue it with your java installation directory)
here is the content of launch.bat:
cd C:/url (or cd c:\url ) (or cd c: followed by cd url)
%JAVA_HOME%\bin java -classpath .;DOM.jar Test
hop that'd help,
marvinrouge -
How to make a java class act as an cache
Imagine
i have a simple java class which establishes a connection to a DB and has a getter method which returns this DBConnection
Now i want this class to be loaded forever in jvm, i mean, once it starts and establishes connection it remains loaded , and then returns the dbconnection who ever calls its geter method.
So i am wondering what kind of java class do i write that behaves like an cache.
and how would the other classes call this getter method of my class, i mean they cant instantiate it i guess , coz then it creates a new object , i mean i m confused , hope someone provides a soultion
tahnks1) A class should do relatively litte. It's object-oriented programming. If you feel the urge like making it all static, maybe you can use a singleton, which is accessible using a static method.
2) Nothing what you described matches the term "cache"
3) And what you actually want it a connection pool. There should be several examples on the web.
Maybe you are looking for
-
I need help recovering hard-drive space...
I was doing a 35-pass-erase on my Macbook Pro for a "clean" install of Snow Leopard. Everything was fine and dandy until I noticed that I only had 216 GB after the installation. My Macbook Pro is a 250 GB model. I know the OS and iLife applications t
-
Post upgrade issues from Timezone setting
Everyone, We just upgraded from 4.5 -> version 6.0 SP1 (so we first upgraded the data to 4.5 WS then to version 6) After the upgrade, we saw the web service registration to have the send timezone setting to portlet as checked for all the portlets tha
-
Do iMacs come with any desktop publishing tools?
My 2006 iMac came with tools and I installed Print Shop. My new mac won't install Print Shop (says not enough hard drive space, computer has nothing on it!) I just want to make some cool flyers for my daughter's scavenger hunt. Any suggestions?
-
Is there a way to sort the contacts list by last name?
-
I need the tool bar that has the little house(home page) so I can go to web sites and return to foxfire. I tried to restore my computer to an earlier date which failed. The down load didn't take , I think my system is getting to old!I use fire fox a