Questions tagged [javaimports]

JavaImports is a Sublime Text plugin for automatically adding imports to your Java files. It resolves the package names by scanning through a source .zip or folder or a .jar file.

SublimeJavaImports

JavaImports is a Sublime Text plugin for automatically adding imports to your Java files. It resolves the package names by scanning through a source .zip or folder or a .jar file.

Installation

The best way to install this is using PackageControl

Usage

First you have to define your java_import_path in your settings. The best path to use is the src.zip in your Java JDK. You can also use your android.jar as path to work with android classes.

To add an import either mark all class names to import and press ctrl+alt+i or just press ctrl+alt+i and then enter the class name.

To add a library to your project, in your .sublime-project add

"settings":
{
    "java_import_path":
    [
        "default/java/import/path/src.zip",
        "path/to/library.jar"
    ]
}

Reference

Package Control - JavaImports

11 questions
1
vote
2 answers

How to look for the maven repository of a particular class or package

In my Maven project, I need to use a particular class (specifically, org.eclipse.rdf4j.model.util.Values.bnode) However, when I import it in Eclipse it logically complains it couldnt find it. Further, when I look for the Maven repo of rdf4j in…
Abdelghani
  • 455
  • 2
  • 9
  • 19
1
vote
1 answer

Unwanted import added by compiler

I need the same code to work on different servers with different libraries. So for example serverB contains libraryB. ClassB while serverA doesn't. To make the code work on both servers I do not import the class explicitly but I declare it only when…
M_M
  • 11
  • 2
1
vote
1 answer

Java import wildcard accessibility for nested static classes

How does the java accessibility (or perhaps, scope) work with respect to type import multi-level nested classes? An example: ClassA.java: package com.oracle.javatests; public class ClassA { public static class NestedAA { public void…
0
votes
2 answers

VS Code - The import "#####" cannot be resolved

So, i am running a java project which have many library that are available in the current working directory but VS code seems to not recognize these library and giving out error "The import ###### cannot be resolved" ex: The import…
0
votes
1 answer

How do I import SlickUtils?

I'm attempting to import SlickUtils into my project, but I can't figure out how. For example - to import ArrayList i'd do import java.util.Arraylist; Could someone let me know how to do this with SlickUtils? Thanks.
FourEights
  • 39
  • 1
  • 9
0
votes
0 answers

JAVA class not found but declared among the imports

I had declared and implemented a class (1) in a package , then imported (2) and used (3) in another class file of the same package but not folder : 1 - class file MIkController has no problem or warning 2 - import…
0
votes
0 answers

Bidirectional reference to parent package in Java

I'm trying to setup a java project with following structure: [Project] -parent_class -Package -child_class Importing and refrencing the child_class in the parent_class is no problem so far. The reference from parent_class to child_class seems…
0
votes
1 answer

How do I use a class from my Jar file in my IntelliJ project?

I have a jar file and I am trying to use classes from that file in other programs, and the only way I know how to do that is by copying and pasting the code, which is less than ideal.
0
votes
2 answers

Organize imports in eclipse java

enter image description here I'm working on a JUnit project on eclipse , please help me to organize imports ,because im using checkList plugin. I tried source +organize imports also , I tried Control+Shift +o , but both of them did not work . can…
Adam
  • 1
  • 1
-1
votes
1 answer

How to access package from bin folder from src folder

So I have a folder structure as below mainFolder\ bin\ file1.class,file2.class,file3.class,file4.class //under package named classes src\ socialmedia\ file5.java,file6.java,file7.java //under package named…
Samuel W
  • 39
  • 7
-1
votes
1 answer

Trouble importing external libraries into a Visual Studio project

I've been searching for how to set up JavaFX on my MacBook for three days and VSCode still tells me "import JavaFX couldn't be resolved." I've tried setting up my project twice, once with Maven and once without. I downloaded the required JavaFX…
Maya
  • 19
  • 4