Built in java files
Hello everyone,
I just installed jdk1.5 on my linux server. However, in the /lib/ directory there are only about 6 .jar files.
Do i have to unjar these files so i can view the class files, such as the io and things like this?
Gary.
Hello everyone,
I just installed jdk1.5 on my linux server. However,
in the /lib/ directory there are only about 6 .jar
files.
Do i have to unjar these files so i can view the
class files, such as the io and things like this?
Gary.You can see what files are in the .jar file by opening with WinZip or equivalent.
Openning the individual .class files would not do much good as they are byte code and not easily human-readable.
The .jar files do not need to be unzipped for Java to use them (part of the beauty of .jar files).
Is this what you were looking for?
Similar Messages
-
How can i built a java application using java debug class on Log4J
Hi,
As java API support the MethodEntryEvent, using which I can get the automatic logging statements when the method is entered or exited as HelloExample.main(with argument type).
Where HelloExample is the class name.
Main is the method entered with its argument types.
In some cases I have the o/p as
-- VM Started --
====== main ======
main -- HelloExample
callerMethod -- HelloExample
====== main end ======
-- The application exited --
By using Log4J is there any possibility of getting these sort of o/p along with the loggers supported by Log4J. i mean to say can i built an java application which supports the MethodEntryEvent and MethodExitEvent from java API and also uses the Log4J debugging. I took an e.g. trace example, which (in J2SE 1.4.x or 5.x) will be found in $JAVA_HOME/demo/jpda/examples.jar and unpacking it by
jar -xvf $JAVA_HOME/demo/jpda/examples.jar i found the com/sun/tools/example/trace/Trace.java and passed the class constructed with logger taken from Log4J. In this case the logging message is displayed on the console. As per the requirement i need to transfer the whole o/p to an output file along with Log4J logger statements. in this case i should not give any command in the cosule except compiling and executing the programme. the programm also should able to run without the main() as i need to integrate Log4J with an application and the code must me application server independent. i need the output as i got using MethodEnteryEvent (shown as above) in case of java application built using Log4J.
Can any one help me in this regard. can any one give me some suggestion or any programme of this sort. All suggestions are welcomed.
Thanks & Regards,hi,
can someone help me how to implement logging for method entry parameters and
method exit return value.
can someone help me how to use log4j and integrate it to the method entry
logging and method exit logging.
Here what i need is without writing the log statements for the method entry and
method exit i need to log it to the file
along with other log4j debug statements i provide in the file.I should be able
to configure whether to enable/disable the logging
for method entry and method exit. In method entry i should be able to log the
parameters the method take and in method exit
i should be able to log te return value to the log file, before the method is
returned to the callee.
i hope i am clear
Thanks in advance. -
Autotype won't generate java files from wsdl
Hi!
I'm having troube generating the java classes for a non built-in datatype from
wsdl. The autotype ant task will only generate a types.xml file, but it does not
generate the corresponding java files for the non-built in datatypes, nor does
it generate any serializer/deserializer classes.
Thanks in advance for any help on this!
The WSDL defines the following datatype:
<xsd:complexType name="w2Edisoprec">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="w2EdisoprecArrayItem[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="w2EdisoprecArrayItem">
<xsd:sequence>
<xsd:element name="sAs_soptunnus" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="sAs_soptun_alk" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="lAs_soptun_lop" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:anyAttribute processContents="lax"/>
</xsd:complexType>
<xsd:element name="w2Edisoprec" type="w2EdisoprecArrayItem" />
I'm using the following build.xml file:
<project name="buildWebservice" default="generate-types">
<target name="generate-types">
<autotype
wsdl="http://localhost/Lak_hEdisopLK.wsdl"
packageName="ssi3Client.types"
destDir="c:/tuxedo2sap/l158/ssi3/wsdl/types"
/>
</target>
</project>
The types.xml file generated by autotype is:
<wsdd:type-mapping xmlns:wsdd="http://www.bea.com/servers/wls70"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<wsdd:type-mapping-entry xmlns:lcl0="http://www.webMethods.com/noNamespace/"
class-name="javax.xml.soap.SOAPElement"
type="lcl0:w2Edisoprec"
serializer="weblogic.webservice.core.encoding.stream.SOAPElementCodec"
deserializer="weblogic.webservice.core.encoding.stream.SOAPElementCodec">
</wsdd:type-mapping-entry>
<wsdd:type-mapping-entry xmlns:lcl0="http://www.webMethods.com/noNamespace/"
class-name="javax.xml.soap.SOAPElement"
type="lcl0:v2EdisoprecArrayItem"
serializer="weblogic.webservice.core.encoding.stream.SOAPElementCodec"
deserializer="weblogic.webservice.core.encoding.stream.SOAPElementCodec">
</wsdd:type-mapping-entry>
<wsdd:type-mapping-entry xmlns:lcl0="http://www.webMethods.com/noNamespace/"
class-name="javax.xml.soap.SOAPElement"
type="lcl0:w2EdisoprecArrayItem"
serializer="weblogic.webservice.core.encoding.stream.SOAPElementCodec"
deserializer="weblogic.webservice.core.encoding.stream.SOAPElementCodec">
</wsdd:type-mapping-entry>
<wsdd:type-mapping-entry xmlns:lcl0="http://www.webMethods.com/noNamespace/"
class-name="javax.xml.soap.SOAPElement"
type="lcl0:v2Edisoprec"
serializer="weblogic.webservice.core.encoding.stream.SOAPElementCodec"
deserializer="weblogic.webservice.core.encoding.stream.SOAPElementCodec">
</wsdd:type-mapping-entry>
</wsdd:type-mapping>Hi Hans,
It is a known issue that the XML schema processor in WLS 7.0, doesn't currently
handle the <xsd:anyAttribute processContents="lax"/> and <xsd:any processContents="lax"
minOccurs="0" maxOccurs="unbounded"/> lines in your xsd. This may be corrected
in the next service pack - SP2.
Regards,
Mike Wooten
"Hans Dumbrajs" <[email protected]> wrote:
>
Hi!
I'm having troube generating the java classes for a non built-in datatype
from
wsdl. The autotype ant task will only generate a types.xml file, but
it does not
generate the corresponding java files for the non-built in datatypes,
nor does
it generate any serializer/deserializer classes.
Thanks in advance for any help on this!
The WSDL defines the following datatype:
<xsd:complexType name="w2Edisoprec">
<xsd:complexContent>
<xsd:restriction base="SOAP-ENC:Array">
<xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="w2EdisoprecArrayItem[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="w2EdisoprecArrayItem">
<xsd:sequence>
<xsd:element name="sAs_soptunnus" type="xsd:string" minOccurs="1"
maxOccurs="1"/>
<xsd:element name="sAs_soptun_alk" type="xsd:string" minOccurs="1"
maxOccurs="1"/>
<xsd:element name="lAs_soptun_lop" type="xsd:string" minOccurs="1"
maxOccurs="1"/>
<xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:anyAttribute processContents="lax"/>
</xsd:complexType>
<xsd:element name="w2Edisoprec" type="w2EdisoprecArrayItem" />
I'm using the following build.xml file:
<project name="buildWebservice" default="generate-types">
<target name="generate-types">
<autotype
wsdl="http://localhost/Lak_hEdisopLK.wsdl"
packageName="ssi3Client.types"
destDir="c:/tuxedo2sap/l158/ssi3/wsdl/types"
/>
</target>
</project>
The types.xml file generated by autotype is:
<wsdd:type-mapping xmlns:wsdd="http://www.bea.com/servers/wls70"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<wsdd:type-mapping-entry xmlns:lcl0="http://www.webMethods.com/noNamespace/"
class-name="javax.xml.soap.SOAPElement"
type="lcl0:w2Edisoprec"
serializer="weblogic.webservice.core.encoding.stream.SOAPElementCodec"
deserializer="weblogic.webservice.core.encoding.stream.SOAPElementCodec">
</wsdd:type-mapping-entry>
<wsdd:type-mapping-entry xmlns:lcl0="http://www.webMethods.com/noNamespace/"
class-name="javax.xml.soap.SOAPElement"
type="lcl0:v2EdisoprecArrayItem"
serializer="weblogic.webservice.core.encoding.stream.SOAPElementCodec"
deserializer="weblogic.webservice.core.encoding.stream.SOAPElementCodec">
</wsdd:type-mapping-entry>
<wsdd:type-mapping-entry xmlns:lcl0="http://www.webMethods.com/noNamespace/"
class-name="javax.xml.soap.SOAPElement"
type="lcl0:w2EdisoprecArrayItem"
serializer="weblogic.webservice.core.encoding.stream.SOAPElementCodec"
deserializer="weblogic.webservice.core.encoding.stream.SOAPElementCodec">
</wsdd:type-mapping-entry>
<wsdd:type-mapping-entry xmlns:lcl0="http://www.webMethods.com/noNamespace/"
class-name="javax.xml.soap.SOAPElement"
type="lcl0:v2Edisoprec"
serializer="weblogic.webservice.core.encoding.stream.SOAPElementCodec"
deserializer="weblogic.webservice.core.encoding.stream.SOAPElementCodec">
</wsdd:type-mapping-entry>
</wsdd:type-mapping> -
Location of compiled java files
Where are the compiled java files for jsps? Sometimes I get jsp errors in the log
files like:
D:\jsrv\my\WEB-INF\_tmp_war_myserver_myserver_my\jsp_servlet\_mypage\_cancelmembership.java:105:
')' expected
However, the _cancelmembership.java file does not exist at that location. Only
the _cancelmembership.class file exists at that location.You do NOT want to change the bundled CSS files. Create your own CSS and include it in the template after the built-in CSS include. Any classes you create in your own file of the same name and specificity as the built-in classes will override those classes. For example:<style type="text/css">
td.myclass{color:red}
td.myclass{color:blue}
</style>The color of the text in a table cell with the class "myclass" will be blue, not red, since the same class was defined twice, it will use the one that came last on the page.
If you change the classes in the built-in template CSS files, you'll change them for everyone using your APEX instance, which is not a particularly good thing to do.
Tyler -
BUG: error rebuilding SQLJ files along other java files with generic
I have done a rebuild on a package containing some SQLJ files, and (consistently) got the following error:
C:\TeleMessage\trunk\src\telemessage\db\impl\dbAdmin.sqlj
Error(44,18): Java Parsing. Encountered: <
Expected: <IDENTIFIER> ...; "[" ...; The error at the cursor in the given file is not possible, since there was no '<' there, and besides - if I non-aggresively changed the file, e.g. narrowed imports, changed whitespace or added comments - the error remained in the same location.
I went and done a search using regex in the package, for a line starting with 17 chars followed by a '<'.
I found it in one of the normal JAVA files (not-SQLJ), at line 44 (surprise!) - in a Java 5 generics declaration, e.g. Map<String,Integer>. the 18th character was indeed the '<'.
I'm guessing that the SQLJ translator (accidentally?) parses non-SQLJ files.
If this cannot be fixed, it is really bad - it is one thing that JDeveloper cannot support Java 5 language features because of its dependancy in the SQLJ translator (which is not known to be upgraded until version 11g if at all), but the inability to compile SQLJ files in a project containing other non-SQLJ java files with Java 5 features is hard.
I could only workaround this by rebuilding SQLJ files one at a time!
I also have another type of error, when rebuilding the same project in a higher-level pacakge (root or "Application Sources"):
C:\TeleMessage\trunk\src\dbtools\CallbackNumberFiller.sqlj
Error(24,8): Missing semicolon.
Error(24,8): Unbalanced curly braces.Again, the specified file could not be the one to blame - the location of the error is in the middle of the public modified keyword in a method declaration; nothing is neither missing nor unbalanced.
This appears to be different, as it pops in the log near the end of the build process, when the JSPs are being built, specfically during the time the message log fills with "writing <...>" lines (after "translating <...>" and "compiling <...>".
I can consistently reproduce both cases - please advise how I can help you find out what causes this.
Regards,
Yaniv KundaFirst of all, this bug not JDeveloper's problem, but the SQLJ team's.
You can read more posts about this:
Re: BUG: Cannot translate SQLJ files with Java5 generics code
Re: How to use SQLJ with Java 1.4 and 1.5?
Re: SQLJ discontinued??
And if we're at it, this is strange - I can't seem to find the oracle doc you quoted...
SQLJ 11g? The latest release is a part of JPublisher 10.2 available from
http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html
I also didn't find anything on google on 11g, nor about the part number you specified.
Didn't find any Java 1.5 supporting SQLJ translators from other vendors as well.
Do you have any link to this statement?
But if we examine this bug again, the problem involves JDeveloper passing Java 5 featured JAVA files to the SQLJ translator.
Isn't there a way to instruct the translator to use CLASS files compiled by a normal Java 5 compiler, instead of trying to compile the files itself?
Regards,
Yaniv Kunda -
How to compile and run a .java file from another java program
hello,
can any one tell me how to compile and run a *.java* file from another java program which is not in same directory?Well a smarter way of implementing this is by using a solution provided by Java Itself.
If you are using J2SE 6.0+ there is an in built solution provided along with JDK itself and inorder to go ahead with solution the below are set of API which you;d be using it for compiling Java Programs (Files)
http://java.sun.com/javase/6/docs/api/javax/tools/package-summary.html
How do i do that ??
Check out the below articles which would help you of how to do that
http://www.ibm.com/developerworks/java/library/j-jcomp/index.html
http://www.javabeat.net/javabeat/java6/articles/java_6_0_compiler_api_1.php
http://books.google.com/books?id=WVbpv8SQpkEC&pg=PA155&lpg=PA155&dq=%22javax+tools%22+compiling+java+file&source=web&ots=XOt0siYe-f&sig=HH27ovuwvJgklIf8omTykUmy-eM
Now once we are done with compilation.In order to run a Specific class all you ought to do is create an object and its specific methods of a specified class included in the CLASSPATH which you can manage it easily by usage little bit reflections.
Hope that might help :)
REGARDS,
RaHuL -
I need to know all java files directory by sample:
/System/Library/Java/Support/CoreDeploy.bundle/Contents/JavaAppletPlugin.plugin
etcetera.
I have deleted them all and i don't rember where those file where located, if i knew i would go to another mac computer and paste them to mine, because since i have delethed them all, i can't open safari, mail or app store and i don't want to reinstall the OS.FYI.... Here's the quick and dirty, slower than a wet week, ugly, but effective batch script
set TIKE=C:\Java\lib\tikeswing-1.5
set SRC=%TIKE%\src
set LIB=%TIKE%\lib
set CLASSPATH=%LIB%\commons-beanutils.jar;%LIB%\commons-lang-2.0.jar;%LIB%\commons-logging.jar;%LIB%\log4j.jar;.
FOR /R %SRC% %%f IN (*.java) DO javac -d C:\Java\home\classes -cp %CLASSPATH% %%f
@ECHO OFF
REM http://www.robvanderwoude.com/ntfor.html
REM Walks the directory tree rooted at [drive:]path, executing the FOR statement
REM in each directory of the tree. If no directory specification is specified
REM after /R then the current directory is assumed. If set is just a single
REM period (.) character then it will just enumerate the directory tree.I can't figure out how do the equivalent of javac `dir /s /b *.java` (ie: cmd doesn't seem to have a built-in facility for expanding the results of a command into the command line) which would be a lot quicker and cleaner.
Cheers all. Thanx for the help. I appreciate it. -
Unable to compile ( not creating class file ) java file
Hi
I am unable to compile java file in eclipse. I am using Tomcat 5.0 and eclipse 3.0. I am able to compile the file from command prompt. I installed eclipse and did all settings including Build path ( WEB-INF\classes). But I donot see any class file getting created.Are you seeing errors when eclipse compiles you classes? Have you tried to build your project using; Project -> Build All? If you have and it looks like no errors are generated you may need to change your perspective. Try changing to the resource perspective to see the built class files; Window -> Open Perspective -> Other -> Resource. By default built class files end up in the bin directory of the project. i usually change my built classes directory to classes, just makes more sense to me.
-
Until how many lines can we write java file
in java file, how many lines can I write?
Manybe It will depend on file system such as window, unix file system.
but, I don't know the exact size.
please let me know how many lines I can wirte in java file of window and unix file system.
thank you in advance.A class and method implementation in source lines of code (sans comments and white space) should be as large as necessary, but no larger. Good design principals tend to drive towards smaller peices, but there is no one right size size limit.
Personally, I suspect any method that has over 50 lines of code as being too large and probably refactorable. I also suspect any single class (or for that matter .java file) with more than 50 methods or more than 2000 lines of code as being too large and probably refactorable. But sometimes we might really need a 500 line method or an 8000 line, 200 method class. Maybe its a performance thing. Maybe it is just that complicated and too hard to break up. I doubt it occurs frequently, but I won't be shocked when I see it.
Sometimes GUI classes (Swing and AWT) get really huge. Sometimes this is due to code generation, sometimes its just being sloppy. It pays to know the difference.
But the Java langauge sets reasonable (if not overly generous) limits on bytecode and constant pool sizes If the Java compiler begins to complain that something you have built is is too large, face it, it probably is. It's like running into scope nesting or nested name (class in a class in a class...) size limits - usually not a good sign for the structure of your code.
Chuck -
I am trying to use java file as Model layer and jsf as presentation layer
I am trying to use java file as Model layer and jsf as presentation layer and need some help
I successfully get the value of h:outputText from java file by doing simple binding operation but I am facing problems when I am trying to fill h:dataTable
I create java file
package oracle.model;
import java.sql.;*
import java.util.;*
*public class TableBean {*
Connection con ;
Statement ps;
ResultSet rs;
private List perInfoAll = new ArrayList();
*public List getperInfoAll() {*
perInfoAll.add(0,new perInfo("name","username","blablabla"));
return perInfoAll;
*public class perInfo {*
String uname;
String firstName;
String lastName;
*public perInfo(String firstName,String lastName,String uname) {*
this.uname = uname;
this.firstName = firstName;
this.lastName = lastName;
*public String getUname() {*
return uname;
*public String getFirstName() {*
return firstName;
*public String getLastName() {*
return lastName;
right click on the file and choose 'create data control'
then i wrote the jsf file:
*<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
*<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
*<f:view>*
*<h:dataTable id="dt1" value="#{bindings.perInfoAll}"*
var="item" bgcolor="#F1F1F1" border="10"
cellpadding="5" cellspacing="3" rows="4" width="50%"
dir="LTR" frame="hsides" rules="all"
*>*
*<f:facet name="header">*
*<h:outputText value="This is 'dataTable' demo" id="ot6"/>*
*</f:facet>*
*<h:column id="c2">*
*<f:facet name="header">*
*<h:outputText value="First Name" id="ot1"/>*
*</f:facet>*
*<h:outputText style="" value="#{item.firstName}"*
id="ot2"/>
*</h:column>*
*<h:column id="c4">*
*<f:facet name="header">*
*<h:outputText value="Last Name" id="ot9"/>*
*</f:facet>*
*<h:outputText value="#{item.lastName}" id="ot8"/>*
*</h:column>*
*<h:column id="c3">*
*<f:facet name="header">*
*<h:outputText value="Username" id="ot7"/>*
*</f:facet>*
*<h:outputText value="#{item.uname}" id="ot4"/>*
*</h:column>*
*<f:facet name="footer">*
*<h:outputText value="The End" id="ot3"/>*
*</f:facet>*
*</h:dataTable>*
*</center>*
*</af:document>*
*</f:view>*
but nothing is appear in my table
I know that there is something wrong in calling the binding object
I need help pls and where can i find some help to deal with another tag types
thanksi dragged the "perInfoAll" from my "Data Controls" and choosed adf table (even I know that new table with adf tags well be generated and i want table with jsf tags)
and this code is generated
*<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"*
*"http://www.w3.org/TR/html4/loose.dtd">*
*<%@ page contentType="text/html;charset=UTF-8"%>*
*<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>*
*<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>*
*<%@ taglib uri="http://xmlns.oracle.com/adf/faces/rich" prefix="af"%>*
*<f:view>*
*<af:document id="d1">*
*<af:messages id="m1"/>*
*<af:form id="f1">*
*<af:table value="#{bindings.perInfoAll1.collectionModel}" var="row"*
*rows="#{bindings.perInfoAll1.rangeSize}"*
*emptyText="#{bindings.perInfoAll1.viewable ? 'No data to display.' : 'Access Denied.'}"*
*fetchSize="#{bindings.perInfoAll1.rangeSize}"*
*rowBandingInterval="0"*
*selectionListener="#{bindings.perInfoAll1.collectionModel.makeCurrent}"*
*rowSelection="multiple" id="t1">*
*<af:column sortProperty="uname" sortable="false"*
*headerText="#{bindings.perInfoAll1.hints.uname.label}"*
*id="c1">*
*<af:inputText value="#{row.bindings.uname.inputValue}"*
*label="#{bindings.perInfoAll1.hints.uname.label}"*
*required="#{bindings.perInfoAll1.hints.uname.mandatory}"*
*columns="#{bindings.perInfoAll1.hints.uname.displayWidth}"*
*maximumLength="#{bindings.perInfoAll1.hints.uname.precision}"*
*shortDesc="#{bindings.perInfoAll1.hints.uname.tooltip}"*
*id="it3">*
*<f:validator binding="#{row.bindings.uname.validator}"/>*
*</af:inputText>*
*</af:column>*
*<af:column sortProperty="firstName" sortable="false"*
*headerText="#{bindings.perInfoAll1.hints.firstName.label}"*
*id="c2">*
*<af:inputText value="#{row.bindings.firstName.inputValue}"*
*label="#{bindings.perInfoAll1.hints.firstName.label}"*
*required="#{bindings.perInfoAll1.hints.firstName.mandatory}"*
*columns="#{bindings.perInfoAll1.hints.firstName.displayWidth}"*
*maximumLength="#{bindings.perInfoAll1.hints.firstName.precision}"*
*shortDesc="#{bindings.perInfoAll1.hints.firstName.tooltip}"*
*id="it2">*
*<f:validator binding="#{row.bindings.firstName.validator}"/>*
*</af:inputText>*
*</af:column>*
*<af:column sortProperty="lastName" sortable="false"*
*headerText="#{bindings.perInfoAll1.hints.lastName.label}"*
*id="c3">*
*<af:inputText value="#{row.bindings.lastName.inputValue}"*
*label="#{bindings.perInfoAll1.hints.lastName.label}"*
*required="#{bindings.perInfoAll1.hints.lastName.mandatory}"*
*columns="#{bindings.perInfoAll1.hints.lastName.displayWidth}"*
*maximumLength="#{bindings.perInfoAll1.hints.lastName.precision}"*
*shortDesc="#{bindings.perInfoAll1.hints.lastName.tooltip}"*
*id="it1">*
*<f:validator binding="#{row.bindings.lastName.validator}"/>*
*</af:inputText>*
*</af:column>*
*</af:table>*
*</af:form>*
*</af:document>*
*</f:view>*
but when run it i see the following errors
*Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
*Object EmpManager of type DataControl is not found.*
*java.lang.NullPointerException*
*Class oracle.adf.model.adapter.bean.BeanDataControl can not access a member of class nl.amis.hrm.EmpManager with modifiers "private"*
*Object EmpManager of type DataControl is not found.*
*java.lang.NullPointerException*
:( -
View Object to read data from a java file
Hi,
I am using JDeveloper 11.1.1.4 and ADF-BC in my application.
For one of my view objects , I want the data to be read from a java file which exposes some method to return a collection.
I cannot use a static view object in this case.
Please suggest the best way to implement this requirement.Basically build a view object that should read data from a java file.
Thanks,
PraveenDepending on your use case you can either use a programmatic VO or directly expose the JV class as a data control.
http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_36/jdtut_11r2_36.html -
Import statement in .java files and .jsp files
Guys I have few mysteries about this import statement.
Please correct me if I am wrong.
1)Suppose if I have a folder c:\SourceFolder it has one.java and two.java files.If I compile one.java then one.class files is created in c:\ClassFolder .Now two.java uses one of the method of one.java,and without using import statement I am able to compile two.java, and two.class file is created in c:\ClassFolder.I assume that the path of one.class was taken from the CLASSPATH environment variable,hence I there was no need for import statement .........am i right ?
BUT... in My.jsp,which is in C:\JspFolder, if I want to use one.class,then I have to specifically import the class I want to use.That is i have to say
<%@page import="one"%>
and since the classpath is C:\ClassFolder ,it finds one.class in the C:\ClassFolder.(Note that My.class is created in a folder different from c:\ClassFolder )
But I am wondering why was there no need for me to import one.class in two.java.
(Note I am using JDeveloper and Apache server)
Please help.
In this case the pSo I am wondering in JSP why it doesn't take the class I am looking for from the classpath .
Help.You have to understand Java scoping rules. In the 1st scenario with the two Java files I am guessing neither one of them begins with a package statement. This means that they belong to the default package. When you compile the compiler uses the classpath to resolve method calls looking in the default package since there was no import statement specified in two.java. JSP is a little different. Now I just read this here in these forums a couple of days ago. Since the classfiles generated from the JSP files are not in the CLASSPATH they are loaded by a different classloader. This is why you have to import all references to all classes in the default package.
-
Import statement in .java files and .jsp files ..correction
Guys I have few mysteries about this import statement.
Please correct me if I am wrong.
1)Suppose if I have a folder c:\SourceFolder it has one.java and two.java files.If I compile one.java then one.class files is created in c:\ClassFolder .Now two.java uses one of the method of one.java,and without using import statement in two.java I am able to compile two.java, and two.class file is created in c:\ClassFolder.I assume that the path of one.class was taken from the CLASSPATH environment variable,hence I there was no need for import statement .........am i right ?
BUT... in My.jsp,which is in C:\JspFolder, if I want to use one.class,then I have to specifically import one.class in My.jsp .That is i have to say
<%@page import="one"%>
in My.jsp.
and since the classpath is C:\ClassFolder ,it finds one.class in the C:\ClassFolder and MyJsp is compiled sucessfully.(Note that My.class is created in a folder different from c:\ClassFolder )
But I am wondering why was there no need for me to import one.class in two.java.
(Note I am using JDeveloper and Apache server)
Please help.It has to do with packages. Most java classes are in a package, the name of which must conform to its place on the filesystem relative to the classpath. By that I mean that if you have com.mystuff.One.java, it must be in a folder com/mystuff where com is located somewhere in the classpath.
What you've done is a little different. I'm assuming a couple of things:
1. you have no package declaration at the top of one.java or two.java
2. you have the current directory "." in your classpath.
Java has the concept of the "default package", which covers classes without a declared package, and in your case is the current directory.
So when you're in c:\sourcefolder and run the compiler, then "."="c:\sourcefolder", and that directory is part of the default package. No import statements are necessary for classes that are in the same package. This is why two.java can call methods in one.java without an import statement.
When you run your jsp, the "current directory" part of your classpath is not c:\sourcefolder, but some other value (probably the directory you start your jsp engine from) You will have to import all non-java-library classes because the jsp itself becomes a java class, with a package that is determined by the jsp engine. -
Can not see the design view nor the java file in CentOS
Hi all. I've recently installed JSC2 in CentOS. I find this tool really useful. But I have a problem with the design view and the java file view. At the beginning, when I first create a Page1.jsp, I can see the design view and the java view with no problem. I run apps correctly. But after a while, I get a "null pointer exception" error and I am able to see only the jsp view, not the others. I don't even have the option to see the Design and Java views. And the page icon in the project window appears to be darker than a well working page. I'm not really sure what sequence of actions I do to get this error, it just suddenly happens. What I've done so far in JSC2 is to link to pages in the Page Navigation view. It works fine for a while, but after a while I get the error I've described.
Yes, if I do that It happens the same. I've tried everything. Now I'm using Window$ 2000 and it works properly. Thanks anyway.
-
How do I include a JAVA file in my website using DreamweaverCC ?
Hi. I searched the forums and it seems that all questions relating to JAVA and Dreamweaver elicit zero replies.
I hope that someone has some direction. Thanks again.
I have a JAVA file that I want to include or have run within one of my pages in my WebSite.
file > new > create > and there is not an option for JAVA but there is one for PHP etc. etc.
How do I incorporate a java script into my Web Site ?
I thought that I could just copy the code into the file here - at least to begin with - but JAVA runs in the background.
I am lost
conceptually
and I do not know how to go about this task
structurally.
Thanks again,
ReginaJQuery is a core JavaScript library used by millions of web sites. It's the "do more & write less code framework." If you're into re-inventing the wheel every time you need an advanced feature (plugin), feel free to manually code it yourself with JavaScript. However, you'll need to test & debug your scripts in every conceivable browser and OS before you can be sure it's viable for use on a production site.
On the other hand, you could use a plugin and be up & running in 5 minutes or less. See the code below.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>HTML5, with Fancybox2 Viewer</title>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--LATEST JQUERY CORE LIBRARY-->
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<!--FANCYBOX plugins-->
<link href="http://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.css" rel="stylesheet" media="screen">
<script src="http://cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.4/jquery.fancybox.pack.js"></script>
<style>
body {
background: silver;
font-family:Segoe, "Segoe UI", "DejaVu Sans", "Trebuchet MS", Verdana, sans-serif;
#wrapper {
width: 1000px; margin:0 auto;
background:#FFF;
/**this styles image container**/
#thumbs p {
float: left;
width: 180px;
height: 12.5em;
margin: 10px 22px 0 22px; /**space between containers**/
padding: 10px; /**space around containers**/
border: 1px solid silver;
/**rounded borders**/
-moz-border-radius: 20px;
-webkit-border-radius: 20px;
border-radius: 20px;
/**this styles caption text**/
font: italic 14px/1.5 Geneva, Arial, Helvetica, sans-serif;
color: #666;
text-align: center;
/**recommend using same size images**/
#thumbs img {
width: 160px; /**adjust width to thumbnail**/
height: 120px; /**adjust height to thumbnail**/
margin-bottom: 1.5em;
opacity: 0.75;
#thumbs img:hover { opacity: 1.0 }
/**float clearing**/
#thumbs:after {
content: ".";
clear: left;
font-size: 0px;
line-height: 0;
display: block;
visibility: hidden;
</style>
</head>
<body>
<div id="wrapper">
<h1><a href="http://fancyapps.com/fancybox/">Fancybox2</a> Viewer with images</h1>
<!--insert thumbnails with links to full size images below-->
<div id="thumbs">
<p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 1" /></a> <br />
Caption 1 </p>
<p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 2" /></a> <br />
Caption 2 </p>
<p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 3" /></a> <br />
Caption 3 </p>
<p><a class="fancybox" data-fancybox-group="gallery" href="http://placehold.it/400x320.jpg" title="optional captions"><img src="http://placehold.it/160x120.jpg" alt="Thumbnail 4" /></a> <br />
Caption 4 </p>
<!--end thumbs--></div>
<!--end wrapper--></div>
<!--FancyBox function code-->
<script>
$(document).ready(function() {
$('.fancybox').fancybox();
</script>
</body>
</html>
Nancy O.
Maybe you are looking for
-
What's happened to the calendar in IOS 7.0? I would like to be able to see the whole day at a glance not just a few hours. Any suggestions?
-
Hi Guys, I was just hoping to get your opinion on something. I have a procedure in Production that is taking longer and longer to finish and sticks on one certain section of code. The code is an INSERT into the main dimension table. This same procedu
-
Instalation Pre-production 8.0.5
I can't install Oracle by typing ./orainst but I'm able to do it with ./install script. I have not any problem when creating the database but: Where is Scott user ? Where are the help tables for SQL*PLUS ? Which is the difference between one instalat
-
Unable to set 'tap to click' by command line
Use case: I'm trying to write a script to set up new macbooks with a set of dev tools and usability configuration options. Most configurations are simple enough to change by altering the global application setting e.g. setting the scroll direction wi
-
Inheriting and the "super" keyword
I found a case where "super" is not working as I understand it should... Can someone explain me the underlying theory that makes JAVA behave this way?? public class Base { public void method1() { System.out.println("method1 from \"Base