Importing user defined package in JDEV
Hi,
new to the JDEV9i tool. i have a project arranged in packages and am tryin to import this to the jdev9i. i successfully created the workspace and project and added all the packages. I can also view the package tree and package list but when i run my project the files in one directory import the files from the package structure.
do i have to change Project properties?
C:\jdev9i\jdev\mywork\Workspace1\Project1\websphinx\workbench\WebGraph.java
Error(26,14): cannot access class graph.Graph; file graph\Graph.class not found
It sounds like the Class path is not set up properly. You can configure this manually from the Project Settings dialog (Project > Project Settings). Alternatively, if you import all the packages from the top level, the path should be set for you automatically. For example, if you have your work in a directory structure like this:
d:\mywork
d:\mywork\toppackage
Class1.java
d:\mywork\toppackage\subpackage1
Class2.java
Class3.java
d:\mywork\toppackage\subpackage2
Class4.java
Class5.java
You can create a new project from existing source by creating a Workspace, then selecting File > New. In the Projects category there is an item called Project from Existing Source. Launch this wizard, and select the top level package from the directory listing (d:\mywork\toppackage in the example above). You then get the option to recurse through subdirectories, picking up all the classes along the way, and the paths will be set automatically. Note that you can use the Categories View button in the Navigator to view the files by package name.
I hope this helps!
-- Brian (JDev Team)
Hi,
new to the JDEV9i tool. i have a project arranged in packages and am tryin to import this to the jdev9i. i successfully created the workspace and project and added all the packages. I can also view the package tree and package list but when i run my project the files in one directory import the files from the package structure.
do i have to change Project properties?
C:\jdev9i\jdev\mywork\Workspace1\Project1\websphinx\workbench\WebGraph.java
Error(26,14): cannot access class graph.Graph; file graph\Graph.class not found
Similar Messages
-
Importing User defined package problem.
Hi All,
I have made to package, "forum" and "utility". DBhandler java file is in "utility" package and Forumhandler is in "forum" package.
I want to import DBhandler classes from "utility" package into "forum" package for this i write
"import utility.*" in forum package's Forumhandler java file. But it is giving error.
The error is -
forum/ForumHandler.java:13: cannot resolve symbol
symbol : class DBHandler
location: class forum.ForumHandler
DBHandler dbhand = new DBHandler();forum/ForumHandler.java:13: cannot resolve symbol
symbol : class DBHandler
location: class forum.ForumHandler
DBHandler dbhand = new DBHandler();
Do you have your visibility right?
The class DBHandler should be declared public.
P.s. it's a bad practice to use wildcards for imports if you just want to import a few classes, use
import my.company.product.utility.DBHandler;instead (or something similar). -
How to use user-defined packages in JAX-RPC web service
I am trying to use Object of my class located in my package in jax-rpc webservice,the code is
package supercomputer;
import Hello.*;
public class SuperImpl implements SuperIF
public String sendParam(String data)
Temp ob=new Temp();
int i=ob.get1(10000);
return data+"returned by supercomputer";
Temp is located in Hello package,I have jar the Hello package as Hello.jar and has set its classpath in targets.xml of Ant tool.
The code compiles well and service is deployed successfully,but when i try to call the service from the client its gives me following error.
[echo] Running the supercomputer.SuperClient program....
[java] java.rmi.ServerException: Missing port information
[java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:357)
[java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:228)
[java] at supercomputer.SuperIF_Stub.sendParam(SuperIF_Stub.java:60)
[java] at supercomputer.SuperClient.main(Unknown Source)
I dont know if it deploys why it gives error on client side.
Please tell how to use user-defined packages and class in jax-rpc service code ,i am not talking about passing user-defined parameters i am just talking about making objects of user defined classes in jax-rpc service.I think there is some problem in classpath.
Please guide me in doing that.
Thanks,
FarrukhFarrukh,
I don't know if your error is about a missing class from your custom package, ... what track did you followed to say that?
To use your package in the implementation of you web service, you should only follow the rules of making a web application: put your package jar in your \lib directory inside WEB-INF/ or your package classes unjared in classes (also in WEB-INF/).
As I already said, I have doubts that your error should be originated from a missing class from your package, but:
-try to see the logs (errors?) when you deploy your web service that could give a hint about the problem.
-try to see if you can access your endpoint through your browser to see if there is a online status
-display your config/WSDL file, and the steps you did to build your web service.
regards,
Pedro Salazar. -
How to import user defined class in UIX page?
Does anyone know how to import user defined class in UIX page so that the class can be called in the javascript in the UIX ?
Thks & Rgds,
Bennywhat you are referring to is not javascript.
it is JSP scriptlets. These are very different.
In order to keep a strict separation between View and Controller, it is not possible to run arbitrary java code from within your UIX code.
However, you can run java code from within a UIX event handler; see:
http://otn.oracle.com/jdeveloper/help/topic?inOHW=true&linkHelp=false&file=jar%3Afile%3A/u01/app/oracle/product/IAS904/j2ee/OC4J_ohw/applications/jdeveloper904/jdeveloper/helpsets/jdeveloper/uixhelp.jar!/uixdevguide/introducingbaja.html
event handler code is run before the page is rendered. -
How to make an applet load user-defined package?
How to have an applet load user-defined package?
I have packages in their own directories, and the applet compiles and links with them, by use of CLASSPATH env variable. But when it comes time to run, it ignores that and does not know where the classes (in the packages) are.
If I don't use packages and put all code in one directory, runs fine. If I use an application, I can link with and load my packages.
I know applets can't use things like CLASSPATH for security reasons, but still, they should be able to be compiled out of several packages, why do I have to put all code together??OK, for reference for future newbies, here's the answer:
use CODEBASE attribute in your html file (if on Windows server, don't use drive letter but relative path to .html file, Unix style, and put all your .class files beneath that, for example, in your .html file
<applet
CODEBASE="..\class
and then have package bar Bar.class file, in ..\class\bar -
IMPORT USER DEFINED FIELD USING DTW
Hi
I want to IMPORT USER DEFINED FIELD OF SALE ORDER THAT ARE PRESENT IN ROW LEVEL AND DOCUMENT LEVEL
USING DTW.
SO PLZ GIVE ME SOLUTION FOR THAT.
THANK YOUHi,
What is your B1 version and PL? Please do not use all CAPS. It is not polite.
Thanks,
Gordon -
Creating User Defined Package Groups
Hi everyone!
I'm currently exploring/experimenting with strategies to stabilize parts of the Arch system on machines which I plan do update less frequently (I am aware of the risks and the potential difficulties associated with infrequent updates; that's why this is an experiment). It seems to me that Package Groups would be an asset which could be leveraged for a few different strategies. However, I cannot find any documentation on creating user defined package groups. Is there a way to do this? Any documentation anyone could point me to would be awesome. Thanks!You can compile the package yourself or change just the metadata. I think xyne had a tool for that, if only I could remember the name ...
Edit: It's repkg https://bbs.archlinux.org/viewtopic.php?id=158970
Edit 2: What do you need package groups for anyway? You should update the whole system rather than individual packages / groups of packages.
Last edited by karol (2014-01-30 20:25:04) -
Java User-defined packages problem!
Hi everyone,
I am new to java programming.I am trying to do a small program to see how the user-defined pckages work.I wrote 2 small programs one is Balance.java and TestBalance.java.
The code for Balance.java is as follows..
package MyPack;
public class Balance{
String name;
double bal;
public Balance(String n, double b){
name = n;
bal = b;
public void show(){
if(bal < 0)
System.out.print("--->");
System.out.println(name + ": $" + bal);
}The code for TestBalance.java is as follows..
import MyPack.*;
class TestBalance{
public static void main(String args[]){
Balance test = new Balance("Leela",99.88);
test.show();
}These r both in the same directory....I am able to compile Balance.java...but when I try to compile TestBalance.java I am getting the following errors
TestBalance.java:1: package MyPack does not exist
import MyPack.Balance;
^
TestBalance.java:5: cannot resolve symbol
symbol : class Balance
location: class TestBalance
Balance test = new Balance("Leela",99.88);
^
TestBalance.java:5: cannot resolve symbol
symbol : class Balance
location: class TestBalance
Balance test = new Balance("Leela",99.88);
^
3 errorsI am using j2se1.4 version ....my path is set to bin folder..
Could someone plz tell me what is the mistake...it would be very helpful for me if someone could plz tell me what the problem is...
Thanx in advance.99% going to work
i have noticed some of the few thing
trying to help
u told that ur both the classes r in same directory right
ok
now ur first class has this as first line
package mypack;//till here its ok only "mypack" should be small case
now put this same line also in the other class as firat line
and remove that import statement since both r in same package so no
need to import it ok
here's the code
package mypack;class TestBalance{ public static void main(String args[]){ Balance test = new Balance("Leela",99.88); test.show(); } }
now compile it this way
create a folder call mypack and put this both the classes in that folder
say its c:\mypack\ur classes
now in dos prompt
type this
set classpath=%classpath%;C:\mypack \
now u compile ur first class and then second
Surely this going to work if not tell me the errors u r getting -
How to import User-Defined Libraries to ODI?
Hi All,
I am trying to execute Java programs using ODI. There are many User-Defined classes imported in the programs.
I have these User-Defined classes in JAR form.
My ODI is setup on a linux system.
So, where should these JAR files be uploaded in the system so that it can be imported in the Java programs?
Please help me in resolving this issue.
ThanksHi Sutirtha,
My ODI is installed on a linux system and I am using it on my desktop through a remote desktop connection.
I connect to it using Tarantella account. Here I have to create a session and a view to use the ODI.
So, when I am looking in the linux system for the <ODI_HOME>/oracledi/drivers folder, I am finding a lot of them.
So, Please help me in locating the exact one where I need to put the JAR files.
Thanks -
Prime Infrastructure 2.0 Importing user-defined group rules
Dears,
I'm looking for a way to import rules to put devices in a user defined group.
I can see how I can create groups and rules manually, but not how I could export or import those rules.
Is this possible, or on the roadmap?
Cheers,
MichelIn the Cisco Prime Infrastructure 2.0 Deployment Guide under LMS 4.2 Data Migration there is a way to import settings from a "special" backup made from LMS.
This should allow for importing userdefined groups.
Does anyone have tried this yet?
Cheers,
Michel -
*URGENT* importing third party package into Jdev project
hi,
our company has bought a thrid party package instead of developing one to speed up the project pace. Some how we cannot import the package into our project environment,
this is what we do with the package.
set the class path to where the *.jar files are, for example: C:\AccBank\beta\creditcheck.jar
please note that the "C:\AccBank\beta\" is where the project file locates.
and follow is the import statement
import thirdparty.package1.*;
please tell us what did we do wrong, if the case in question is not clear, please tell us the steps we need to do to import and use a third party package with JDev.
Also, please tell me the different purpose between the directory :
PROJECTFILES and CLASSFILES under the main project directory
Thank you very much for your time and your help
Augustina
nullHello,
I'm not sure about what you mean,
but in order to use a given package within JDevelopper, you should:
- select project/project properties,
- find the libraries tab
- click "add", then "new"
- click "class path"
- click "add ZIP/JAR" and add the various jar files you want to include
Note: if the included libraries contain subpackages of packages like javax, and you want to deploy your project (as EJB for instance) you will have to edit the deployment profiles in order to add the 3rd party libraries, otherwise, these subpackages won't be deployed (by default, packages suvh as java.lang, javax etc.. are not excluded from the deployment).
about the PROJECTFILES and CLASSFILES items, they refer to the directories in which your project's source code (PROJECTFILES) and compiled classes (CLASSFILES) are stored
Hope this helps, Remi
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Augustina:
hi,
our company has bought a thrid party package instead of developing one to speed up the project pace. Some how we cannot import the package into our project environment,
this is what we do with the package.
set the class path to where the *.jar files are, for example: C:\AccBank\beta\creditcheck.jar
please note that the "C:\AccBank\beta\" is where the project file locates.
and follow is the import statement
import thirdparty.package1.*;
please tell us what did we do wrong, if the case in question is not clear, please tell us the steps we need to do to import and use a third party package with JDev.
Also, please tell me the different purpose between the directory :
PROJECTFILES and CLASSFILES under the main project directory
Thank you very much for your time and your help
Augustina <HR></BLOCKQUOTE>
null -
Importing user defined triggers
Hi,
I need to import multiple user-defined triggers from one DB schema to another DB. Is this possible in 11G? Can someone help me out.
Thanks,
SunitaIf you need to only export and import the triggers, then you have to generate the script for all the triggers(manually or using the DBMS_METADATA.GET_DDL.
dbms_metadata.get_ddl(object_type => 'TRIGGER', name => 'TEST_TRIGGER');
to get the script of all the triggers associated with a table
SELECT dbms_metadata.get_ddl(object_type => 'TRIGGER', name => trigger_name) FROM user_triggers WHERE table_name = 'EMP';
may be this can help you. -
Importing entire user defined packages......
When I try to import all the classes from a package using the * symbol
(as in: import shapes.*;)
I get the following error:
bad class file.
class file contains wrong class: shapes.RightTriangle
Please remove or make sure it appears in the correct subdirectory of the classpath.
However if I import the classes individually,
import shapes.RightTriangle;
import shapes.Circle;
import shapes.MyRectangle;
etc......
It works fine. I haven't a clue why this is happening, can anybody help me?The shapes package contains five .class files(no .java files):
Circle.class
RightTriangle.class
MyRectangle.class
Figure.class (abstract class for above base classes)
DrawFigure.class (interace used for drawing the different)
It is in the same directory as my main program .java and .class files.
I currently import all these .class files individually as in
import shapes.Figure;
import shapes.DrawFigure;
import shapes.Circle;
import shapes.RightTriangle;
import shapes.MyRectangle;
The next few lines of code are:
public class TestFigure1 extends Applet
MyRectangle rect1;
RightTriangle tri1;
Circle circ1;
public static void main(String argv[])
This compiles and runs without any problems.
However, I know it should be possible to import the entire shapes package in one go, so I replace the individual import statements with:
import shapes.*;
Now the compiler returns the error message I described above.
Any ideas?
P.S. How would I type the fully qualified path for the shapes directory?
It is located at C:\myjava\Figures\shapes
For example:
import myjava.Figures.shapes.Circle;
Is this statement correctly written?
When I try -
Import user defined class in JSP page
In my test.jsp page, I tried to display the user name using the value returned from a class UserInfo's static function getUsername(), like this:
<%@page import="toystore.view.UserInfo" %>
<html:text property="username" value="<%= UserInfo.getUsername()%>"
Is this allowed? I tried to run it but failed, it complained:
OracleJSP: oracle.jsp.provider.JspCompileException:
Errors compiling:D:\java\bc4jtoystore\ToyStoreController\classes\.jsps\_web_2d_inf\_jsp\_signin.java
Line # Error
0 cannot access class toystore.view.UserInfo; file toystore\view\UserInfo.class not found
64 variable UserInfo not found in class web2d_inf._jsp._signin
If it is allowed, what is the correct way to do it?
Thanks.
P.S. UserInfo is compiled in toystore.view package.check your classpath. it looke like the compilers complaining that it can't locate your toy store package location not that there is a problem with your jsp. Hope this helps
-
How to use classes from different user defined Packages
well i made 2 packages... one containing employee class and realted matter and other contaning bankaccounts and bank related work... now how can i use them in an another.. i know about the import statement but still couldn't make it work.... now suppose iam makin a obejct of employee class and passing in name and salary and all in the constructor... now i want that when i create the bankaccount class then the name of the employee should be passed to the bankaccount class so that it can assigen a account no. .. now how do i do this as when i create a object of employee class its made at runtime.. and if i create a object of bankaccount.. how wil it take that name as before goin to bank account i should already have a list of emplyees and then this list should be worked upon by the backaccount class to assign the accountno.s
Hope my question was clear... would appriciate a explanation and guidance!!!Thank you so much ... i was able to solve the problem... i passed the object in the constructor of the accounts class and it all worked out the way i wanned... thank you so much... it wasn't that difficult but the idea was just not clicking...this place is wonderful... everyone rocks!!! and so greatful about all the help.. please keep up the good work and even i will try to contribute as much as possible!!
Maybe you are looking for
-
WRP1 excluding open POs based on doc type
Hi friends, We are using SAP IS Retail ECC 6.0 In our business, we are having requirement that Open PO quantity of particular document type (eg ZNBA) should be excluded from the WRP1 requirement calculation. Eg: For an article 100001, Site A001, foll
-
I just downloaded the update for CS6 Extended and Bridge will not open. How to fix?
I still have CS5 Extended on my Mac for the time being, and Bridge won't open with either program. Not sure what to do to fix. Anyone have a similar issue and a fix? Thanks.
-
I just upgraded to IOS6 and I have some difficulties that I never had on IOS5: How can a see the full screen when watching youtube. Address bar is always in view. Maps are foggy and some images overlap to eachother. If these problems can not be solve
-
Can anyone tell me if the Arcana startup sound pane works on the new Alum intel-Imac? I have it installed on my G4 and it works great and I would like to put it on my new iMac. I just don't want to create any problems!
-
Macbook pro wont load, just gets to a white screen with apple logo
Hello, I put my Mac to sleep last night. I am trying to turn it on now but it won't load. The bar comes up at the bottom, fills about 20%, dissapears and then the spinny globe stays there forever, it will not load. I have tried booting up by holding