Reputation: 35
I have a jsp project and I am using eclipse. I want to import a couple of external java source code into Java Resources src. Is there a way to do it rather than create a couple of new classes and then copy and paste the code into it? Thank you.
Upvotes: 1
Views: 812
Reputation: 775
Actually nobody is getting what if one havn't define package ??? then define package in ur java code as :-
package MyPackage;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.*;
import java.util.Map.Entry;
public class NavBackend {
static boolean isNumeric(String str)
{
..............
..............
then in your jsp file you can write like :
<%@page import="MyPackage.NavBackend"%>
Upvotes: 0
Reputation: 20033
If they're already in the expected package layout for source files, you can just File|Import from the Filesystem.
Upvotes: 1