How to run the java file from notepate or jedit
i hope u will solve my probs
JEdit has a JCompiler plugin to allow compilation and a Console plugin to allow execution.
Similar Messages
-
How to run standalone java file from weblogic server on Solaris
Hi,
We have a requirement to run a java file at a scheduled time in a day using cron scheduler on our linux server.
We need to fetch data from the database & perform some business logic in this standalone JAVA file.
Our application has an EAR which is deployed on Weblogic 10.3 server & in our application, we are utilizing the datasource created in that domain.
Now, we have created a standealone Java file & used exisitng datasource (without Hibernate) of the domain with the help of below forums,
Use DataSource of weblogic in a standalone Java file
able to achieve the same.
I've bundled this JAVA in application WAR & depoyed on the same domain where datasource is created.
Now, how can I execute this file from anywhere on the server using weblogic classpath.
Please help on the same in implementation.
Thanks,
UttamIf the Java application must be stand-alone you must not deploy it on WebLogic, then WebLogic will manage its lifecycle.
In this case you can use the CommonJ API and use the timermanager if it must run on a certain time. More information
of how to do this can be found here: http://middlewaremagic.com/weblogic/?p=5569
If you keep the Java application stand-only and want to use a cron job you can follow the example presented here: http://middlewaremagic.com/weblogic/?p=7065
Note that the example runs a WLST script, but you can follow the same steps to run your Java application. -
How to run the java program from another directory?
Hi
Assumption:
data.java is in a package suncertify.db and place in a directory c:/code/suncertify/db/ directory
data.class file: is in c:/code/suncertify/db/ directory
current directory: c:/
How can execute the data.class directly in c:/ directory without changing directory to c:/code/ ?
Thanks in advance,
AdrianYes. You can use the -classpath and -sourcepath options to specify where to look for source files, and the -d option to specify where to generate the class files. Look up the usage of those options in the javac documentation:
http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javac.html -
URGENT: How to run a Java program from a different directory?
Hi.
How do I run a Java program from a directory that the file is not located in? So lets say im in c:\Java. But the file is in c:\Java\abc\efg\.
What would be the command to run the Java file from c:\Java.
I can't remember it and I need it asap.
Cheers.If the class you are trying to run is MyApp.class, try
c:\Java\>java -cp abc\efg MyAppThe actual classpath you specify will depend on whether or not MyApp.class is in a package (I've assumed it isn't) and whether or not any 3rd party jars are involbed (I've assumed not).
Edited by: pbrockway2 on Apr 1, 2008 6:42 PM
The command arguments read as "Run the MyApp class using as a classpath abc\efg relative to here (c:\Java)". -
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 -
How do you run another Java file from a master Java file?
We're making a game in Java at school, and we need to know how we can run a Java file from another one - like inside the master Java file, we need to have a command to run game.java (something like that). Thanks!
We're making a game in Java at school, and we need to know how we can run a Java file from another one - like inside the master Java file, we need to have a command to run game.java (something like that). Thanks!One doesn't "run a Java file", and there's no conventional definition of "master Java file". If you want to call the main() method of another class, just make sure the class is in your classpath and call the method. If you want to start up a separate JVM with that class as a process, use Runtime.exec() or similar method.
~ -
How to access the *.java file corresponding to a TypeElement T?
Here is a problem:
How to access the *.java file corresponding to a TypeElement T from a AnnotationProcessor environment?
Let us say the hook method
public boolean process(Set<? extends TypeElement> annos, RoundEnvironment roundEnv)
is invoked with a TypeElement T such that T.getQualifiedname() = "a.b.c.X"
And the problem is how to locate the file that has the *.java source code for a.b.c.X?
That is the file that has the source code for a.b.c.X say "some/path/a/b/c/X.java"?
For simplicity, let us assume that TypeElement T corresponds to a top-level Java class.Pinaki wrote:
That is not something you as the annotation processor author should be asking about. That is something you the person configuring the javac environment should set up via the -d option or its equivalent.
I strongly recommend using a separate output directory hierarchy.That is the way the current implementation is. The annotation processor takes a -Aout= <some directory path> to write generated output relative to a user-specified location (which defaults to the class output location).That is contrary to the design of the annotation processing facility. The intended use is for that information to be configured via options like "javac -d".
Additionally, IMO it is a serious configuration error to put generated files and input files, presumably tracked under version control, in the same directory. Interesting you said that. We are just running some "field trial" with these things and some users want them to be in the same directory of the original *.java files (especially when their source files are spread across many roots) .
Who knows what the user wants?The user does and the user is free to (mis)configure their environment however they like ;-) However, that is the user's option and the user has control of this via the javac command line. The annotation processor is not the proper place to configure this setting; see slide 7 of http://blogs.sun.com/darcy/resource/J1_2006-BOF-0606.pdf for some thoughts on different roles in annotation processing.
presumably tracked under version control, in the same directory.version control is another 'usability issues' that we are trying to get our heads around with this stuff. "To check-in or not?" - that seems to be the question. When presented these facilities without any cue, "the users" were divided -- some wanted them to be checked-in, some did not. The context where these generated files being used -- there exists some rationale to check them in a version control system.The right answer depends on the circumstances, but IMO generally generated files should not be checked in under version control, especially if they are derived from other source files. Checking in generated files of this nature just creates the opportunity for them to get out of date with the originating files. -
How to run the .jpx file?
I have made the project using jbuilder in .jpx. how to run my project without jbuilder?
I tried to running the demo file from JBuilder.
I have followed the steps, but still error.
I did the steps bellow:
cd {my project\classes}
C:\Program Files\JBuilder6\sampless\IPWorks\telnet\classes>C:\java\bin\java -cp . UnnamedPackage.dep2.TelnetDemo
the error was:
Exception in thread "main" java.lang.NoClassDefFoundError:UnnamedPackage\dep2\TelnetDemo
and then I set CLASSPATH=C:\Program Files\JBuilder\sampless\IPWorks\telnet\classes
the error is the same.
when the command was C:\Program Files\JBuilder6\sampless\IPWorks\telnet\classes>C:\java\bin\java TelnetDemo
the error was:
Exception in thread "main" java.lang.NoClassDefFoundError: ipworks/IPWorksException
in the classes dir, there is package cache dir and the inside of this dir there is a file UnnamedPackage.dep2
So whats wrong with my command? -
Hi Experts,
I am trying to implement automatic cache purging every day at specified time and i created txt file with SApurge All cache() and created bat file with nqcmd -q Analyticsweb -u username -p password -s (txt file location).
Now i want to run this bat file daily at specified time with out executing manually may i know how to run the batch file at specified time .
Thanks,There is task type as command in workflow manager if you want you can go for that during the load
nqcmd -d "AnalyticsWeb" -u Administrator -p Administrator -s "D:\PowerCenter8.1.1\server\infa_shared\SrcFiles\1_BIPurgeCache.txt"
Check these urls
http://docs.oracle.com/cd/E12103_01/books/AnySched/AnySched_Scripts3.html
http://deliverbi.blogspot.com/2011/12/purge-all-cache-from-dashboard.html -
How to recovery the deleted files from hard disk like images,media files
How to recovery the deleted files from hard disk like images, media files by using c#.net
It's important to define deleted and recovery. You can recover file from the recycle bin using the Win API. Here's an
example in C/C++. You need to
pinvoke SHFileOperation. -
How to run the 9I report from the forms menue 9i
how to run the 9I report from the forms menue 9i.
Shehzad LatifHi,
1. create a Reports Object node in Forms. If you use teh same object node name then you can write generic code that works in all Forms
2. Get the whitepaper about Forms/reports integrtion
http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf
Frank -
How to run the perl script from java ?
Hi , I need to run the pearl script from the server and to get the result of the script thro' java using SSH
Is there any 3rd party SSH API in java ?
Please help me out
thanks in advance
karthikThis seems like a very strange thing to want to do.
What is the perl script doing?
Do other programs (not some shell script) access this server-side perl script from a different machine?
If so how do they do it?
What currently triggers the perl script to execute?
What currently handles the output from the perl script?
If you can answer these questions (and understand the answers) you should be able to come up with a different approach to this.
You do not really want to call a remote perl script from a Java program, you want to achieve the effect you think that would have if you could do it.
So find the answers to the above questions, write them on 3" x 5" cards and lay them out on your desk.
What flow of control needs to happen? Which piece of code needs to produce or consume which piece of data?
If that fails, ask you self or who ever is making you do this what are the use-cases?
If you do not know what use-cases are or do not understand them well enough try reading
Use Case Modeling (The Addison-Wesley Object Technology Series) by Kurt Bittner and Ian Spence (Paperback - Aug 30, 2002)
http://www.amazon.com/s/ref=nb_ss_gw/002-7908514-4043267?url=search-alias%3Dstripbooks&field-keywords=use+cases&x=0&y=0
It is a short and easy to read book on the subject and also one of the best.
You MUST understand WHAT you are trying to achieve before you can decide HOW you are going to achieve it. -
Running the Java Code from Batch File
Hi All,
I have run a code sucessfully in Eclipse and it uses Logging API from Java
When i try running the same program from batch file it throws error
java.io.IOException: Couldn't get lock for log\Properties_Log_16Sep2009_150229
at java.util.logging.FileHandler.openFiles(Unknown Source)
at java.util.logging.FileHandler.<init>(Unknown Source)
at com.adidas.SPM.LogMessage.<init>(LogMessage.java:26)
at com.adidas.SPM.MainApplication.initialize(MainApplication.java:51)
at com.adidas.SPM.MainApplication.main(MainApplication.java:102)
I am working on a windows systems the folder log has all the permission i have provided with all
Not sure why the code runs like this
The batch file is like below
set CURR_DIR=%CD%
cd %CURR_DIR%\bin
%CURR_DIR%\jre6\bin\java -classpath .;%CURR_DIR%\lib\FirstProject.jar com.test.MainApplication
echo %ERRORLEVEL% The Error Level
echo SUCCESS
GOTO END
:END
pause
Rgds
AdityaVikash.SunJava wrote:
According to me the problem is that there are many instances trying to access the same property file. Nothing wrong with that since they only are reading it.
The best way to do is that create a schedular in Windows that runs at some predefined interval (say 1 minute).Huh?
>
What will happen is if your program runs for more than a minute even then the new process will not start until old process is autaomatically killed. Please do not check this option if you want the program to exit normally.
If the Task is still running stop at this time
O_o -
I interfaced ENA 5071B using labview with agena vi. I need to save the s2p file from the network analyzer.. I am requesting you guys to help me and pls suggest wat kind of vi i need to use from agena.....
ThanksThe PNA driver does not have the vi to full support what you want. The SCPI commands to do what you want are:
MMEMTOR:TRAC:FORMNP MA; - to format the data in Mag dB Phase linear.
CALC1ATA:SNPORTsave '1,2' , 'local file name on PNA file system.s2p' - to create PNA local files of s2p data
MMEMory:TRANsfer? 'controllerfilename.s2p' - to transfer the datafile from PNA to test controller using GPIB block transfer.
You will have to create these SCPI commads and VI's for yourself as the driver does not have them built in.
Good luck. -
Not able to run the Java Program from jre for the ARM processor
Hi ,
I am try to run the jre1.4.2 for the arm core (linux 2.6kernel) which i downloaded from the sun site.
I am created the class file from the J2SE1.4 development kit. I created the simple HelloWorld Program and complied with J2Se then i copied that class file into my IMX board which has ARM core.
When i run the commnd java HelloWorld i am getting this error
dl failure on line 765Error: failed /dev/shm/jvm/j2re1.4.2/lib/arm/client/libjve
Please give me some suggestion to solve this porblem
Thanks in Advance
NarendraI JRE i have download from the sun site . But when i am trying to run the simple helloWorld program in that it is giving the below error.
error:
dl failure on line 765Error: failed /dev/shm/jvm/j2re1.4.2/lib/arm/client/libjvm.so because /dev/shm/jvm/j2re1.4.2/lib/arm/client/libjvm.so: symbol __divdf3, version GCC_3.0 not defined in file libgcc_s.so.1 with link time reference.
Can anybody help me in this how to solve this problem . I also searched in the forum but did not get any answer on that problem
Thanks in advance.
Narendra
Maybe you are looking for
-
Printer turns off even though is connected on MacBook
Hi all, I got my dad a MacBook to replace his Dell. A lot of complains aroused since the switch and managed to answer most to him. However, one I cannot figure out is the following. When we had the Dell we left the printer connected to the laptop and
-
How do I gift a tv season?
Sorry this sounds like a stupid question but I'm trying to gift a tv season for $3.98 but when I click gift this tv season it sends me a window that says "Payment Information Required. A method of payment is required to buy an iTunes Gift. You can ad
-
Messages in forms for stored procedures/functions
Hi! i wand to send message or raised exception from the stored procedure/function to the oracle forms during processing . how can i do this Thanking U
-
I can't download Jdeveloper 11.1.1.3 from JDeveloper download page. Does anyone know how to donwload Jdeveloper software? When I click the" jdevstudio11113install.exe ", it open antoher web page to ask for download locatoin. After that , nothing happ
-
Hi All, I configure OVD with Oracle and Sun One LDAP server and now i configure OAM with OVD for user repository, when configuring i am getting only LDAP users (ie sun ldap users) but not oracle , do i need to do anything else to see all the users pr