In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "how to create a JRuby project in Netbeans". In daily operation, I believe many people have doubts about how to create a JRuby project in Netbeans. The editor consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the doubt of "how to create a JRuby project in Netbeans". Next, please follow the editor to study!
JRuby is an implementation of pure Java based on the famous Ruby programming language. It is a dynamic, open source programming language with simple features and high development efficiency. Ruby has a good syntax, programming statements are natural to read and easy to write. This article shows you how to use the NetBeans integrated development environment for JRuby development.
The NetBeans integrated development environment is free and open source for software developers. The NetBeans integrated development environment provides developers with all the tools they need to create professional cross-platform desktop, enterprise, web, and mobile applications. In this article, you will learn how to transform a JRuby project into a Netbeans project, which will help users develop, compile, and test JRuby projects in the Netbeans environment.
1 required software
Before you start, you need to install NetBeans 6.0on your computer.
2 remarks on the marks of this article
-- installation directory of NetBeans integrated development environment
-- the user's home directory. Such as "C:Documents and Settingsuser_home"
-- JRuby source file directory
3 Why did you choose NetBeans?
The NetBeans integrated development environment is a robust, free, open source Java integrated development environment that provides developers with all the tools they need to create cross-platform desktop, web, and mobile applications. Benefits that can be gained by using NetBeans:
1) A variety of source code integration systems help users to easily manage source code.
2) the ANT compiler system enables users to build projects in this environment or not.
3) integrate compiler and debugger
4) have more features to expand your application
Simply put, the reason for using NetBeans is that it is free, open source, powerful, and extensible integrated development environment where you can edit, compile, debug, and manage your applications.
Actual combat
Create a JRuby project in Netbeans
Download JRuby
1 download the JRuby source code from http://dist.codehaus.org/jruby/, we use the source code http://dist.codehaus.org/jruby/jruby-src-0.9.8.tar.gz of this link
2 unpack the downloaded files and put them in the directory
3 replace the ant.jar file in the / lib directory with ant.jar 1.6.5 or newer version. This step is very necessary, otherwise you will pop up an error message: "The existing ant.jar is an old 1.5 version."
Create JRuby project steps
1. Select File > New Project from the main menu, and a new project wizard opens.
2 in the category list, select "Java Project with existing ANT Script", and then click next.
3 on the Name and Location page, specify the location of the JRuby project file and the location of the build.xml file. In the example of this article, the JRuby project file is located in C:mpjruby-0.9.8
Click next
4. On the Build and Run Actions page, follow the instructions below to fill in one by one
Build Project-jar
Clean Project-clean
Generate Javadoc-create-apidocs
Run Project-leave this field empty
Test Project-test
Click next
5. On the Source Package Folders wizard page, specify / src as the src resource bundle and / test as the test package.
Click next
6. On the Java Sources Classpath page, add all the .jar files, and in the / lib directory, add all of them.
7. Select the test resource pack, add the bsf.jar file and junit.jar file, and junit.jar is in the / lib directory. Also add the src folder to the Java Sources Classpath list.
Click finish.
Compile the JRuby project
To compile the jruby.jar, follow these steps:
1. In the open window, right-click JRuby and select Build Project or Clean and Build Project from the pop-up menu.
The JRuby .jar file will be compiled and you will see the "BUILD SUCCESSFUL" message in the Output window.
Test the JRuby project
To complete the testing of the JRuby project, you need to follow these steps:
1. In the project window that opens, right-click the JRuby project, select Test Project from the pop-up menu, or press the Alt+F6 shortcut key.
At this point, the study on "how to create a JRuby project in Netbeans" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.