how to deal with java programs in EditPlus
This post may help you to deal with Java Programs in the EditPlus – a famous editor for many different type of files (for example, .java, .css, .html, .sql, .txt etc).
One more similar editor is TextPad, which can directly deal with Java applications as its taking the Java Compiler by default from the installed location in the machine it is running. Thats one advantage with that.
What exactly do i mean to say “dealing with Java applications”? Does it mean typing the source code? Absolutely NOT! That does not require any special settings and you can start typing as you would with any other file. I mean to say, “Compiling” and “Running” of Java applications.
In EditPlus, we cannot direclty deal with Java Applications and they need some sort of settings to do that. Lets see them one by one.
1. Options to set for Compilation (“javac”):
Go to “Tools” Menu -> and click on “Configure User Tools…” option.
Click on the individual images to see the full-size screenshots if it does not display the image in full.
Every image has the required description and explanation for the step.
Image1: Clicking on “Configure User Tools…” Option in the “Tools” Menu
It will open a new dialog box where in you can enter your details to configure for the tools.
Image2: The Initial Groups and Tools Window dialog box
Image3: Clicking on “Add Tool” button in the Dialog box
Image4: The Initial window on “Add Program”
Image5: Configuring “javac” for compilation – step 1
Image6: Configuring “javac” for compilation – step 2
Image7: Verifying the “javac” tool added in the “Tools” Menu
2. Options to set for Execution (“java”) :
Image8: Configuring “java” for execution
Image9: Verifying the “java” tool added in the “Tools” Menu
Image10: Compiling a Java Program
Image11: Running (Executing) a Java Program by giving the command line arguments
Image12: Output of running the Java Program with command line arguments
Image13: Output of running the Java Program without any command line arguments
Hope the series of screenshots helped you configure and run a Java Program in EditPlus.
I have blogged this steps as i have seen this in one of the threads in JavaRanch. But still, i would suggest you to just proceed with Notepad and the normal Command Window if you are in the beginning stage because the ordinary plain text editor like Notepad will help you improve your language syntax by not having any support for syntax highlighting!
It would be so nice if you could please share your feedbacks and suggestions if any for the improvement of the material.
Is there a way to debug the java programs step by step using breaks etc.. using EditPlus
Its vry easy to understand and implement
@ formeoct,
Yes there are ways. But its possible only in IDEs (Integrated Development Environment) which could get the complete Java Runtime Environment for the program and facilititate the user to debug.
Whereas the Editplus is just an enriched editor that adds a little bit of value by having syntax highlighting, ability to compile and run the programs etc.,
You may please consider using the IDEs like Netbeans, Eclipse etc for the debugging purposes.
its very good and simple to understand thanks
raghs
I have Editplus latest version v 3.0 and it doesnt have any checkbox like “prompt for arguements”.So how should i run my java programs which has invovle values taken from users. Please help me out.
In such case you can set under argument text box of preferences dialogue box as:
Argument :$(FileNameNoExt) $(Prompt)
here a white space between “$(FileNameNoExt)” and “$(Prompt)” is mandatory.
I have agin faced another problem with it how to compile a package(User defined)
@krishnaveni,
welcome here! 🙂
//its very good and simple to understand thanks
raghs//
am glad that you found it very useful. thank you krishnaveni! pleasure is mine 🙂
@Aparajitha,
welcome here!
//I have Editplus latest version v 3.0 and it doesnt have any checkbox like “prompt for arguements”.So how should i run my java programs which has invovle values taken from users. Please help me out//
no idea.. i used v2.12.. it should have all.. have u followed the procedures? please let me know how u r doing it?
@Aparajitha,
//I have agin faced another problem with it how to compile a package(User defined)//
I don’t think you have to do something explicit or special. The same helps you to compile the java classes belonging to user defined packages.
Just try doing or let me know how you do it.. so that i can try to help you further!
Thanks for dropping and commenting!
I have the similar problem as Aparajitha regarding user packages.
I’m not able to run the class which is compiled using edit plus, ‘coz it runs the class by simulating the following comand:
java mypack/MyProg –which is not valid acc to java
it should use the command in the following way:
java mypack.MyProg
thanks a lot..
It was quite well explained .
Nitin
how to compile java code that requires certain library files for compilation
Hello everybody, my name is Damion, and I’m glad to join your conmunity,
and wish to assit as far as possible.
@Sathish and Aparajitha,
Thank you. That’s a valid point and i have not tested that basic but important feature! 😦
After your replies, i just tried working out. But i could not achieve it directly. Instead i can do it through a work around.
I have tried in both EditPlus 2.2 and the latest version 3.3.
In EditPlus 2.2
==========
I am able to compile the classes in user defined packages without any hassles.
Only problem is when running a java program. I had given the package name in the configuration window (in your case, i had given the following:
1. “mypack.$(FileNameNoExt)” in the “Argument:” option
2. “” in the “Initial directory:” option.
It worked fine. I know this is difficult as you have to keep changing the aforesaid 2 options for every program with a different package structure.
In EditPlus 3
=========
I think it works in a very different way. I can’t even compile the classes with and without user defined packages. I have to try a bit more and shall get back to you.
Hope this may help atleast to certain extent. There is a way with a bit overhead.
Thank you guys! Glad that you found this post to be useful.
Cheers! 🙂
ouch.. in the prev reply, the option was misinterpreted as part of html tag i guess.. as i had given it inside the angle brackets..
In Editplus 2.2 configuration,
2. “The parent directory of the mypack directory” was given in the “Initial directory:” option.
For example, if you had placed the ‘mypack’ folder inside “C:\JavaPgms\Userdefined\mypack” you need to give the
“C:\JavaPgms\Userdefined” in the “Initial directory:” option.
@Nitin,
Welcome here. Its my pleasure and i am glad that you found this post to be useful 🙂
@Shweta,
Welcome here. 🙂
//how to compile java code that requires certain library files for compilation//
I guess it can very well be achieved by giving the options for “java” and “javac” commands. For example, if you need to mention the .jar files for compiling,
“javac YourPgm.java -classpath XYZ.jar” OR
“javac YourPgm.java -cp XYZ.jar”
The XYZ.jar have to be specified with its location where it is present. Try out and let me know.
Thanks for dropping by!
@DamionKutaeff,
Welcome here. Thanks for the offering! 🙂
when i compile prog it giive me error that..
error: cannot read: first.java
and aftter running program….the output
———- Run Java Program ———-
java.lang.NoClassDefFoundError: first
Exception in thread “main”
Output completed (0 sec consumed)
@kuldeep,
welcome here!
By looking at the error you get at compilation time itself it is evident that your compilation was not successful at all.
From which directory you are running your program? It does make sense and with which only the JRE searches for the .class file.
Is your class under any specific explicit package?
Well Liked it what you all have discussed above.. Long back I have used Edit plus to compile and run my Java programs.. Today I was just remembering all those stuffs.. But was king of forgotten.. I saw this website and it was very helpfull… Nice Job Guys…
@Sumit Kumar,
Welcome here! Thanks for the compliments. I am glad that you found this post useful! 🙂
Good work dude!!!It was very useful and easy too
one prob
Compiles fine but on runtime it gives an error
java.lang.NoClassDefFoundError
Exception in thread “main”
Output completed (0 sec consumed)
plz help me out
@Suchit,
Welcome here!
//Good work dude!!!It was very useful and easy too//
Glad that you found it useful!
//java.lang.NoClassDefFoundError
Exception in thread “main”//
How are you actually executing it? It is all with the path/folder Editplus searches for the .class file. Just check one of the previous comments where i have clearly explained the steps!!
Sorry for the delayed response!!
If you still got stuck, let me know! Good luck 🙂
@Suchit,
you’re getting no classfound because (as Raghs mentioned), java can not find the .class file. In order to get rid of this, when configuring your user tool, in the text box called Initial Directory, ensure that you have “$(FileDir)” for both the compile and run time commands.
hii evryone…….
thanks for maintaining such an informative blog…!
well sachin n raghs…… am facing the same problem as suchit……….
pls guys….help out………
not able to run any program……
‘coz wen am tryin to run any java program,the following is being displayed
java.lang.NoClassDefFoundError
Exception in thread “main”
Output completed (0 sec consumed)
@raafiya ,
Welcome here and thank you for the nice words!!
//java.lang.NoClassDefFoundError
Exception in thread “main”
Output completed (0 sec consumed)//
This basically comes when the .class file is not being able to be picked up! Can you please check your settings on running the java application? It would be great. If not, send a mail to me with the screenshot of your settings.
@sachin,
Welcome here and thank you for the descriptions 😉
actually am gettin the same error msg wid command prompt also….!!!!!
@raafiya,
kindly send a mail with screenshots with settings you have. also give some more details on your directory structure of your programs!
Great to start with….Thanks Raghs…
@Rafiya… as Raghs has suggested you to check your settings.. You might check this site to find out what he means….
http://labs.cms.gre.ac.uk/java/editplus.asp
@sanjib,
Welcome here! Thank you very much for the comments Sanjib! 🙂
hi
i m getting problems with classes within same package..there r 3 classes “protection”,”derived” n “samepackage” within “package1”.
“protection” is declared public,”derived” is subclass of “protection”.
problem is “samepackage” cant access “protection” althought i used object of it..
plz help…
and derived also can not access “protection n i get errer….
———- Compile Java Source ———-
derived.java:2: cannot find symbol
symbol: class protection
class derived extends protection
^
derived.java:7: cannot find symbol
symbol : variable n
location: class package1.derived
System.out.println(“n=”+n);
^
derived.java:9: cannot find symbol
symbol : variable n_pub
location: class package1.derived
System.out.println(“n_pub=”+n_pub);
^
derived.java:10: cannot find symbol
symbol : variable n_pro
location: class package1.derived
System.out.println(“n_pro=”+n_pro);
^
4 errors
Output completed (0 sec consumed)
@tanvi,
welcome here.
Where exactly your .class files are getting stored? That means, which location/directory you are storing the compiled .class files of all these source files?
I have java setup with editplus but anytime i try to run code with Scanner in it, it just freezes and i have to close java from the task manager. I can run the code in other apps and it works fine. what am i doing wrong??
@Muhammed,
Thanks for dropping in and welcome here!
//I have java setup with editplus but anytime i try to run code with Scanner in it, it just freezes and i have to close java from the task manager.//
I presume you use Java 6.0 with Editplus. To be frank, I have NOT tried it out yet.
But I guess there is no proper leverage between the console/terminal and the client (Editplus). Just try it out by using appropriate flush() and/or close() methods.
thanks for your info…it was useful for me a lot
@sahul vetcha,
Welcome here and thanks for dropping by!
//thanks for your info…it was useful for me a lot//
I am glad that you found it useful 🙂
Hey, Thanks for a detailed tutorial.
Great work. I really appreciate it.
Thanks again.
This post of yours was really useful to help me compile and run java pgms in EditPlus.
Thank you so much!
It was all well explained.
Keep it up!
hi raghs,
your tips were very helpful !!!!!!!!!!!!
but i am unable to find “prompt for arguments” option in order to run the program using command line arguments where do i find it???????
please help me
thanks,
raghu
hey thanks for all the useful info…but i still have an unusual problem….unlike everybody else im getting no errors at all!!!…no matter what i do, i wont get errors…?…. can anyone tell me what the problem is?
Hi there,
I have set up the edit plus according to the steps explained above.
But it is not compiling and creating my program when I compile it.
Please kindly explain me how to set the path to store the .class files.
Because when I compile it no class is generating in the source file directory. And when I run the program its giving NoClassDefinationFound exception.
Hey Please Ignore my previous post. Now I can compile my java programs and see their output in edit plus itself.
Thanks for your help..
@sudheer,
glad you find it useful and resolved. Thanks for dropping by!
even tough followed the same settings am getting
Exception in thread “main” in edit plus plz help me
Very well done! 🙂
My congratulations!
The instructions are well-organised and easy-to-follow.
Do u know how to get an output window in editplus when compiling and runnig the code how it is possible to see an output in a separate window for example when we use applet code, or code which requests to enter the text and click the button etc so that we will see these buttons and all program in a separate window.
I will appreciate any help.
I am looking forward to hear from you.
Kind Regards,
Emily
i am getting this error .. can anyone please help me !
———- Compile Java Source ———-
Output completed (0 sec consumed) – Cannot run the application
This is really very helpful.
Thanks a lot!!!
Hi,
I am geting below error while compiling a program. Please help me!!!
———- Compile java Program ———-
Failed to run the application
Output completed (0 sec consumed).
Hi,
If u r getting below error. Please specify the javac & java exe along with the respective executable path.
For ex : C:/jdk1.5/bin/javac.exe
———- Compile java Program ———-
Failed to run the application
Output completed (0 sec consumed).
when i am running the javafile in editplus
it opening the cmd prompt how to overcome?
Thank you verymuch sir
Thank you very much sir
hi all the techies in this group……i am new to this group and i am new to java language…i am using EDITPLUS 3.0 version ..i follow the instructions as mentioned in this blog …but i am not getting any output………please help me…….
@harsha,
Sorry for the delayed reply. You can avoid that by checking on the “Capture output screen”.
Try that and let me know.
@Divya,
Thanks for dropping by. Glad you liked it.
@Srinivas,
Thanks for dropping by and welcoming you to the Java world!
what exactly you are getting? Can you let me know the error message what gets displayed so that I can try to help you further.
Harsha….thanks for removing my confusion ………i am very thankful to you…keep good work
harsha it is compiled but when i run the program it gives Exception in thread “main” java.lang.NoClassDefFoundError:(java prog name)
plz help me out
thnx for this information…
installed JDK at C:\jdk1.6.0
i set the classpath in my system
installed editPlus
did the same(EDITPLUS+JAVA as above)
I found this error in my system
———- Compiler ———-
javac: file not found: Test.java
Usage: javac
use -help for a list of possible options
———- JVM ———-
java.lang.NoClassDefFoundError: Test
Exception in thread “main”
Output completed (0 sec consumed) – Normal Termination
Hi Naren,
Have you given the initial directory option in the configure user group tool option.
Regards
Sivashankar.r
hi..how can we pass input to output window in edit plus software for java programs..it is not accepting the input..i mean..i’m unable to pass input from keyboard to java programs..please help me out..
@Shirisha,
Welcome here and thanks for dropping by. Sorry for the delayed reply.
You can pass input from your keyboard provided you had checked in an option “Prompt for Arguments” while configuring Editplus for “Java” — Running your Java programs. Please click on the Image 8 so that you can see it in the full/maximized form.
Hope this helps!
Good luck 🙂
hey raghs , nice and informative blog….helped me a lot !! 🙂
@Sandhya,
Welcome here. Thanks for dropping by!
Glad that you like the post and it was of good use. Thank you for your compliments !! 🙂
I have used your steps for compiling and running the program.but I keep getting the message that says “Output completed (0secs)- Cannot run the application”. And also I have Editplus latest version v 3.0 and it doesnt have any checkbox like “prompt for arguements”. I’m really confused and was wondering if you can have my editplus working?
Hi Roshan,
I also use the latest editplus. Are you really following the steps I had described earlier? Cannot run the application may be for a different cause.
If you try following the steps exactly as what I had mentioned, I am sure you would reach the goal. Good luck and let me know if you need any further help.
hi raghs.
i am glad to thankful to u .bcoz of tips are helpful me.so i have another doubt . can we run java program without entering arguments?
plz help me. i think there is way to do it. but i forgot
@Jagan,
Welcome here and thank you very much for your comments 🙂 Glad that you liked it!
Yes of course. we can very well run the programs without any arguments. With the same settings you can run by simply pressing an enter in the window which waits for your argument inputs.
Just try it out. otherwise, you can alter the settings so that it does NOT ask any user input. Save the settings and run again.
Good luck. Let me know if you face any issues.
thanks for your info…it was useful for me a lot
I am glad that you found it useful
thanks for your info…it was useful for me a lot
keep it going………………
@Smita,
Welcome here. Thanks for the comments! 🙂
tnq broth its very usefull 4 me….m new 2 this application so working on it!! nice work
I am able to compile the program. But when I Run it , it gives me
———- Run Java Program ———-
java.lang.NoClassDefFoundError: test
Caused by: java.lang.ClassNotFoundException: test
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: test. Program will exit.
Exception in thread “main”
Output completed (0 sec consumed) – Normal Termination
This means the CLASSPATH is not set.
Can you tell me how do you set the classpath ?
Your post helped me configure EditPlus to run Java programs. But when i run the program cmd is invoked where the output is displayed which i personally find it inconvenient. I would rather like the output to be displayed in Editplus window itself(At the bottom as shown in the tutorial). Pls help me configure..
@ Aparajitha on Thursday, February 14, 2008
Hi i was just searching for my queries and i happen to read urs.
Any ways ur solution is, after selecting the option for Argument: $(FileNameNoExt)
give one SPACEand select another option $(Prompt) at the same place and it would prompt u for the arguments
Hii shrey,
thnx for ur post , actually i was facing problem wit “promt” but after reading ur post i came to know that i have to give “a space” between $(FileNameNoExt) and $(promt)….now its working. tnk u
while am compiling java program………..
———- Compile Java Program ———-
Output completed (0 sec consumed) – Cannot run the application
this error is displayed………
what’s wrong?
HI
my editplus is able to compile and run the java program but it is showing an error to declare the class path
Exception in thread “main” java.lang.NoClassDefFoundError: $(file
i finally got it..but still had one doubt..where to create directory and files…????
got this msg..
———- Compile Java Source ———-
javac: file not found: HeloWorld.java.java
Usage: javac
use -help for a list of possible options
Output completed (5 sec consumed) – Normal Termination
sorry..got this msg..
———- Run Java Class ———-
java.lang.NoClassDefFoundError: HelloWorld/java
Exception in thread “main”
Output completed (0 sec consumed) – Normal Termination
am not getting that arguments window to enter arguments..please help me
Hi ,While iam installing the edit plus in my win7 machine getting the message “some of the files could not be created .please close all application,Reboot windows and restart this instalation” kindly help me on this .
Hi,
I am a new user to Edit plus Ver 3.12 and I need to use it to debug some VBScripts. Could you please give me some basic pointers on how setup the config tool so I am able to debug a VB Script. Any help would be greatly appreciated
excellent answer, i am searching for hours how to achive it
Hi there, I discovered your web site by way of Google whilst
looking for a similar subject, your website got here up, it looks great.
I have bookmarked it in my google bookmarks.
Hello there, simply become aware of your weblog through Google, and found
that it’s truly informative. I am gonna watch out for brussels. I’ll appreciate if you happen to continue this
in future. Numerous people will probably be benefited from your writing.
Cheers!
I was recommended this web site through my cousin. I’m not certain whether this submit is written through him as nobody else understand such specific about my trouble. You are wonderful! Thank you!
Asking questions are in fact fastidious thing if you are not
understanding anything completely, but this paragraph gives nice understanding even.
Hello There. I found your blog using msn. This is a really well written article.
I will make sure to bookmark it and come back to read more of your useful info.
Thanks for the post. I will definitely return.
What’s up, I check your blogs like every week. Your story-telling style is awesome, keep it up!
I usually do not leave many remarks, however i did some searching and wound up here how to deal with java programs in EditPlus BlogsOfRaghs.
And I actually do have a few questions for you if you usually do
not mind. Could it be just me or does it look as if like some of the
responses appear like left by brain dead visitors?
😛 And, if you are writing at other social sites, I’d like to keep up with anything fresh you have to post. Would you make a list of all of your community sites like your Facebook page, twitter feed, or linkedin profile?
Hello every one, here every one is sharing these kinds
of knowledge, so it’s nice to read this website, and I used to pay a quick visit this website everyday.
What’s up i am kavin, its my first occasion to commenting anyplace, when i read this paragraph i thought i could also make comment due to this good piece of writing.
No matter if some one searches for his necessary thing, so he/she needs to be available that in detail, thus that thing is
maintained over here.
Thanks for help…………….It is so easy to implement as well as to use. Again thanks a lot……………..
hi,
i have compiled and have an java exe file and stored in some other directory..i am getting an error saying…
couldn’t find main class??
what should i do..??
please any one help me out??
I did everything as shown bt still problem for executing
adobe premiere elements 10 price microsoft office student discount australia Lynda.com – Photoshop for Designers: Filters buy microsoft office 365 home premium microsoft office for mac 2016 release date
video bokep gonzoxxx video song youtube videos