How to recursively compile?
I have copied our source directory structure for Packages to my hard drive and now need to compile all the source code. There are hundreds of folders! Is there a command I can give that will search through the folders, compile what it finds and leave the class in the same folder as the source code?
I'd really appreciate any help on this or I shall be here for days compiling!!
<< There are hundreds of folders!
This is typical of any Java project of appreciable size.
I used to have nightmarish experiences myself, but only untill I learned about Jakarta Ant from Apache.org
Once I started using Ant, I have been able to spend my time wrting valuable code instead of wasting it in inventing platform specific scripts for compilation, or, more generally, build.
I would strongly encourage you check it out http://jakarta.apache.org/ant/index.html
Learning Ant is a breeze.
And if you feel you need some kind of tutorial, in addition to all the documentation that comes with it, see http://www.javaworld.com/jw-10-2000/jw-1020-ant.html
Similar Messages
-
How to successfully compile form in Linux
Hi there,
I have a form, which is called: TESTFORM.fmb
I tried to compile this form using the following command:
export LD_LIBRARY_PATH=/u0/oracle/prodora/8.0.6/lib
f60gen module=/u0/oracle/prodappl/ar/11.5.0/forms/US/TESTFORM.fmb USERID=apps/passwordAlthough fmx is successfully generated, the following error is also encountered during compile:
FRM-18108: Failed to load the following objects.
Source Module:APPSTAND
Source Object: STANDARD_PC_AND_VA
Source Module:APPSTAND
Source Object: STANDARD_TOOLBAR
Source Module:APPSTAND
Source Object: STANDARD_CALENDAR
I look for APPSTAND.fmb and I found it in this location: /u0/oracle/prodappl/ar/11.5.0/forms/US/
So I then tried to compile again using the following command, but the problem is still occurred:
export LD_LIBRARY_PATH=/u0/oracle/prodora/8.0.6/lib
export forms_path=/u0/oracle/prodappl/ar/11.5.0/forms/US/
f60gen module=/u0/oracle/prodappl/ar/11.5.0/forms/US/TESTFORM.fmb USERID=apps/passwordMy question is how to successfully compile this form?
Any input would be helpful. Thank youJimmy;
Are you using a WebLogic server?
If yes, you should use the Forms Compiler frmcmp.sh
#!/bin/sh
for file in *.fmb
do
frmcmp_batch.sh module=$file userid=<your connect string> compile_all=yes
done
Tested on WebLogic and working, your paths will be different
#!/bin/sh
export ORACLE_HOME=/u01/app/oracle/product/fmw/oracle_pfrd
export FORMS_PATH=/u01/app/oracle/product/fmw/fr_inst
export PATH=$PATH:$ORACLE_HOME/bin:$FORMS_PATH/bin
export TERM=vt220
export ORACLE_TERM=vt220
export TNS_ADMIN=/u01/app/oracle/product/fmw/oracle_pfrd/network/admin
for file in *.fmb
do
frmcmp_batch.sh module=$file userid=scott/tigersy@dev2 compile_all=yes
done
Edited by: mseberg on Mar 2, 2011 8:57 AM
script run from directory .fmb's are in
Should also work on iAS
Thanks!!
Edited by: mseberg on Mar 8, 2011 5:22 AM -
How to make compiler do inline optimization in WTK?
Hello:
I'm a freshman in WTK. I found that my project is running very slow, so I wrote the following test to find the time cost of function call. I found that in this test, it spent 94ms, 1076ms and 2016ms in simulator, for 0, 1, and 2 function calls in each cycle (300,000 times).
By this result, I think function call may be very expensive and may became the bottleneck of performance in my project.
public static runTest(){
long i = 0;
long j = 0;
long begin = System.currentTimeMillis();
int times = 300000;
for (i = 0; i < times ; i++){
j = j + i;
long end = System.currentTimeMillis();
System.out.println("The result no call is " + (end - begin) );
begin = System.currentTimeMillis();
for (i = 0; i < times ; i++){
j += set(i);
end =System.currentTimeMillis();
System.out.println("The result 1 call is " + (end - begin) );
begin = System.currentTimeMillis();
for (i = 0; i < times ; i++){
j += set2(i);
end = System.currentTimeMillis();
System.out.println("The result 2 call is " + (end - begin) );
private static long set2(long i) {
return set(i);
private static long set(long i) {
return i;
}I work in eclipse ,and make sure i've checked "Inline finally blocks" check box.
I also run the same code in pc, and find the function call may have been optimized to "inline" by compiler (The times changed to 300,000,000, and result is 2016ms, 2281ms, and 2266ms), i also make sure changed the "compiler compliance level" to 1.3
In an ideal situation, the compiler can find "set(i)" is exactly "i" and change all"set(i)" to "i";
I wonder if the compiler can change some function to such "inline" in WTK. I don't know how compiler works in WTK, but as a freshman in WTK, i think there may have some optimization option i don't know. Can someone tell me how to make compile do this stuff?
Thx a lot!...javac make something inline while WTK not...I doubt this. I think that code that was inlined by javac, will remain inlined when executed by WTK. You can check that in more details at compiler forum if needed. Javac remains the same, inlines are there - I don't think this changes.
What WTK probably can (and maybe even should) change is *hotspot* optimization settings when it emulates execution of MIDlets by real device.
As for your problem, could it be described as follows: MIDlets run slower than you'd expect of a typical desktop Java applications?
If yes then WTK User Guide seem to have an explanation for that: +"...Compared to the desktop-based emulator, a real MIDP device usually has a slower processor, less memory, and a slower network connection, and might have a different type of display. The Sun Java Wireless Toolkit for CLDC enables you to simulate the constrained environment of a real device..."+ (quoted from chapter Adjusting Emulator Performance). To me this reads like WTK forces Java machine to slow down execution of MIDlets in order to make it feel closer to a typical mobile device. -
How can I compile an entire package ??
Hi
I've downloaded about 20 .java files (these files build a package) and I want to compile them now with javac. Compiling the files one after the other produces unfortunately many errors. The owner of the code told me I've to "compile the entire package" and I should use Borland's JBuilder for that. Installing JBuilder makes trouble so I want to compile the code with javac.
Do you know how I can compile an entire package with javac ?
javac *.java doesn't work (produces lots of errors).
Thanks in advance,
MarcelHi
I've downloaded about 20 .java files (these files
build a package) and I want to compile them now with
javac. Compiling the files one after the other
produces unfortunately many errors. The owner of the
code told me I've to "compile the entire package" and
I should use Borland's JBuilder for that. Installing
JBuilder makes trouble so I want to compile the code
with javac.
Do you know how I can compile an entire package with
javac ?
javac *.java doesn't work (produces lots of errors).
I doubt it.
"javac *.java" will compile any dependent class files in the same package.
There are several possibilities.
1. There is more than one package.
2. The class path is wrong. (The class path must have the root of the directory and obviously the java files must exist in a directory tree that mirrors the package.)
3. Something is wrong with the java files. Or perhaps something is missing. -
New programmer- how do i compile package members?
im learning java using sams teach yourself java in 21 days. its really good compared to other ive tried but i was having a problem on day 6. i couldnt compile package members successfully. i didnt undestand the book instruction so instead of compiling this way:
C:\noam\java> c:\java\jdk1.5.0_06\bin\javac classname.java
i did it this way:
C:\java\noam\org\cadenhead\ecommerce> c:\java\jdk1.5.0_06\bin\javac classname.java
this worked but other classes inside the package could not recognize this class, though classes outside the package could.
how do i compile package members?
thnx!I solved the problem...! I have no idea how but it worked this time!
thnx anyway for everybody who tried to help! -
How do you compile Flex-dependent classes with ASC?
Hi,
I've been trying unsuccessfully for most of the evening to compile a .as file that relies on mx.collections.ListCollectionView using asc. I figured I could just import the Flex framework SWCs from the command line with asc, but asc doesn't seem to respect SWCs - it only seems to respect .abc files.
So, I've spent most of my time trying to compile the Flex framework into a single .abc file that I can import whenever I want to compile a class that relies on Flex. I figured I could make a base .as file with include statements for all of the Flex .as files (copying the approach I saw for files like builtin.as) and compile that, but all I seem to get are compiler errors - mostly "[Compiler] Error #1181: Forward reference to base class (base class name)."
I have a feeling I'm doing this completely the wrong way. I'd very much appreciate any assistance that anybody can offer me.
Thanks,
- max<div class=Section1><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>I use MXMLC to compile my .as file projects.<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Alex Harui<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Flex SDK Developer<o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><a href="http://www.adobe.com/"><span style='color:blue'>Adobe<br />Systems Inc.</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'>Blog: <a href="http://blogs.adobe.com/aharui"><span<br />style='color:blue'>http://blogs.adobe.com/aharui</span></a><o:p></o:p></span></p><br /><br /><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";<br />color:#1F497D'><o:p> </o:p></span></p><br /><br /><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><br /><br /><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span<br />style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Maxim Porges<br />[mailto:[email protected]] <br><br /><b>Sent:</b> Monday, February 09, 2009 9:22 PM<br><br /><b>To:</b> [email protected]<br><br /><b>Subject:</b> How do you compile Flex-dependent classes with ASC?<o:p></o:p></span></p><br /><br /></div><br /><br /><p class=MsoNormal><o:p> </o:p></p><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>A new discussion was started by<br />Maxim Porges in <br><br /><br><br /><b>Developers</b> --<br><br /> How do you compile Flex-dependent classes with ASC?<br><br /><br><br />Hi, <br><br /><br><br />I've been trying unsuccessfully for most of the evening to compile a .as file<br />that relies on mx.collections.ListCollectionView using asc. I figured I could<br />just import the Flex framework SWCs from the command line with asc, but asc<br />doesn't seem to respect SWCs - it only seems to respect .abc files. <br><br /><br><br />So, I've spent most of my time trying to compile the Flex framework into a<br />single .abc file that I can import whenever I want to compile a class that<br />relies on Flex. I figured I could make a base .as file with include statements<br />for all of the Flex .as files (copying the approach I saw for files like<br />builtin.as) and compile that, but all I seem to get are compiler errors -<br />mostly "[Compiler] Error #1181: Forward reference to base class (base<br />class name)." <br><br /><br><br />I have a feeling I'm doing this completely the wrong way. I'd very much<br />appreciate any assistance that anybody can offer me. <br><br /><br><br />Thanks, <br><br /><br><br />- max <o:p></o:p></p><br /><br /><div class=MsoNormal><br /><br /><hr size=2 width=200 style='width:150.0pt' align=left><br /><br /></div><br /><br /><p class=MsoNormal style='margin-bottom:12.0pt'>View/reply at <a<br />href="http://www.adobeforums.com/webx?13@@.59b7d5d2">How do you compile<br />Flex-dependent classes with ASC?</a><br><br />Replies by email are OK.<br><br />Use the <a<br />href="http://www.adobeforums.com/webx?280@@.59b7d5d2!folder=.3c060fa3">unsubscribe</a>< br />form to cancel your email subscription.<o:p></o:p></p><br /><br /></div>
-
Revision: 1608
Author: [email protected]
Date: 2008-05-07 17:36:02 -0700 (Wed, 07 May 2008)
Log Message:
This checkin makes public our modifications to Batik, which improve how the MXML compiler reports errors in CSS syntax.
Bugs: -
QA: No
Doc: No
Reviewer: Jono
Modified Paths:
flex/sdk/trunk/modules/thirdparty/batik/resources/org/apache/batik/css/parser/resources/M essages.properties
flex/sdk/trunk/modules/thirdparty/batik/sources/org/apache/batik/css/parser/AbstractDesce ndantSelector.java
flex/sdk/trunk/modules/thirdparty/batik/sources/org/apache/batik/css/parser/AbstractEleme ntSelector.java
flex/sdk/trunk/modules/thirdparty/batik/sources/org/apache/batik/css/parser/AbstractSibli ngSelector.java
flex/sdk/trunk/modules/thirdparty/batik/sources/org/apache/batik/css/parser/CSSLexicalUni t.java
flex/sdk/trunk/modules/thirdparty/batik/sources/org/apache/batik/css/parser/DefaultCondit ionalSelector.java
flex/sdk/trunk/modules/thirdparty/batik/sources/org/apache/batik/css/parser/DefaultElemen tSelector.java
flex/sdk/trunk/modules/thirdparty/batik/sources/org/apache/batik/css/parser/ParseExceptio n.java
flex/sdk/trunk/modules/thirdparty/batik/sources/org/apache/batik/css/parser/Parser.java
flex/sdk/trunk/modules/thirdparty/batik/sources/org/apache/batik/css/parser/Scanner.java
Added Paths:
flex/sdk/trunk/modules/thirdparty/batik/sources/org/apache/batik/css/parser/AbstractSelec tor.java -
How can i compile the program?
hi,everybody:
I have a program which include the next statments:
public void println(boolean flag)
throws IOException
Object obj = lock;
obj;
JVM INSTR monitorenter ;
print(flag);
newLine();
obj;
JVM INSTR monitorexit ;
break MISSING_BLOCK_LABEL_26;
Exception exception;
exception;
obj;
JVM INSTR monitorexit ;
throw exception;
how can i compile the program?
thanksHi,
I'm trying to figure out how to use this decompiler, I have downloaded it to windows 2000 platform and it unzips to 1 file with extension "1-bin" - OS doesn.'t know what to do with and neither do I ;) - I'm starting out on something here and this tool would be useful.
Thanks for any install instructions you might have.
mufc1999
Hi,
I've had a similiar problem with decompiling certain
classes. Try the following decompiler,
http://jrevpro.sourceforge.net, after using this one,
the code decompiled fine, this tool is also a
disassembler and quite a nifty one i might add. :)
Hope this helps!
Have Fun! -
How can I compile Javascript from Java??
Hi all,
I am facing a problem, problem is I have to compile JavaScript code in Java. JavaScript code will given in Text field, those code i have to compile and i should display a message saying this is valid Java script code or Invalid code.Can anyone help on this...JavaScript code interpreting but not compiling... I need to compile, but not Interpret the code. How can i Compile the JavaScript Code...
-
Hi,
In short: How to suppress compiler errors without excluding the object from the "Schema Compare" tool ??
A bit longer:
We have a SQL Server 2008 project in Visual Studio 2013 running SQL Server Data Tool.
An old database, with a lot of history in, has been imported into SSDT and there are many syntax errors preventing the project from compiling/running. An typical error is: "SQL70001: This statement is not recognized in this context".
Running the "faulty" scripts on the server, executes just fine. I understand that there are syntax errors and they should be rewritten, but it's not gonna happen just like that - it is a slow process over a long period of time.
I know it is possible to change Build Action to None, but that also exclude the object from appearing in the Schema Compare function/window.
So - how to ignore some compiler errors and still having the objects to appear when doing "Schema Compare" ??
Thank you in advance.Hi Steven,
Thanks for your comments.
Well, it sure does help in the future, but right now i would prefer the other way - to suppress some errors and still allow the scripts to build.
The thing is that if we "rewrite" the objects into create scripts, then we have a huge test job ahead of us + the database environments (PROD vs DEV and UAT) does not share the same AD or DB users and therefore grants is lost if dropping/creating
objects, right!
If you drop a object before creating it, the drop will also drop the roles and grants and since they don't share user table, the create will not be able to add the permissions again. There might be a solution to that, but it is going to be very complicated
for some newbies like us. We need something we can trust.
BR
Peter -
How to cross compile CDC CVM on Redhat6.2 for stong ARM??
Dear all:
Can you tell me how to cross compile CDC CVM on Redhat6.2 for stong ARM??I failed to find any
infomation on this problem.If you know ,please tell me.
ThanksHi:
Thank you for your advice. I'll give your advice to my boss.But is it possible to cross-compile CVM? If the answer is positive,how?
Thank you
Best RGDS -
How do I compile my Java project?
How do I compile my Java project? The "Build" option is missing from the right-click menu of my Project Explorer and I can't find a compile button.
On 08/05/2015 12:42 PM, Chris Wilkinson wrote:
> How do I compile my Java project? The "Build" option is missing from
> the right-click menu of my Project Explorer and I can't find a compile
> button.
Examine the Project menu. You'll see that, by default, Build
Automatically is checked. Each time you make a change to a Java file,
Eclipse rebuilds it into a .class file. To force the entire project to
be rebuilt, whether it needs it or not, select Project -> Clean.
Is this what you're looking for? -
Does anyone know how to pre-compile JSP so as to get faster browsing response?
I know little about JSPs but from what I can remember, JSPs are compiled first time when they are being asked to be executed .Unless changes are made to those programs they would not be compiled, as a result of that, it would run faster. Correct me if I am wrong though
-
How to pre-compile JSF pages?
Hi,
I am new to JSF and would appriciate if any one can help me find out how to pre-compile JSF pages?
Thanks in advance
satsdnThe same way you pre-compile JSP pages: Set it up in your faces-config.xml file.
Here's how I do it:
<servlet>
<servlet-name>AcctID</servlet-name>
<display-name>AcctID</display-name>
<jsp-file>/AcctID.jsp</jsp-file>
<load-on-startup>-1</load-on-startup>
</servlet>Put one of these tags for each JSP you want to pre-compile. The -1 load-on-startup value is important.
CowKing -
Hi all,
I struckup with a doubt as fallows
How to pre-compile a JSP to Servlet(.class file) bfore the first request ,so that the first response takes same time as later responses.Thanx Ram for ur response,
I know Tomcat is assembled with Jasper compiler.My actual doubt is I want to precompile the Jsp bfore the first request. Actually the compilation occurs at the time of first request.U said it is server specific ,can u plz s let me know the pre-compile option for WEBLOGIC Server.
Maybe you are looking for
-
help me
-
Hello Java Fans!! I was wondering if anyone knows how to make Applets read Files from the hard drive on a local machine. (Or where to find information about it?) Thanks a bunch in advance! A.
-
Cannot Play or Import Sprinsteen DualDisc
I just bought the Springsteen Seeger Sessions Sony DualDisc CD/DVD. The DVD playback is excellent, but the CD Audio is garbled/fragmented on each tune. Even when I find a way to Import the CD Audio, it is the same. I tried converting to MP3 format (f
-
Hi All, I wantd to do Goods issue for pipeline materials. So i hav created one pipeline material and also maintained info record. when i tried to post the goods issue ( Mov type 201P) it gives me the error as "G/l account 1214002300 does not exists i
-
I am trying to restore my iphone 5. I keep getting error 21. I have tried on several computers . What do I do?