Compiling to executables
Hi. Can someone help me on how to compile my Java code to executables? I use J2SDK 1.4.1_04. Thanks.
Why are free ones no good?
I use GCJ for a mid-size applikation (about 300 classes) and it works really great. All for free!
To archive the same with say Excelsior-JET (an swt applikation withought JRE) I would have to pay about 800$ minimum.
You need to be good to use such tools (*g*), but for mainstream desktop apps it helps to deoploy your applikation more widely.
lg Clemens
Similar Messages
-
Is there such thing as a "compile and execute statement" in Java?
I wanted to know if there's any way to compile and execute a program "within" another program.
Yes, but the classes to do so aren't officially supported by Sun as far as I know.
And you must be able to assume a thing or two about the stuff you compile, such as existing constructors or factory methods etc, otherwise it gets hairy.
Here's some example code (haven't tried it, so excuse any spelling errors etc) to compile the source code in a file called MyClass.java:
ByteArrayOutputStream baos = new ByteArrayOutputStream();
new sun.tools.javac.Main(baos,null).compile("MyClass.java");
String theMsg = baos.toString();
if (theMsg.length() > 0)
// NiftyErrorHandlingHere
}After that, you can load it with a simple ClassLoader.loadClass() call and create instances of it.
It must be compiled with the tools.jar file in the classpath, to find the sun.tools.javac.Main class.
However, for any such dynamically compiled class to be of any use to you, you must be able to assume something about it, such as implementing interfaces or whatever, otherwise it's a kind of pointless exercise.
HTH,
F -
How to compile and execute lex,yac,c and java programs
its the 3rd day on my New MacBook pro..
as i just migrated from windows to mac i love to work on this..
The main problem is i DON't know .......
how to compile and execute
1) lex and yac programs
2) c program
3) java program
so please help me
THIS is the error i got a1.l is a program
i got the same error when i used gcc
$ lex a1.l
$ cc lex.yy.c
Undefined symbols:
"_yywrap", referenced from:
_yylex in cc8QDQjW.o
_input in cc8QDQjW.o
ld: symbol(s) not found
collect2: ld returned 1 exit statusIs the problem that you don't know how to compile and execute these programs on a Mac, or just that you don't know how to compile and execute them?
Mac OS X is really just a version of BSD Unix, as far as programs like like bison, flex and gcc are concerned...and even when Apple specific versions are provided in the Developer Tools, there are symlinks in the usual places in the Unix file hierarchy.
For problems with lex and yacc, I suggest you start with their own references, for example, here.
Or you could just use %option noyywrap, if you only have one file to scan.
Or you could link to libfl.a using -lfl and use the default version from that library.
But you really should (as Keith Barkley was subtly hinting at) learn how these tools work and why they work that way. -
How to compile and execute programing languages
its the 3rd day on my New MacBook pro..
as i just migrated from windows to mac i love to work on this..
but i my main problems is i DON't know .......
how to compile and execute
1) lex and yac programs
2) c program
3) java program
so please help me
THIS is the error i got a1.l is a program
i got the same error when i used gcc
$ lex a1.l
$ cc lex.yy.c
Undefined symbols:
"_yywrap", referenced from:
_yylex in cc8QDQjW.o
_input in cc8QDQjW.o
ld: symbol(s) not found
collect2: ld returned 1 exit statusYou're trying to build something that depends on a library you don't have, or haven't referenced. This sort of question belongs in the Developer forums.
Developer Forums: Apple Support Communities -
Java.io.IOException: Compiler failed executable.exec
I m trying to deploy a EAR file which has a single EJB.
It deploys fine but when i try to start it it throws the exception trac
ebelow.
Any ideas on how to solve ? I ve put Jrockit javac in path, set BEA_HOME
and tried a few other things with no luck.
Any ideas ?
/s
Unable to deploy EJB: hello_ejb_wls9.jar from hello_ejb_wls9.jar:
There are 1 nested errors:
java.io.IOException: Compiler failed executable.exec
at
weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvo
ker.java:435)
at
weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:
295)
at
weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:
303)
at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:284)
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:470)
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:439)
at
weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:436)
The server compiler and ejb compiler are set as javac in the options.Hi,
I think you are not creating that ear correctly.
Could you check the following points ?
1. make sure all the files you need are there
2. make sure folder hierararchy is ok
If that's cool: And its still doesnt work:
Export your example ear from weblogic and use that one
Regards
Anilkumar kari -
Error from ejbc: Compiler failed executable.exec
Hi all,
I am using weblogic server 8.1 and encounter an error when I build my project, could anyone give me a helping hand? Thank you.
This is my Configuration:
Application Type: Empty Application
Project Type: EJB Project
Project Name: LibraryEJBProject
DataSource: LibraryDataSource using cgPool
Table: Library_Book under Schemas\Weblogic\Tables of pointbase server
EJB name: BookBean.EJB under LibraryEJBProject\book
When I right click LibraryEJBProject and click build, the following error comes out:
======================================================
Build project LibraryEJBProject started.
BUILD STARTED
build:
Created dir: C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build
check-env:
WARNING: Checking to see if there is anything new to build...
Created dir: C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_ejb_crc
no-ejbgen:
run-build:
clean-modules:
removed module 'LibraryEJBProject.jar'
WARNING: Running EJBGen...
Loading source file C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\/wlw_LibraryEJBProject_build/../wlw_ejb_crc//ejbgentemp/Book\BookBean.java...
Constructing Javadoc information...
EJBGen 2.16
[Info:] Creating C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\/wlw_LibraryEJBProject_build/../wlw_ejb_crc//ejbgentemp\Book\Book.java
[Info:] Creating C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\/wlw_LibraryEJBProject_build/../wlw_ejb_crc//ejbgentemp\Book\BookHome.java
[Info:] Creating C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\/wlw_LibraryEJBProject_build/../wlw_ejb_crc//ejbgentemp\META-INF\ejb-jar.xml
[Info:] null [Bean] MAKE CLASS NAME G:BookHome P:Book N:BookHome
[Info:] null [Bean] MAKE CLASS NAME G:Book P:Book N:Book
[Info:] Creating C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\/wlw_LibraryEJBProject_build/../wlw_ejb_crc//ejbgentemp\META-INF\weblogic-ejb-jar.xml
[Info:] Creating C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\/wlw_LibraryEJBProject_build/../wlw_ejb_crc//ejbgentemp\META-INF\weblogic-cmp-rdbms-jar.xml
[Info:] Creating C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\/wlw_LibraryEJBProject_build/../wlw_ejb_crc//ejbgentemp\ejbgen-build.xml
post-ejbgen:
clean-ejbc:
Copying 7 files to C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build
WARNING: EJBGen ok. Compiling...
runjavac:
Compiling 3 source files to C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build
WARNING: All files compiled. Running ejbc...
<Dec 3, 2004 12:18:44 PM CST> <Warning> <EJB> <BEA-010212> <The EJB 'Book(Jar: C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build)' contains at least one method without an explicit transaction attribute setting. The default transaction attribute of Supports will be used for the following methods: local-home[createQuery(), remove(java.lang.Object), findByPrimaryKey(java.lang.Integer), create(java.lang.Integer)] local[getBookID(), getIsbn(), getName(), setPublisher(java.lang.String), getPublisher(), setAuthor(java.lang.String), setBookID(java.lang.Integer), remove(), setIsbn(java.lang.String), getAuthor(), setName(java.lang.String)] >
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:76: cannot resolve symbol
symbol : class BookBean
location: interface Book.Book
public final class Book_5wlu3i__WebLogic_CMP_RDBMS extends Book.BookBean
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:760: cannot resolve symbol
symbol : class Book_5wlu3i_Intf
location: interface Book.Book
Book.Book_5wlu3i_Intf beanIntf)
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i_Intf.java:39: cannot resolve symbol
symbol : class Book_5wlu3i_Intf
location: interface Book.Book
(java.sql.ResultSet rs, java.lang.Integer offset, Object __WL_pk, Book.Book_5wlu3i_Intf var)
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i_ELOImpl.java:15: cannot resolve symbol
symbol : class Book
location: interface Book.Book
implements Book.Book, weblogic.utils.PlatformConstants, java.io.Serializable
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i_LocalHomeImpl.java:13: cannot resolve symbol
symbol : class BookHome
location: interface Book.Book
implements Book.BookHome, weblogic.utils.PlatformConstants
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i_LocalHomeImpl.java:76: cannot resolve symbol
symbol : class Book
location: interface Book.Book
public Book.Book create (java.lang.Integer arg0)
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i_LocalHomeImpl.java:101: cannot resolve symbol
symbol : class Book
location: interface Book.Book
public Book.Book findByPrimaryKey(java.lang.Integer arg0)
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:244: cannot resolve symbol
symbol : variable super
location: class Book.Book_5wlu3i__WebLogic_CMP_RDBMS
super.setEntityContext(arg0);
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:257: cannot resolve symbol
symbol : variable super
location: class Book.Book_5wlu3i__WebLogic_CMP_RDBMS
super.unsetEntityContext();
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:269: cannot resolve symbol
symbol : variable super
location: class Book.Book_5wlu3i__WebLogic_CMP_RDBMS
super.ejbActivate();
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:490: cannot resolve symbol
symbol : class Book_5wlu3i__WebLogic_CMP_RDBMS
location: interface Book.Book
Book.Book_5wlu3i__WebLogic_CMP_RDBMS __WL_bean = null;
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:566: cannot resolve symbol
symbol : class Book_5wlu3i__WebLogic_CMP_RDBMS
location: interface Book.Book
__WL_bean = (Book.Book_5wlu3i__WebLogic_CMP_RDBMS)__WL_pm.getBeanFromRS(__WL_pk, __WL_rsInfo);
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:763: cannot resolve symbol
symbol : class Book_5wlu3i__WebLogic_CMP_RDBMS
location: interface Book.Book
Book.Book_5wlu3i__WebLogic_CMP_RDBMS __WL_bean = (Book.Book_5wlu3i__WebLogic_CMP_RDBMS)beanIntf;
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:763: cannot resolve symbol
symbol : class Book_5wlu3i__WebLogic_CMP_RDBMS
location: interface Book.Book
Book.Book_5wlu3i__WebLogic_CMP_RDBMS __WL_bean = (Book.Book_5wlu3i__WebLogic_CMP_RDBMS)beanIntf;
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:922: cannot resolve symbol
symbol : variable super
location: class Book.Book_5wlu3i__WebLogic_CMP_RDBMS
super.ejbLoad();
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:936: cannot resolve symbol
symbol : variable super
location: class Book.Book_5wlu3i__WebLogic_CMP_RDBMS
super.ejbStore();
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:950: cannot resolve symbol
symbol : variable super
location: class Book.Book_5wlu3i__WebLogic_CMP_RDBMS
super.ejbRemove();
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:1051: cannot resolve symbol
symbol : class Book_5wlu3i__WebLogic_CMP_RDBMS
location: interface Book.Book
case 0: __WL_loadGroup0FromRS(rs, offset, __WL_pk, (Book.Book_5wlu3i__WebLogic_CMP_RDBMS)eb); break;
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:1167: reference to + is ambiguous, both method +(java.lang.String,java.lang.String) in and method +(java.lang.String,int) in match
if(__WL_verbose) Debug.say("setting("+this+") 'author' using column " __WL_num ". Value is " + this.author);
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:1178: reference to + is ambiguous, both method +(java.lang.String,java.lang.String) in and method +(java.lang.String,int) in match
if(__WL_verbose) Debug.say("setting("+this+") 'isbn' using column " __WL_num ". Value is " + this.isbn);
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:1189: reference to + is ambiguous, both method +(java.lang.String,java.lang.String) in and method +(java.lang.String,int) in match
if(__WL_verbose) Debug.say("setting("+this+") 'name' using column " __WL_num ". Value is " + this.name);
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:1200: reference to + is ambiguous, both method +(java.lang.String,java.lang.String) in and method +(java.lang.String,int) in match
if(__WL_verbose) Debug.say("setting("+this+") 'publisher' using column " __WL_num ". Value is " + this.publisher);
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:1663: cannot resolve symbol
symbol : variable super
location: class Book.Book_5wlu3i__WebLogic_CMP_RDBMS
super.ejbCreate( arg0);
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:1702: cannot resolve symbol
symbol : variable super
location: class Book.Book_5wlu3i__WebLogic_CMP_RDBMS
super.ejbPostCreate( arg0);
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:1847: cannot resolve symbol
symbol : variable super
location: class Book.Book_5wlu3i__WebLogic_CMP_RDBMS
super.ejbRemove();
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:1907: cannot resolve symbol
symbol : variable super
location: class Book.Book_5wlu3i__WebLogic_CMP_RDBMS
super.ejbLoad();
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:1938: cannot resolve symbol
symbol : variable super
location: class Book.Book_5wlu3i__WebLogic_CMP_RDBMS
super.ejbStore();
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i__WebLogic_CMP_RDBMS.java:2072: cannot resolve symbol
symbol : variable super
location: class Book.Book_5wlu3i__WebLogic_CMP_RDBMS
super.ejbPassivate();
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i_LocalHomeImpl.java:80: cannot resolve symbol
symbol : class Book
location: interface Book.Book
return (Book.Book) super.create(md_ejbCreate_I,
^
C:\DOCUME~1\NICHOL~1.LAB\LOCALS~1\Temp\wlw_LibraryEJBProject_build\Book\Book_5wlu3i_LocalHomeImpl.java:105: cannot resolve symbol
symbol : class Book
location: interface Book.Book
return (Book.Book)
^
30 errors
ERROR: ERROR: Error from ejbc: Compiler failed executable.exec
ERROR: ERROR: ejbc couldn't invoke compiler
BUILD FAILED
ERROR: ERROR: Error from ejbc: Compiler failed executable.exec
ERROR: ERROR: ejbc couldn't invoke compiler
======================================================
What would be the cause of the error, would it be related to the way I create the datasource and the table? Or other causes, please help. Thank you.
Regards,
Nicholas LokIt's difficult to tell solely by the messages. One there seems to be a problem finding a base class. One thing that I notice is that the package seems to contain 'book' with a lower case 'b' as in:
EJB name: BookBean.EJB under LibraryEJBProject\book
Whereas all the error messages are saying that they are having trouble finding something with a package name like 'Book' with a capital 'B'.
Perhaps that is the problem, the package has to be consistently 'book' or 'Book' and can't be both.
Hope I'm right and hope this helps.
thorick -
How to compile and execute a Pro*C program on Unix?
Hello Gurus,
I am new to Pro*C. I just wrote a sample Pro*C program 'first.pc' to read some information from some tables and print it on screen.
I am not sure how to compile it and execute it to see the output of my very first program.
After searching a lot I tried following ..
-- Step 1 compile the program into .c program
$->ls -lrt first.pc
-rwxrwxrwx 1 sqloper4 staff 1069 Oct 31 03:39 first.pc
$->proc first.pc
Pro*C/C++: Release 8.1.7.0.0 - Production on Sat Oct 31 05:43:35 2009
(c) Copyright 2000 Oracle Corporation. All rights reserved.
System default option values taken from: /oracle/app/oracle/product/8.1.7/precomp/admin/pcscfg.cfg
$->ls -lrt first*
-rwxrwxrwx 1 sqloper4 staff 1069 Oct 31 03:39 first.pc
-rw-r--r-- 1 sqloper4 staff 0 Oct 31 05:43 first.lis
-rw-r--r-- 1 sqloper4 staff 6648 Oct 31 05:43 first.c
$->
-- Step 2 Generate the .o file
$->cc -I${ORACLE_HOME}/precomp/public -c first.c
first.c: In function 'main':
first.c:154: warning: return type of 'main' is not 'int'
$->
$->ls -lrt first*
-rwxrwxrwx 1 sqloper4 staff 1069 Oct 31 03:39 first.pc
-rw-r--r-- 1 sqloper4 staff 0 Oct 31 05:43 first.lis
-rw-r--r-- 1 sqloper4 staff 6648 Oct 31 05:43 first.c
-rw-r--r-- 1 sqloper4 staff 3709 Oct 31 05:45 first.o
$->
-- Step 3 After that link the .o to libraries and produce the exe
$->cc -o exe_name -L $ORACLE_HOME/lib -lclntsh
ld: 0711-317 ERROR: Undefined symbol: .main
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
$->
$->ls -lrt first*
-rwxrwxrwx 1 sqloper4 staff 1069 Oct 31 03:39 first.pc
-rw-r--r-- 1 sqloper4 staff 0 Oct 31 05:43 first.lis
-rw-r--r-- 1 sqloper4 staff 6648 Oct 31 05:43 first.c
-rw-r--r-- 1 sqloper4 staff 3709 Oct 31 05:45 first.o
$->After all above still I am not sure how to proceed and 'execute' the program.
Could you please help me with the steps to 'Compile and execute' a Pro*C program ?
Oracle DB Version : Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
OS : Unix
Thanks in advance!Hi All,
After reading Pro*C Question thread I have tried below steps to compile my .C program, but failed with the given errors
$->cc -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib first.c -o sample
ld: 0711-317 ERROR: Undefined symbol: .sqlcxt
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit statusAfter receiving above error I tried below command as an alternative
$->cc -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib first.c -o first -lclntsh -lsql10
collect2: library libsql10 not foundCould you please help in resolving above error? Whats missing exactly? -
How to compile and execute procedure from hr to scott
Hi all ,
I am trying to compile and execute a stored procedure from hr user to scott user.
first i gave grant command to hr.
By using:- grant create any procedure to hr;
After i compile a procedure from hr to scott.
create or replace procedure scott.sp_hr
is
begin
dbms_output.put_line('run by scott user');
end;
but it says :-
ORA-01031: insufficient privileges
01031. 00000 - "insufficient privileges"
any one help me.it works for me
20:29:29 SQL> 20:29:29 SQL> connect / as sysdba
Connected.
20:47:41 SQL> grant create any procedure to hr;
Grant succeeded.
20:48:01 SQL> connect hr/hr
Connected.
20:48:07 SQL> create or replace procedure scott.sp_hr
is
begin
dbms_output.put_line('run by scott user');
end;
20:48:21 2 20:48:21 3 20:48:21 4 20:48:21 5 20:48:21 6
20:48:23 7 /
Procedure created.
20:48:25 SQL> -
Compiler failed executable.exec
I'm using Weblogic 8, EJB 2.0, and Sybase for my project. I have a session bean and an entity bean which map to a table view in my database. When i tried to deploy the EJB, the following error messages appeared:
Compiler failed executable.exec
at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:274)
Does anyone know the cause of the error??
Thanks in advance
Regards,
JoeyI am also getting the same error and was wondering if you figured out what is going on.
I suspect it has something to do with the classpath, but I am not sure what it is.
A friend of mine also working on the same project does not seem to be affected and our
setup is almost identical. The only difference being I am using XP pro and she is on W2K.
It is driving me mad and any help would be greatly appriciated.
Thanks,
Hani -
Help on How to compile and execute awt programs
can any1 say how to compile and execute awt programs
Edited by: 863765 on Jul 18, 2011 3:29 AMEJP wrote:
The answer is the same for anycode.Oh, but it's not. If he starts with MyClass.java, and we tell him
javac MyClass.java
java -cp . MyClassthen that advice won't work when he creates MyClass2. The poor guy will be left lost and alone, with no clue how to proceed! {noformat};-){noformat} -
Does access scope change the way Object oriented code compiles or executes
I have started using Acess Scope (Private/Public/Protected/Friend) in my code and I am wondering if ti changes the way the software is compiled and executed.
I am suffering a 6 minute pre-load startup time and am scrambling to find aything that helps.
Tim L.
iTm - Senior Systems Engineer
uses: LABVIEW 2012 SP1 x86 on Windows 7 x64. cFP, cRIO, PXI-RTHi Timmar,
I don’t think that the Access Scope is the cause of this long pre-load time. However, you can try to set to public in order to see if that makes any change.
I think this long pre-load time could be related to how many files (VIs and dependencies) are included in your project. Also, if you move the Project folder to a different location (or computer) the next time that you try to open the project it will take a little while to open.
Regards,
Richard. -
How to compile and execute a generated file
Hi,
Can somebody help me please? My program goes like this:
I'm creating a program wherein there are two TextArea, left and right, and a button. The role of the left TextArea is where I will type a Java code (what i mean is a class). After typing, the next thing is to press the button. The role of the button, in a user side view, is to show the output of the written java code from the left TextArea to the right TextArea. To have an idea of the program I am creating please refer at this link, http://w3schools.com/html/tryit.asp?filename=tryhtml_tables. This is similar to what im doing.
My idea is to transfer all what are written in the left TextArea in a file using FileOutputStream and name the file by default as "Testing.java". Definitely the user shall be forced to write a class named Testing.java in the left TextArea. My question is, how am I gonna compile the generated Testing.java, run it at once and post the output at the left TextArea?
I hope somebody could help me regarding this matter. Below is my code I've done:
import java.io.*;
import java.awt.*;
import java.awt.event.*;
public class Test extends Frame implements ActionListener
private TextArea ta_code; //where the java code is written
private TextArea ta_output; //where the output of the java code will be printed
private Button btn_ExecComp; //compiles the program written in the ta_code. Execute's the generated class and print the result in the ta_output
private Panel btn_panel;
private Panel ta_output_panel;
private Panel ta_code_panel;
private Panel ta_panel;
private Panel main_panel;
private String str_code;
private String str_output;
public Test()
initialize();
setupObj();
public void initialize()
String text = "public class Testing \n";
text = text + "{\n";
text = text + " \n";
text = text + "public static void main(String args[]) \n";
text = text + "{ \n";
text = text + " //insert your code here \n";
text = text + "} \n";
text = text + "\n";
text = text + "} \n";
ta_code = new TextArea(text);
ta_output = new TextArea();
btn_ExecComp = new Button("Execute Code");
btn_panel = new Panel();
ta_code_panel = new Panel();
ta_output_panel = new Panel();
ta_panel = new Panel();
main_panel = new Panel();
public void setupObj()
btn_ExecComp.addActionListener(this);
btn_panel.setLayout(new FlowLayout());
ta_code_panel.setLayout(new FlowLayout());
ta_output_panel.setLayout(new FlowLayout());
ta_panel.setLayout(new FlowLayout());
main_panel.setLayout(new FlowLayout());
btn_panel.add(btn_ExecComp);
ta_output_panel.add(ta_output);
ta_code_panel.add(ta_code);
ta_panel.add(ta_code_panel);
ta_panel.add(ta_output_panel);
main_panel.add(btn_panel);
main_panel.add(ta_panel);
this.add(main_panel);
this.pack();
this.setVisible(true);
public void actionPerformed(ActionEvent ae)
if(ae.getSource() == btn_ExecComp)
str_code = ta_code.getText();
try
byte[] byte_code = str_code.getBytes();
FileOutputStream fos = new FileOutputStream("Testing.java");
fos.write(byte_code);
System.out.println("Testing.java successfully written");
* How am i be able to compile, run the generated class file and post the output at the right TextArea namely ta_output?
System.out.println("compiling...");
System.out.println("compiling successful");
System.out.println("executing...");
catch(Exception e)
e.printStackTrace();
public static void main(String a[])
Test t = new Test();
}Hi All,
After reading Pro*C Question thread I have tried below steps to compile my .C program, but failed with the given errors
$->cc -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib first.c -o sample
ld: 0711-317 ERROR: Undefined symbol: .sqlcxt
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit statusAfter receiving above error I tried below command as an alternative
$->cc -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib first.c -o first -lclntsh -lsql10
collect2: library libsql10 not foundCould you please help in resolving above error? Whats missing exactly? -
Is there a way to compile or execute mxml files on the Fly...
Based on the success on PHP which let me script on the fly,
just recently with the website
http://heroku.com/ that allow to
create ruby on rails applications from a web interface, what if a
apache module or some other of web server, perhaps Adobe
Application server allow via web interface to compile & execute
mxml files on the fly...
This will let everybody to go to a particular website sign-in
then start building applications in the Adobe Cloud...and name
their applications and edit all the mxml code perhaps with an AIR
based application.
I really can't wait to see something like this in adobe take
off....
Best Regards Dino.Based on the success on PHP which let me script on the fly,
just recently with the website
http://heroku.com/ that allow to
create ruby on rails applications from a web interface, what if a
apache module or some other of web server, perhaps Adobe
Application server allow via web interface to compile & execute
mxml files on the fly...
This will let everybody to go to a particular website sign-in
then start building applications in the Adobe Cloud...and name
their applications and edit all the mxml code perhaps with an AIR
based application.
I really can't wait to see something like this in adobe take
off....
Best Regards Dino. -
Hello
is it possible to execute a .class file which is n an other directory without changing directory ?
E:\FAC\PROJET\Demo>javac HelloWord.java
E:\FAC\PROJET\Demo>java HelloWord
Hello Word
E:\FAC\PROJET\Demo>cd..
E:\FAC\PROJET>java E:\FAC\PROJET\Demo\HelloWord
Exception in thread "main" java.lang.NoClassDefFoundError: E:\FAC\PROJET\Demo\HelloWord
E:\FAC\PROJET>How should I do ?
In fact my problem is that I have made a simple Java editor which can compile en run java code. When I open a java file which is situated somewhere on the drive, and I try to compile it works:
javac /somwhere/on/the/direve/myFile.javaBut it seems it is not possible to execute n this way.
My app is of course using runtime.exec(command); class to run the command.
do you have any ideas ?
Thank you !Try java -classpath %CLASSPATH%;.
HelloWord
For executing the class with the absolute path, use
java -classpath %CLASSPATH%;C:\Foo\Bar HelloWordwhere C:\Foo\Bar contains the class file. :) -
Generate, compile, load, execute code on-the-fly
Hi,
I'd like to make something that:
- 1) Generates Java source code (this I can do)
- 2) Compiles this generated source code (I found an unsatisfying solution)
- 3) Loads the newly created classes (I'm stuck here)
- 4) Executes them in this very same program. (That should be trivial once the classes are loaded)
The solution I found for 2) is to invoke the compiler through Runtime.exec(). Isn't there a more integrated solution ?
And for 3), I think there is something to do with a ClassLoader or so, I'll try to figure it out on my own in the meantime.
Thank you,
The Ultimate Koalasee maybe Jakarta BCEL on : http://jakarta.apache.org/bcel/index.html and : http://jakarta.apache.org/bcel/manual.html (Byte Code Engineering Library)
-
How to compile and execute a Jython script with parameters (?)
I am writing a scripting extension mechanism for a big server project we've built over the last year and a half.
What I want to acheive is:
- system authors upload scripts (via a web front end)
- the system checks and compiles the script
- stashes the compiled script away against a named event.
When the event occurs the compiled script is called by the server with a list of parameters (current user id, various numbers describing the system state).
Now I can upload and compile the script just fine using :
PyCode somePyCode = __builtin__.compile ( script, "<>", "exec");
...and deal with any errors ...and stash the script away against a named event...etc.
And it is easy enough to call this code with
aPythonInterpreterInstance.exec ( somePyCode );
but that doesn't pass my parameters through.
It seems to me there's three obvious ways to do this:
(1) specify that each script has a named target:
def onEvent(eventid , userid):
... and use one of the PyCode.call() methods
- but these aren't sensibly documented in the javadocs so it could take a while to figure out what's really going on.
(2) specify that each script contains a class def and implements a __call__ method - but I can't see how to get the PyClass object out of the PyCode object returned by __builtin__.compile
(3) put the variables into the local namespace and then execute the script (without a named method or class) - but this means that I would have to clean down the local namespace each time (- and anyway what is it local to?).
(Did I mention execution speed is important to this app and I need to service multiple threads?)
Thanks in advance,
Tony
ps. hope this isn't o/t to you.Some days you just know the synapses aren't talking.
Of course when you exec() py code with def'd functions and class definitions in you're not executing the function(s) but defining them. Meaning that my question was all back to front in the first place.
All four copies.
Maybe you are looking for
-
Using a viewobject with foreach tag in .jsp
Hi guys I have the following scenario: 1- I call a certain .jsp page 2- a controller class (extends servlet) is called, this class: takes a view object (let's call it view), executes it's query, forwards the result to the jsp page. 3- jsp page has a
-
SQL (Reverse) not working in Forms 6i
Hi: Env 6i c/s 8i DB. SELECT REVERSE ( '321' ) FROM DUAL works in SQL*Plus but does not accept the REVERSE function from within a Trigger. I could put the logic in a Package on the DB but I'd like to know why it does not work in F6i ? Thanks N.
-
Just purchased Xcelsius Server 2008 and it will not open
I have been using the xcelsius 2008 server trial edition and decided to purchase the full product. After I paid, I received a product key and a link to download. When I open the trial version, it has a link to enter a product key, so I entered the
-
Solution Manager Upgrade Issue for "Business Process Monitoring"
Hello, We had upgrade Solution Manager 7.1 SP08 to SP11. Earlier our BP Monitories were working fine which are not working now, also we are not able to use function "Load Monitor".
-
Hello all, I use Flash CS4 with AS3. I have a problem with the site preloader. When I simulate the loading it is "invisible" for a while and then show up starting loading from ~ 24-27% or maybe ~55% To resolve this some people suggested me to crea